wip
This commit is contained in:
parent
c192d0512e
commit
f4bc78ad3d
|
@ -30,13 +30,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useTemplateRef } from 'vue';
|
import { useTemplateRef } from 'vue';
|
||||||
|
import type { PagingCtx } from '@/use/use-pagination.js';
|
||||||
import MkNote from '@/components/MkNote.vue';
|
import MkNote from '@/components/MkNote.vue';
|
||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { infoImageUrl } from '@/instance.js';
|
import { infoImageUrl } from '@/instance.js';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
pagination: Paging;
|
pagination: PagingCtx;
|
||||||
noGap?: boolean;
|
noGap?: boolean;
|
||||||
disableAutoLoad?: boolean;
|
disableAutoLoad?: boolean;
|
||||||
pullToRefresh?: boolean;
|
pullToRefresh?: boolean;
|
||||||
|
|
|
@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<template>
|
<template>
|
||||||
<PageWithHeader :actions="headerActions" :tabs="headerTabs">
|
<PageWithHeader :actions="headerActions" :tabs="headerTabs">
|
||||||
<div class="_spacer" style="--MI_SPACER-w: 800px;">
|
<div class="_spacer" style="--MI_SPACER-w: 800px;">
|
||||||
<MkNotesTimeline ref="notes" class="" :pagination="pagination"/>
|
<MkNotesTimeline ref="tlComponent" class="" :pagination="pagination"/>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="$i" #footer>
|
<template v-if="$i" #footer>
|
||||||
<div :class="$style.footer">
|
<div :class="$style.footer">
|
||||||
|
@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref, useTemplateRef } from 'vue';
|
||||||
import MkNotesTimeline from '@/components/MkNotesTimeline.vue';
|
import MkNotesTimeline from '@/components/MkNotesTimeline.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { definePage } from '@/page.js';
|
import { definePage } from '@/page.js';
|
||||||
|
@ -40,7 +40,8 @@ const pagination = {
|
||||||
tag: props.tag,
|
tag: props.tag,
|
||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
const notes = ref<InstanceType<typeof MkNotes>>();
|
|
||||||
|
const tlComponent = useTemplateRef('tlComponent');
|
||||||
|
|
||||||
async function post() {
|
async function post() {
|
||||||
store.set('postFormHashtags', props.tag);
|
store.set('postFormHashtags', props.tag);
|
||||||
|
@ -48,7 +49,7 @@ async function post() {
|
||||||
await os.post();
|
await os.post();
|
||||||
store.set('postFormHashtags', '');
|
store.set('postFormHashtags', '');
|
||||||
store.set('postFormWithHashtags', false);
|
store.set('postFormWithHashtags', false);
|
||||||
notes.value?.reload();
|
tlComponent.value?.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
const headerActions = computed(() => [{
|
const headerActions = computed(() => [{
|
||||||
|
|
|
@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref, useTemplateRef } from 'vue';
|
||||||
import XColumn from './column.vue';
|
import XColumn from './column.vue';
|
||||||
import type { Column } from '@/deck.js';
|
import type { Column } from '@/deck.js';
|
||||||
import MkNotesTimeline from '@/components/MkNotesTimeline.vue';
|
import MkNotesTimeline from '@/components/MkNotesTimeline.vue';
|
||||||
|
@ -31,7 +31,7 @@ const pagination = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const tlComponent = ref<InstanceType<typeof MkNotes>>();
|
const tlComponent = useTemplateRef('tlComponent');
|
||||||
|
|
||||||
function reloadTimeline() {
|
function reloadTimeline() {
|
||||||
return new Promise<void>((res) => {
|
return new Promise<void>((res) => {
|
||||||
|
|
|
@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref, useTemplateRef } from 'vue';
|
||||||
import XColumn from './column.vue';
|
import XColumn from './column.vue';
|
||||||
import type { Column } from '@/deck.js';
|
import type { Column } from '@/deck.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
@ -23,7 +23,7 @@ defineProps<{
|
||||||
isStacked: boolean;
|
isStacked: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const tlComponent = ref<InstanceType<typeof MkNotes>>();
|
const tlComponent = useTemplateRef('tlComponent');
|
||||||
|
|
||||||
function reloadTimeline() {
|
function reloadTimeline() {
|
||||||
return new Promise<void>((res) => {
|
return new Promise<void>((res) => {
|
||||||
|
|
Loading…
Reference in New Issue