mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-01 05:04:18 +02:00
refactor(frontend): improve pagination implementation
This commit is contained in:
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<template>
|
||||
<PageWithHeader>
|
||||
<div class="_spacer" style="--MI_SPACER-w: 800px;">
|
||||
<MkPagination :pagination="pagination">
|
||||
<MkPagination :paginator="paginator">
|
||||
<template #empty><MkResult type="empty" :text="i18n.ts.noNotes"/></template>
|
||||
|
||||
<template #default="{ items }">
|
||||
@@ -20,16 +20,17 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { markRaw } from 'vue';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import MkNote from '@/components/MkNote.vue';
|
||||
import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePage } from '@/page.js';
|
||||
import { Paginator } from '@/utility/paginator.js';
|
||||
|
||||
const pagination = {
|
||||
endpoint: 'i/favorites' as const,
|
||||
const paginator = markRaw(new Paginator('i/favorites', {
|
||||
limit: 10,
|
||||
};
|
||||
}));
|
||||
|
||||
definePage(() => ({
|
||||
title: i18n.ts.favorites,
|
||||
|
||||
Reference in New Issue
Block a user