refactor: migrate to nuxt compatibilityVersion: 4 (#3298)
This commit is contained in:
parent
46e4433e1c
commit
a3fbc056a9
342 changed files with 1200 additions and 2932 deletions
26
app/pages/notifications/[filter].vue
Normal file
26
app/pages/notifications/[filter].vue
Normal file
|
@ -0,0 +1,26 @@
|
|||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
|
||||
const route = useRoute()
|
||||
const { t } = useI18n()
|
||||
|
||||
const filter = computed<mastodon.v1.NotificationType | undefined>(() => {
|
||||
if (!isHydrated.value)
|
||||
return undefined
|
||||
|
||||
const rawFilter = route.params?.filter
|
||||
const actualFilter = Array.isArray(rawFilter) ? rawFilter[0] : rawFilter
|
||||
if (isNotification(actualFilter))
|
||||
return actualFilter
|
||||
|
||||
return undefined
|
||||
})
|
||||
|
||||
useHydratedHead({
|
||||
title: () => `${t(`tab.notifications_${filter.value ?? 'all'}`)} | ${t('nav.notifications')}`,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TimelineNotifications v-if="isHydrated" :filter="filter" />
|
||||
</template>
|
11
app/pages/notifications/index.vue
Normal file
11
app/pages/notifications/index.vue
Normal file
|
@ -0,0 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
const { t } = useI18n()
|
||||
|
||||
useHydratedHead({
|
||||
title: () => `${t('tab.notifications_all')} | ${t('nav.notifications')}`,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TimelineNotifications v-if="isHydrated" />
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue