mirror of
https://github.com/YunoHost/yunohost-portal.git
synced 2024-09-03 20:06:23 +02:00
add page title and custom title handling
This commit is contained in:
parent
0a7c128ab1
commit
12239ce9ff
4 changed files with 25 additions and 2 deletions
9
app.vue
9
app.vue
|
@ -3,6 +3,15 @@ const head = useLocaleHead({
|
||||||
addDirAttribute: true,
|
addDirAttribute: true,
|
||||||
addSeoAttributes: true,
|
addSeoAttributes: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const settings = await useSettings()
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
titleTemplate: (titleChunk) => {
|
||||||
|
const baseTitle = settings.value.portal_title
|
||||||
|
return titleChunk ? `${titleChunk} - ${baseTitle}` : baseTitle
|
||||||
|
},
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -6,6 +6,11 @@ import { pick, exclude } from '@/utils/common'
|
||||||
import type { User } from '@/composables/states'
|
import type { User } from '@/composables/states'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: t('footerlink_edit'),
|
||||||
|
})
|
||||||
|
|
||||||
const user = await useUser()
|
const user = await useUser()
|
||||||
|
|
||||||
const loading: Ref<boolean | null> = ref(false)
|
const loading: Ref<boolean | null> = ref(false)
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
definePageMeta({
|
||||||
|
public: true,
|
||||||
|
})
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const appsData = await useApps()
|
const appsData = await useApps()
|
||||||
|
|
||||||
definePageMeta({
|
useHead({
|
||||||
public: true,
|
title: t('portal'),
|
||||||
})
|
})
|
||||||
|
|
||||||
const apps = computed(() => {
|
const apps = computed(() => {
|
||||||
|
|
|
@ -9,6 +9,11 @@ definePageMeta({
|
||||||
})
|
})
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: t('login'),
|
||||||
|
})
|
||||||
|
|
||||||
const isLoggedIn = useIsLoggedIn()
|
const isLoggedIn = useIsLoggedIn()
|
||||||
|
|
||||||
const { handleSubmit, setErrors } = useForm({
|
const { handleSubmit, setErrors } = useForm({
|
||||||
|
|
Loading…
Reference in a new issue