mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-09 10:29:57 +00:00
34 lines
768 B
Vue
34 lines
768 B
Vue
<script setup lang="ts">
|
|
import { STORAGE_KEY_NOTIFY_TAB } from '~/constants'
|
|
|
|
definePageMeta({
|
|
middleware: 'auth',
|
|
})
|
|
|
|
const tabNames = ['All', 'Mentions'] as const
|
|
const tab = $(useLocalStorage<typeof tabNames[number]>(STORAGE_KEY_NOTIFY_TAB, 'All'))
|
|
|
|
const paginator = $computed(() => {
|
|
return masto.notifications.getIterator(tab === 'All' ? undefined : { types: ['mention'] })
|
|
})
|
|
|
|
useHead({
|
|
title: 'Notifications',
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<MainContent>
|
|
<template #title>
|
|
<span text-lg font-bold>Notifications</span>
|
|
</template>
|
|
|
|
<template #header>
|
|
<CommonTabs v-model="tab" :options="tabNames" />
|
|
</template>
|
|
<slot>
|
|
<NotificationPaginator :key="tab" :paginator="paginator" />
|
|
</slot>
|
|
</MainContent>
|
|
</template>
|