add page title and custom title handling

This commit is contained in:
axolotle 2023-09-07 18:13:09 +02:00
parent 0a7c128ab1
commit 12239ce9ff
4 changed files with 25 additions and 2 deletions

View file

@ -3,6 +3,15 @@ const head = useLocaleHead({
addDirAttribute: true,
addSeoAttributes: true,
})
const settings = await useSettings()
useHead({
titleTemplate: (titleChunk) => {
const baseTitle = settings.value.portal_title
return titleChunk ? `${titleChunk} - ${baseTitle}` : baseTitle
},
})
</script>
<template>

View file

@ -6,6 +6,11 @@ import { pick, exclude } from '@/utils/common'
import type { User } from '@/composables/states'
const { t } = useI18n()
useHead({
title: t('footerlink_edit'),
})
const user = await useUser()
const loading: Ref<boolean | null> = ref(false)

View file

@ -1,9 +1,13 @@
<script setup lang="ts">
definePageMeta({
public: true,
})
const { t } = useI18n()
const appsData = await useApps()
definePageMeta({
public: true,
useHead({
title: t('portal'),
})
const apps = computed(() => {

View file

@ -9,6 +9,11 @@ definePageMeta({
})
const { t } = useI18n()
useHead({
title: t('login'),
})
const isLoggedIn = useIsLoggedIn()
const { handleSubmit, setErrors } = useForm({