enhance: ハッシュタグのノート一覧ページから、そのハッシュタグで投稿するボタンを追加、お知らせの画像URLを空にできない問題を修正 (#10878)
* fix: お知らせの画像URLを空にできない問題を修正 (misskey-dev/misskey#10657) * ハッシュタグのノート一覧ページからノートできるように(misskey-dev/misskey#10854) * fix: 色々直した * location.reloadを使わないように * CHANGELOGを編集 * tweak * Update tag.vue --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
@@ -2,15 +2,27 @@
|
||||
<MkStickyContainer>
|
||||
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
|
||||
<MkSpacer :contentMax="800">
|
||||
<MkNotes class="" :pagination="pagination"/>
|
||||
<MkNotes ref="notes" class="" :pagination="pagination"/>
|
||||
</MkSpacer>
|
||||
<template v-if="$i" #footer>
|
||||
<div :class="$style.footer">
|
||||
<MkSpacer :contentMax="800" :marginMin="16" :marginMax="16">
|
||||
<MkButton rounded primary :class="$style.button" @click="post()"><i class="ti ti-pencil"></i>{{ i18n.ts.postToHashtag }}</MkButton>
|
||||
</MkSpacer>
|
||||
</div>
|
||||
</template>
|
||||
</MkStickyContainer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import MkNotes from '@/components/MkNotes.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
import { i18n } from '@/i18n';
|
||||
import { $i } from '@/account';
|
||||
import { defaultStore } from '@/store';
|
||||
import * as os from '@/os';
|
||||
|
||||
const props = defineProps<{
|
||||
tag: string;
|
||||
@@ -23,6 +35,16 @@ const pagination = {
|
||||
tag: props.tag,
|
||||
})),
|
||||
};
|
||||
const notes = ref<InstanceType<typeof MkNotes>>();
|
||||
|
||||
async function post() {
|
||||
defaultStore.set('postFormHashtags', props.tag);
|
||||
defaultStore.set('postFormWithHashtags', true);
|
||||
await os.post();
|
||||
defaultStore.set('postFormHashtags', '');
|
||||
defaultStore.set('postFormWithHashtags', false);
|
||||
notes.value?.pagingComponent?.reload();
|
||||
}
|
||||
|
||||
const headerActions = $computed(() => []);
|
||||
|
||||
@@ -33,3 +55,16 @@ definePageMetadata(computed(() => ({
|
||||
icon: 'ti ti-hash',
|
||||
})));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
.footer {
|
||||
-webkit-backdrop-filter: var(--blur, blur(15px));
|
||||
backdrop-filter: var(--blur, blur(15px));
|
||||
border-top: solid 0.5px var(--divider);
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.button {
|
||||
margin: 0 auto var(--margin) auto;
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user