2022-11-16 06:21:54 +09:00
|
|
|
<script setup lang="ts">
|
|
|
|
definePageMeta({
|
|
|
|
middleware: 'auth',
|
|
|
|
})
|
|
|
|
|
2022-11-28 23:25:32 +09:00
|
|
|
const { t } = useI18n()
|
2022-12-18 08:29:16 +09:00
|
|
|
const pwaEnabled = useRuntimeConfig().public.pwaEnabled
|
2022-11-28 23:25:32 +09:00
|
|
|
|
2022-11-30 08:25:29 +09:00
|
|
|
const tabs = $computed(() => [
|
|
|
|
{
|
|
|
|
name: 'all',
|
2022-12-13 22:50:42 +09:00
|
|
|
to: '/notifications',
|
2022-11-30 08:25:29 +09:00
|
|
|
display: t('tab.notifications_all'),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'mention',
|
2022-12-13 22:50:42 +09:00
|
|
|
to: '/notifications/mention',
|
2022-11-30 08:25:29 +09:00
|
|
|
display: t('tab.notifications_mention'),
|
|
|
|
},
|
|
|
|
] as const)
|
2022-11-16 06:21:54 +09:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-12-31 03:16:23 +09:00
|
|
|
<MainContent>
|
2022-11-16 06:21:54 +09:00
|
|
|
<template #title>
|
2023-01-05 08:17:30 +09:00
|
|
|
<NuxtLink to="/notifications" timeline-title-style flex items-center gap-2 @click="$scrollToTop">
|
2022-11-30 05:15:53 +09:00
|
|
|
<div i-ri:notification-4-line />
|
2022-12-28 02:49:15 +09:00
|
|
|
<span>{{ t('nav.notifications') }}</span>
|
2022-11-30 05:15:53 +09:00
|
|
|
</NuxtLink>
|
2022-11-16 06:21:54 +09:00
|
|
|
</template>
|
2022-11-24 15:42:26 +09:00
|
|
|
|
2023-01-05 17:47:58 +09:00
|
|
|
<template #actions>
|
|
|
|
<NuxtLink
|
2022-12-18 08:29:16 +09:00
|
|
|
flex rounded-4 p1
|
|
|
|
hover:bg-active cursor-pointer transition-100
|
2023-01-05 17:47:58 +09:00
|
|
|
:title="t('settings.notifications.show_btn')"
|
|
|
|
to="/settings/notifications"
|
2022-12-18 08:29:16 +09:00
|
|
|
>
|
2023-01-05 17:47:58 +09:00
|
|
|
<span aria-hidden="true" i-ri:notification-badge-line />
|
|
|
|
</NuxtLink>
|
2022-12-18 08:29:16 +09:00
|
|
|
</template>
|
|
|
|
|
2022-11-23 17:08:49 +09:00
|
|
|
<template #header>
|
2022-12-13 22:50:42 +09:00
|
|
|
<CommonRouteTabs replace :options="tabs" />
|
2022-11-23 17:08:49 +09:00
|
|
|
</template>
|
2022-12-18 08:29:16 +09:00
|
|
|
|
|
|
|
<slot>
|
|
|
|
<template v-if="pwaEnabled">
|
2023-01-05 17:47:58 +09:00
|
|
|
<NotificationPreferences />
|
2022-12-18 08:29:16 +09:00
|
|
|
</template>
|
2022-12-26 14:39:18 +09:00
|
|
|
|
2022-12-18 08:29:16 +09:00
|
|
|
<NuxtPage />
|
|
|
|
</slot>
|
2022-11-16 06:21:54 +09:00
|
|
|
</MainContent>
|
|
|
|
</template>
|