summaryrefslogtreecommitdiff
path: root/packages/frontend/src/pages/user/clips.vue
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-06-29 15:11:25 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-06-29 15:11:25 +0900
commitf1deb89e348eb8f1a39b51e33a0ae33d59529feb (patch)
tree2e92a7a21a1bf377719e1b125a9ac44bc14a529e /packages/frontend/src/pages/user/clips.vue
parentfeat(backend): クリップ内でノートを検索できるように (diff)
downloadmisskey-f1deb89e348eb8f1a39b51e33a0ae33d59529feb.tar.gz
misskey-f1deb89e348eb8f1a39b51e33a0ae33d59529feb.tar.bz2
misskey-f1deb89e348eb8f1a39b51e33a0ae33d59529feb.zip
refactor(frontend): improve pagination implementation
Diffstat (limited to 'packages/frontend/src/pages/user/clips.vue')
-rw-r--r--packages/frontend/src/pages/user/clips.vue12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/frontend/src/pages/user/clips.vue b/packages/frontend/src/pages/user/clips.vue
index 5b5bc3193f..57f7bc13a1 100644
--- a/packages/frontend/src/pages/user/clips.vue
+++ b/packages/frontend/src/pages/user/clips.vue
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<div class="_spacer" style="--MI_SPACER-w: 700px;">
<div>
- <MkPagination v-slot="{items}" :pagination="pagination" withControl>
+ <MkPagination v-slot="{items}" :paginator="paginator" withControl>
<MkA v-for="item in items" :key="item.id" :to="`/clips/${item.id}`" :class="$style.item" class="_panel _margin">
<b>{{ item.name }}</b>
<div v-if="item.description" :class="$style.description">{{ item.description }}</div>
@@ -17,21 +17,21 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
-import { computed } from 'vue';
+import { computed, markRaw } from 'vue';
import * as Misskey from 'misskey-js';
import MkPagination from '@/components/MkPagination.vue';
+import { Paginator } from '@/utility/paginator.js';
const props = defineProps<{
user: Misskey.entities.User;
}>();
-const pagination = {
- endpoint: 'users/clips' as const,
+const paginator = markRaw(new Paginator('users/clips', {
limit: 20,
- params: computed(() => ({
+ computedParams: computed(() => ({
userId: props.user.id,
})),
-};
+}));
</script>
<style lang="scss" module>