diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-06-29 15:11:25 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-06-29 15:11:25 +0900 |
| commit | f1deb89e348eb8f1a39b51e33a0ae33d59529feb (patch) | |
| tree | 2e92a7a21a1bf377719e1b125a9ac44bc14a529e /packages/frontend/src/pages/drive.file.notes.vue | |
| parent | feat(backend): クリップ内でノートを検索できるように (diff) | |
| download | misskey-f1deb89e348eb8f1a39b51e33a0ae33d59529feb.tar.gz misskey-f1deb89e348eb8f1a39b51e33a0ae33d59529feb.tar.bz2 misskey-f1deb89e348eb8f1a39b51e33a0ae33d59529feb.zip | |
refactor(frontend): improve pagination implementation
Diffstat (limited to 'packages/frontend/src/pages/drive.file.notes.vue')
| -rw-r--r-- | packages/frontend/src/pages/drive.file.notes.vue | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/frontend/src/pages/drive.file.notes.vue b/packages/frontend/src/pages/drive.file.notes.vue index cf45470588..8427017c92 100644 --- a/packages/frontend/src/pages/drive.file.notes.vue +++ b/packages/frontend/src/pages/drive.file.notes.vue @@ -6,16 +6,16 @@ SPDX-License-Identifier: AGPL-3.0-only <template> <div class="_gaps"> <MkInfo>{{ i18n.ts._fileViewer.thisPageCanBeSeenFromTheAuthor }}</MkInfo> - <MkNotesTimeline ref="tlComponent" :pagination="pagination"/> + <MkNotesTimeline :paginator="paginator"/> </div> </template> <script lang="ts" setup> -import { ref, computed } from 'vue'; +import { ref, computed, markRaw } from 'vue'; import { i18n } from '@/i18n.js'; -import type { PagingCtx } from '@/composables/use-pagination.js'; import MkInfo from '@/components/MkInfo.vue'; import MkNotesTimeline from '@/components/MkNotesTimeline.vue'; +import { Paginator } from '@/utility/paginator.js'; const props = defineProps<{ fileId: string; @@ -23,11 +23,10 @@ const props = defineProps<{ const realFileId = computed(() => props.fileId); -const pagination = ref<PagingCtx>({ - endpoint: 'drive/files/attached-notes', +const paginator = markRaw(new Paginator('drive/files/attached-notes', { limit: 10, params: { fileId: realFileId.value, }, -}); +})); </script> |