feat: notifications settings page (#782)
This commit is contained in:
parent
0d66038eaa
commit
d4e99566b8
19 changed files with 519 additions and 362 deletions
35
pages/settings/notifications/index.vue
Normal file
35
pages/settings/notifications/index.vue
Normal file
|
@ -0,0 +1,35 @@
|
|||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const { t } = useI18n()
|
||||
const pwaEnabled = useRuntimeConfig().public.pwaEnabled
|
||||
|
||||
useHeadFixed({
|
||||
title: () => `${t('settings.notifications.notifications.label')} | ${t('nav.settings')}`,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<MainContent back-on-small-screen>
|
||||
<template #title>
|
||||
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
|
||||
<span>{{ $t('settings.notifications.notifications.label') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<SettingsItem
|
||||
command
|
||||
:text="$t('settings.notifications.notifications.label')"
|
||||
to="/settings/notifications/notifications"
|
||||
/>
|
||||
<SettingsItem
|
||||
command
|
||||
:disabled="!pwaEnabled"
|
||||
:text="$t('settings.notifications.push_notifications.label')"
|
||||
:description="$t('settings.notifications.push_notifications.description')"
|
||||
to="/settings/notifications/push-notifications"
|
||||
/>
|
||||
</MainContent>
|
||||
</template>
|
27
pages/settings/notifications/notifications.vue
Normal file
27
pages/settings/notifications/notifications.vue
Normal file
|
@ -0,0 +1,27 @@
|
|||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
useHeadFixed({
|
||||
title: () => `${t('settings.notifications.notifications.label')} | ${t('settings.notifications.label')} | ${t('nav.settings')}`,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<MainContent back>
|
||||
<template #title>
|
||||
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
|
||||
<span>{{ $t('settings.notifications.notifications.label') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<h3 px6 py4 mt2 font-bold text-xl flex="~ gap-1" items-center>
|
||||
{{ $t('settings.notifications.notifications.label') }}
|
||||
</h3>
|
||||
<p text-4xl text-center>
|
||||
<span sr-only>Under construction</span> 🚧
|
||||
</p>
|
||||
</MainContent>
|
||||
</template>
|
25
pages/settings/notifications/push-notifications.vue
Normal file
25
pages/settings/notifications/push-notifications.vue
Normal file
|
@ -0,0 +1,25 @@
|
|||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
middleware: ['auth', () => {
|
||||
if (!useRuntimeConfig().public.pwaEnabled)
|
||||
return navigateTo('/settings/notifications')
|
||||
}],
|
||||
})
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
useHeadFixed({
|
||||
title: () => `${t('settings.notifications.push_notifications.label')} | ${t('settings.notifications.label')} | ${t('nav.settings')}`,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<MainContent back>
|
||||
<template #title>
|
||||
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
|
||||
<span>{{ $t('settings.notifications.push_notifications.label') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<NotificationPreferences show />
|
||||
</MainContent>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue