feat: add titles for settings

This commit is contained in:
三咲智子 2023-01-04 21:57:12 +08:00
parent 9a167ee990
commit 377c015c91
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
11 changed files with 66 additions and 7 deletions

View file

@ -1,6 +1,12 @@
<script setup lang="ts">
import { buildInfo } from 'virtual:build-info'
const { t } = useI18n()
useHeadFixed({
title: () => `${t('settings.about.label')} | ${t('nav.settings')}`,
})
let showCommit = $ref(buildInfo.env !== 'release' && buildInfo.env !== 'dev')
const builtTime = useFormattedDateTime(buildInfo.time)

View file

@ -1,3 +1,11 @@
<script setup lang="ts">
const { t } = useI18n()
useHeadFixed({
title: () => `${t('settings.interface.label')} | ${t('nav.settings')}`,
})
</script>
<template>
<MainContent back-on-small-screen>
<template #title>

View file

@ -1,3 +1,11 @@
<script setup lang="ts">
const { t } = useI18n()
useHeadFixed({
title: () => `${t('settings.language.label')} | ${t('nav.settings')}`,
})
</script>
<template>
<MainContent back-on-small-screen>
<template #title>

View file

@ -1,3 +1,11 @@
<script setup lang="ts">
const { t } = useI18n()
useHeadFixed({
title: () => `${t('settings.preferences.label')} | ${t('nav.settings')}`,
})
</script>
<template>
<MainContent back-on-small-screen>
<template #title>

View file

@ -9,6 +9,12 @@ definePageMeta({
keepalive: false,
})
const { t } = useI18n()
useHeadFixed({
title: () => `${t('settings.profile.appearance.title')} | ${t('nav.settings')}`,
})
const account = $computed(() => currentUser.value?.account)
const onlineSrc = $computed(() => ({

View file

@ -2,6 +2,12 @@
definePageMeta({
middleware: 'auth',
})
const { t } = useI18n()
useHeadFixed({
title: () => `${t('settings.profile.featured_tags.label')} | ${t('nav.settings')}`,
})
</script>
<template>

View file

@ -2,6 +2,12 @@
definePageMeta({
middleware: 'auth',
})
const { t } = useI18n()
useHeadFixed({
title: () => `${t('settings.profile.label')} | ${t('nav.settings')}`,
})
</script>
<template>

View file

@ -2,6 +2,12 @@
import { fileOpen } from 'browser-fs-access'
import type { UserLogin } from '~/types'
const { t } = useI18n()
useHeadFixed({
title: () => `${t('settings.users.label')} | ${t('nav.settings')}`,
})
const loggedInUsers = useUsers()
async function exportTokens() {