2023-09-06 09:13:16 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
import type { mastodon } from 'masto'
|
|
|
|
|
|
|
|
const route = useRoute()
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
2024-02-21 15:20:08 +00:00
|
|
|
const filter = computed<mastodon.v1.NotificationType | undefined>(() => {
|
2023-09-06 09:13:16 +00:00
|
|
|
if (!isHydrated.value)
|
|
|
|
return undefined
|
|
|
|
|
|
|
|
const rawFilter = route.params?.filter
|
|
|
|
const actualFilter = Array.isArray(rawFilter) ? rawFilter[0] : rawFilter
|
|
|
|
if (isNotification(actualFilter))
|
|
|
|
return actualFilter
|
|
|
|
})
|
|
|
|
|
|
|
|
useHydratedHead({
|
|
|
|
title: () => `${t(`tab.notifications_${filter ?? 'all'}`)} | ${t('nav.notifications')}`,
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<TimelineNotifications v-if="isHydrated" :filter="filter" />
|
|
|
|
</template>
|