This commit is contained in:
syuilo 2025-05-03 14:44:51 +09:00
parent c192d0512e
commit f4bc78ad3d
4 changed files with 11 additions and 9 deletions

View File

@ -30,13 +30,14 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { useTemplateRef } from 'vue';
import type { PagingCtx } from '@/use/use-pagination.js';
import MkNote from '@/components/MkNote.vue';
import MkPagination from '@/components/MkPagination.vue';
import { i18n } from '@/i18n.js';
import { infoImageUrl } from '@/instance.js';
const props = withDefaults(defineProps<{
pagination: Paging;
pagination: PagingCtx;
noGap?: boolean;
disableAutoLoad?: boolean;
pullToRefresh?: boolean;

View File

@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<PageWithHeader :actions="headerActions" :tabs="headerTabs">
<div class="_spacer" style="--MI_SPACER-w: 800px;">
<MkNotesTimeline ref="notes" class="" :pagination="pagination"/>
<MkNotesTimeline ref="tlComponent" class="" :pagination="pagination"/>
</div>
<template v-if="$i" #footer>
<div :class="$style.footer">
@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
import { computed, ref } from 'vue';
import { computed, ref, useTemplateRef } from 'vue';
import MkNotesTimeline from '@/components/MkNotesTimeline.vue';
import MkButton from '@/components/MkButton.vue';
import { definePage } from '@/page.js';
@ -40,7 +40,8 @@ const pagination = {
tag: props.tag,
})),
};
const notes = ref<InstanceType<typeof MkNotes>>();
const tlComponent = useTemplateRef('tlComponent');
async function post() {
store.set('postFormHashtags', props.tag);
@ -48,7 +49,7 @@ async function post() {
await os.post();
store.set('postFormHashtags', '');
store.set('postFormWithHashtags', false);
notes.value?.reload();
tlComponent.value?.reload();
}
const headerActions = computed(() => [{

View File

@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { ref, useTemplateRef } from 'vue';
import XColumn from './column.vue';
import type { Column } from '@/deck.js';
import MkNotesTimeline from '@/components/MkNotesTimeline.vue';
@ -31,7 +31,7 @@ const pagination = {
},
};
const tlComponent = ref<InstanceType<typeof MkNotes>>();
const tlComponent = useTemplateRef('tlComponent');
function reloadTimeline() {
return new Promise<void>((res) => {

View File

@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { ref, useTemplateRef } from 'vue';
import XColumn from './column.vue';
import type { Column } from '@/deck.js';
import { i18n } from '@/i18n.js';
@ -23,7 +23,7 @@ defineProps<{
isStacked: boolean;
}>();
const tlComponent = ref<InstanceType<typeof MkNotes>>();
const tlComponent = useTemplateRef('tlComponent');
function reloadTimeline() {
return new Promise<void>((res) => {