2022-11-16 00:21:54 +03:00
|
|
|
<script setup lang="ts">
|
|
|
|
definePageMeta({
|
|
|
|
middleware: 'auth',
|
|
|
|
})
|
|
|
|
|
2022-11-21 00:38:52 +03:00
|
|
|
const tabNames = ['All', 'Mentions'] as const
|
|
|
|
const tab = $(useLocalStorage<typeof tabNames[number]>('nuxtodon-notifications-tab', 'All'))
|
2022-11-19 18:15:19 +03:00
|
|
|
|
|
|
|
const paginator = $computed(() => {
|
2022-11-21 00:38:52 +03:00
|
|
|
return masto.notifications.getIterator(tab === 'All' ? undefined : { types: ['mention'] })
|
2022-11-19 18:15:19 +03:00
|
|
|
})
|
2022-11-16 00:21:54 +03:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<MainContent>
|
|
|
|
<template #title>
|
|
|
|
<div i-ri:notification-2-fill h-6 mr-1 /><span>Notifications</span>
|
|
|
|
</template>
|
|
|
|
<template #actions>
|
|
|
|
<div color-gray i-ri:equalizer-fill mr-1 h-6 />
|
|
|
|
</template>
|
|
|
|
<slot>
|
2022-11-21 00:38:52 +03:00
|
|
|
<CommonTabs v-model="tab" :options="tabNames" />
|
2022-11-19 18:15:19 +03:00
|
|
|
<NotificationPaginator :key="tab" :paginator="paginator" />
|
2022-11-16 00:21:54 +03:00
|
|
|
</slot>
|
|
|
|
</MainContent>
|
|
|
|
</template>
|