diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-11-02 15:57:55 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-11-02 15:57:55 +0900 |
| commit | f62ad3ed3eccfd242b2d1f1e25f00276f2bfff77 (patch) | |
| tree | 4c7280ec000d49ae69f31b97fb1043d20c3de0f1 /packages/frontend/src/components/MkNotifications.vue | |
| parent | fix(frontend): /about の連合タブのレイアウトが一部崩れてい... (diff) | |
| download | misskey-f62ad3ed3eccfd242b2d1f1e25f00276f2bfff77.tar.gz misskey-f62ad3ed3eccfd242b2d1f1e25f00276f2bfff77.tar.bz2 misskey-f62ad3ed3eccfd242b2d1f1e25f00276f2bfff77.zip | |
feat: notification grouping
Resolve #12211
Diffstat (limited to 'packages/frontend/src/components/MkNotifications.vue')
| -rw-r--r-- | packages/frontend/src/components/MkNotifications.vue | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/frontend/src/components/MkNotifications.vue b/packages/frontend/src/components/MkNotifications.vue index 896f97a48d..8d99e440e1 100644 --- a/packages/frontend/src/components/MkNotifications.vue +++ b/packages/frontend/src/components/MkNotifications.vue @@ -15,7 +15,7 @@ SPDX-License-Identifier: AGPL-3.0-only <template #default="{ items: notifications }"> <MkDateSeparatedList v-slot="{ item: notification }" :class="$style.list" :items="notifications" :noGap="true"> <MkNote v-if="['reply', 'quote', 'mention'].includes(notification.type)" :key="notification.id" :note="notification.note"/> - <XNotification v-else :key="notification.id" :notification="notification" :withTime="true" :full="true" class="_panel notification"/> + <XNotification v-else :key="notification.id" :notification="notification" :withTime="true" :full="true" class="_panel"/> </MkDateSeparatedList> </template> </MkPagination> @@ -32,6 +32,7 @@ import { $i } from '@/account.js'; import { i18n } from '@/i18n.js'; import { notificationTypes } from '@/const.js'; import { infoImageUrl } from '@/instance.js'; +import { defaultStore } from '@/store.js'; const props = defineProps<{ excludeTypes?: typeof notificationTypes[number][]; @@ -39,7 +40,13 @@ const props = defineProps<{ const pagingComponent = shallowRef<InstanceType<typeof MkPagination>>(); -const pagination: Paging = { +const pagination: Paging = defaultStore.state.useGroupedNotifications ? { + endpoint: 'i/notifications-grouped' as const, + limit: 20, + params: computed(() => ({ + excludeTypes: props.excludeTypes ?? undefined, + })), +} : { endpoint: 'i/notifications' as const, limit: 20, params: computed(() => ({ |