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