fix: remove flashing text on page reload (#1939)

This commit is contained in:
Joaquín Sánchez 2023-04-16 21:33:51 +02:00 committed by GitHub
parent 13581323b0
commit c71259334c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 88 additions and 61 deletions

View file

@ -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>

View file

@ -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>

View file

@ -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 />