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