fix: remove flashing text on page reload (#1939)
This commit is contained in:
parent
13581323b0
commit
c71259334c
43 changed files with 88 additions and 61 deletions
|
@ -2,7 +2,7 @@
|
|||
const buildInfo = useBuildInfo()
|
||||
const { t } = useI18n()
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('settings.about.label')} | ${t('nav.settings')}`,
|
||||
})
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div min-h-screen flex justify-center items-center>
|
||||
<div text-center flex="~ col gap-2" items-center>
|
||||
<div i-ri:settings-3-line text-5xl />
|
||||
<span text-xl>{{ $t('settings.select_a_settings') }}</span>
|
||||
<span text-xl>{{ isHydrated ? $t('settings.select_a_settings') : '' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
const { t } = useI18n()
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('settings.interface.label')} | ${t('nav.settings')}`,
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -5,7 +5,7 @@ const { t, locale } = useI18n()
|
|||
|
||||
const translationStatus: ElkTranslationStatus = await import('~/elk-translation-status.json').then(m => m.default)
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('settings.language.label')} | ${t('nav.settings')}`,
|
||||
})
|
||||
const status = computed(() => {
|
||||
|
|
|
@ -6,7 +6,7 @@ definePageMeta({
|
|||
const { t } = useI18n()
|
||||
const pwaEnabled = useAppConfig().pwaEnabled
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('settings.notifications.label')} | ${t('nav.settings')}`,
|
||||
})
|
||||
</script>
|
||||
|
@ -15,20 +15,20 @@ useHead({
|
|||
<MainContent back-on-small-screen>
|
||||
<template #title>
|
||||
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
|
||||
<span>{{ $t('settings.notifications.label') }}</span>
|
||||
<span>{{ isHydrated ? $t('settings.notifications.label') : '' }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<SettingsItem
|
||||
command
|
||||
:text="$t('settings.notifications.notifications.label')"
|
||||
:text="isHydrated ? $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')"
|
||||
:text="isHydrated ? $t('settings.notifications.push_notifications.label') : ''"
|
||||
:description="isHydrated ? $t('settings.notifications.push_notifications.description') : ''"
|
||||
to="/settings/notifications/push-notifications"
|
||||
/>
|
||||
</MainContent>
|
||||
|
|
|
@ -5,7 +5,7 @@ definePageMeta({
|
|||
|
||||
const { t } = useI18n()
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('settings.notifications.notifications.label')} | ${t('settings.notifications.label')} | ${t('nav.settings')}`,
|
||||
})
|
||||
</script>
|
||||
|
@ -14,14 +14,14 @@ useHead({
|
|||
<MainContent back>
|
||||
<template #title>
|
||||
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
|
||||
<span>{{ $t('settings.notifications.notifications.label') }}</span>
|
||||
<span>{{ isHydrated ? $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') }}
|
||||
{{ isHydrated ? $t('settings.notifications.notifications.label') : '' }}
|
||||
</h3>
|
||||
<p text-4xl text-center>
|
||||
<span sr-only>{{ $t('settings.notifications.under_construction') }}</span> 🚧
|
||||
<span sr-only>{{ isHydrated ? $t('settings.notifications.under_construction') : '' }}</span> 🚧
|
||||
</p>
|
||||
</MainContent>
|
||||
</template>
|
||||
|
|
|
@ -8,7 +8,7 @@ definePageMeta({
|
|||
|
||||
const { t } = useI18n()
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('settings.notifications.push_notifications.label')} | ${t('settings.notifications.label')} | ${t('nav.settings')}`,
|
||||
})
|
||||
</script>
|
||||
|
@ -17,7 +17,7 @@ useHead({
|
|||
<MainContent back>
|
||||
<template #title>
|
||||
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
|
||||
<span>{{ $t('settings.notifications.push_notifications.label') }}</span>
|
||||
<span>{{ isHydrated ? $t('settings.notifications.push_notifications.label') : '' }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<NotificationPreferences show />
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
const { t } = useI18n()
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('settings.preferences.label')} | ${t('nav.settings')}`,
|
||||
})
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ definePageMeta({
|
|||
|
||||
const { t } = useI18n()
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('settings.profile.appearance.title')} | ${t('nav.settings')}`,
|
||||
})
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ definePageMeta({
|
|||
|
||||
const { t } = useI18n()
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('settings.profile.featured_tags.label')} | ${t('nav.settings')}`,
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -5,7 +5,7 @@ definePageMeta({
|
|||
|
||||
const { t } = useI18n()
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('settings.profile.label')} | ${t('nav.settings')}`,
|
||||
})
|
||||
</script>
|
||||
|
@ -14,22 +14,22 @@ useHead({
|
|||
<MainContent back-on-small-screen>
|
||||
<template #title>
|
||||
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
|
||||
<span>{{ $t('settings.profile.label') }}</span>
|
||||
<span>{{ isHydrated ? $t('settings.profile.label') : '' }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<SettingsItem
|
||||
command large
|
||||
icon="i-ri:user-settings-line"
|
||||
:text="$t('settings.profile.appearance.label')"
|
||||
:description="$t('settings.profile.appearance.description')"
|
||||
:text="isHydrated ? $t('settings.profile.appearance.label') : ''"
|
||||
:description="isHydrated ? $t('settings.profile.appearance.description') : ''"
|
||||
to="/settings/profile/appearance"
|
||||
/>
|
||||
<SettingsItem
|
||||
command large
|
||||
icon="i-ri:hashtag"
|
||||
:text="$t('settings.profile.featured_tags.label')"
|
||||
:description="$t('settings.profile.featured_tags.description')"
|
||||
:text="isHydrated ? $t('settings.profile.featured_tags.label') : ''"
|
||||
:description="isHydrated ? $t('settings.profile.featured_tags.description') : ''"
|
||||
to="/settings/profile/featured-tags"
|
||||
/>
|
||||
<SettingsItem
|
||||
|
|
|
@ -5,7 +5,7 @@ import type { UserLogin } from '~/types'
|
|||
|
||||
const { t } = useI18n()
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('settings.users.label')} | ${t('nav.settings')}`,
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue