forked from Mirrors/elk
chore: cleanup isHydrated (#2614)
Co-authored-by: patak <583075+patak-dev@users.noreply.github.com>
This commit is contained in:
parent
6b40319723
commit
eddbb1eee9
5 changed files with 14 additions and 14 deletions
|
@ -88,23 +88,23 @@ function deletePollOption(index: number) {
|
||||||
const expiresInOptions = computed(() => [
|
const expiresInOptions = computed(() => [
|
||||||
{
|
{
|
||||||
seconds: 1 * 60 * 60,
|
seconds: 1 * 60 * 60,
|
||||||
label: isHydrated.value ? t('time_ago_options.hour_future', 1) : '',
|
label: t('time_ago_options.hour_future', 1),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
seconds: 2 * 60 * 60,
|
seconds: 2 * 60 * 60,
|
||||||
label: isHydrated.value ? t('time_ago_options.hour_future', 2) : '',
|
label: t('time_ago_options.hour_future', 2),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
seconds: 1 * 24 * 60 * 60,
|
seconds: 1 * 24 * 60 * 60,
|
||||||
label: isHydrated.value ? t('time_ago_options.day_future', 1) : '',
|
label: t('time_ago_options.day_future', 1),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
seconds: 2 * 24 * 60 * 60,
|
seconds: 2 * 24 * 60 * 60,
|
||||||
label: isHydrated.value ? t('time_ago_options.day_future', 2) : '',
|
label: t('time_ago_options.day_future', 2),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
seconds: 7 * 24 * 60 * 60,
|
seconds: 7 * 24 * 60 * 60,
|
||||||
label: isHydrated.value ? t('time_ago_options.day_future', 7) : '',
|
label: t('time_ago_options.day_future', 7),
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ function activate() {
|
||||||
ps-3
|
ps-3
|
||||||
pe-1
|
pe-1
|
||||||
ml-1
|
ml-1
|
||||||
:placeholder="isHydrated ? t('nav.search') : ''"
|
:placeholder="t('nav.search')"
|
||||||
pb="1px"
|
pb="1px"
|
||||||
placeholder-text-secondary
|
placeholder-text-secondary
|
||||||
@keydown.down.prevent="shift(1)"
|
@keydown.down.prevent="shift(1)"
|
||||||
|
|
|
@ -19,21 +19,21 @@ const userSettings = useUserSettings()
|
||||||
const tabs = computed<CommonRouteTabOption[]>(() => [
|
const tabs = computed<CommonRouteTabOption[]>(() => [
|
||||||
{
|
{
|
||||||
to: isHydrated.value ? `/${currentServer.value}/explore` : '/explore',
|
to: isHydrated.value ? `/${currentServer.value}/explore` : '/explore',
|
||||||
display: isHydrated.value ? t('tab.posts') : '',
|
display: t('tab.posts'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: isHydrated.value ? `/${currentServer.value}/explore/tags` : '/explore/tags',
|
to: isHydrated.value ? `/${currentServer.value}/explore/tags` : '/explore/tags',
|
||||||
display: isHydrated.value ? t('tab.hashtags') : '',
|
display: t('tab.hashtags'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: isHydrated.value ? `/${currentServer.value}/explore/links` : '/explore/links',
|
to: isHydrated.value ? `/${currentServer.value}/explore/links` : '/explore/links',
|
||||||
display: isHydrated.value ? t('tab.news') : '',
|
display: t('tab.news'),
|
||||||
hide: userSettings.value.preferences.hideNews,
|
hide: userSettings.value.preferences.hideNews,
|
||||||
},
|
},
|
||||||
// This section can only be accessed after logging in
|
// This section can only be accessed after logging in
|
||||||
{
|
{
|
||||||
to: isHydrated.value ? `/${currentServer.value}/explore/users` : '/explore/users',
|
to: isHydrated.value ? `/${currentServer.value}/explore/users` : '/explore/users',
|
||||||
display: isHydrated.value ? t('tab.for_you') : '',
|
display: t('tab.for_you'),
|
||||||
disabled: !isHydrated.value || !currentUser.value,
|
disabled: !isHydrated.value || !currentUser.value,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div min-h-screen flex justify-center items-center>
|
<div min-h-screen flex justify-center items-center>
|
||||||
<div text-center flex="~ col gap-2" items-center>
|
<div text-center flex="~ col gap-2" items-center>
|
||||||
<div i-ri:settings-3-line text-5xl />
|
<div i-ri:settings-3-line text-5xl />
|
||||||
<span text-xl>{{ isHydrated ? $t('settings.select_a_settings') : '' }}</span>
|
<span text-xl>{{ $t('settings.select_a_settings') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -15,16 +15,16 @@ useHydratedHead({
|
||||||
<template #title>
|
<template #title>
|
||||||
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
|
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
|
||||||
<div i-ri:test-tube-line />
|
<div i-ri:test-tube-line />
|
||||||
<span>{{ isHydrated ? $t('settings.notifications.notifications.label') : '' }}</span>
|
<span>{{ $t('settings.notifications.notifications.label') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div text-center mt-10>
|
<div text-center mt-10>
|
||||||
<h1 text-4xl>
|
<h1 text-4xl>
|
||||||
<span sr-only>{{ isHydrated ? $t('settings.notifications.under_construction') : '' }}</span>
|
<span sr-only>{{ $t('settings.notifications.under_construction') }}</span>
|
||||||
🚧
|
🚧
|
||||||
</h1>
|
</h1>
|
||||||
<h3 text-xl>
|
<h3 text-xl>
|
||||||
{{ isHydrated ? $t('settings.notifications.notifications.label') : '' }}
|
{{ $t('settings.notifications.notifications.label') }}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</MainContent>
|
</MainContent>
|
||||||
|
|
Loading…
Reference in a new issue