revert: "feat: display i18n text on SSR"
This reverts commit cafc995dde
.
This commit is contained in:
parent
e9dccc9ef5
commit
a41a31732b
|
@ -66,7 +66,7 @@ const noUserVisual = computed(() => isMastoInitialised.value && props.userOnly &
|
||||||
<div :class="icon" text-xl />
|
<div :class="icon" text-xl />
|
||||||
</slot>
|
</slot>
|
||||||
<slot>
|
<slot>
|
||||||
<span block sm:hidden xl:block>{{ text }}</span>
|
<span block sm:hidden xl:block>{{ isHydrated ? text : ' ' }}</span>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
</CommonTooltip>
|
</CommonTooltip>
|
||||||
|
|
|
@ -3,6 +3,7 @@ const query = ref('')
|
||||||
const { accounts, hashtags, loading, statuses } = useSearch(query)
|
const { accounts, hashtags, loading, statuses } = useSearch(query)
|
||||||
const index = ref(0)
|
const index = ref(0)
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
const el = ref<HTMLElement>()
|
const el = ref<HTMLElement>()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { focused } = useFocusWithin(el)
|
const { focused } = useFocusWithin(el)
|
||||||
|
@ -65,7 +66,7 @@ const activate = () => {
|
||||||
bg-transparent
|
bg-transparent
|
||||||
outline="focus:none"
|
outline="focus:none"
|
||||||
pe-4
|
pe-4
|
||||||
:placeholder="$t('nav.search')"
|
:placeholder="isHydrated ? t('nav.search') : ''"
|
||||||
pb="1px"
|
pb="1px"
|
||||||
placeholder-text-secondary
|
placeholder-text-secondary
|
||||||
@keydown.down.prevent="shift(1)"
|
@keydown.down.prevent="shift(1)"
|
||||||
|
@ -77,7 +78,7 @@ const activate = () => {
|
||||||
<div left-0 top-12 absolute w-full z10 group-focus-within="pointer-events-auto visible" invisible pointer-events-none>
|
<div left-0 top-12 absolute w-full z10 group-focus-within="pointer-events-auto visible" invisible pointer-events-none>
|
||||||
<div w-full bg-base border="~ base" rounded-3 max-h-100 overflow-auto py2>
|
<div w-full bg-base border="~ base" rounded-3 max-h-100 overflow-auto py2>
|
||||||
<span v-if="query.trim().length === 0" block text-center text-sm text-secondary>
|
<span v-if="query.trim().length === 0" block text-center text-sm text-secondary>
|
||||||
{{ $t('search.search_desc') }}
|
{{ t('search.search_desc') }}
|
||||||
</span>
|
</span>
|
||||||
<template v-else-if="!loading">
|
<template v-else-if="!loading">
|
||||||
<template v-if="results.length > 0">
|
<template v-if="results.length > 0">
|
||||||
|
@ -89,7 +90,7 @@ const activate = () => {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<span v-else block text-center text-sm text-secondary>
|
<span v-else block text-center text-sm text-secondary>
|
||||||
{{ $t('search.search_empty') }}
|
{{ t('search.search_empty') }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|
|
@ -4,20 +4,20 @@ const { t } = useI18n()
|
||||||
const tabs = $computed(() => [
|
const tabs = $computed(() => [
|
||||||
{
|
{
|
||||||
to: isHydrated.value ? `/${currentServer.value}/explore` : '/explore',
|
to: isHydrated.value ? `/${currentServer.value}/explore` : '/explore',
|
||||||
display: t('tab.posts'),
|
display: isHydrated.value ? t('tab.posts') : '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: isHydrated.value ? `/${currentServer.value}/explore/tags` : '/explore/tags',
|
to: isHydrated.value ? `/${currentServer.value}/explore/tags` : '/explore/tags',
|
||||||
display: t('tab.hashtags'),
|
display: isHydrated.value ? t('tab.hashtags') : '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: isHydrated.value ? `/${currentServer.value}/explore/links` : '/explore/links',
|
to: isHydrated.value ? `/${currentServer.value}/explore/links` : '/explore/links',
|
||||||
display: t('tab.news'),
|
display: isHydrated.value ? t('tab.news') : '',
|
||||||
},
|
},
|
||||||
// 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: t('tab.for_you'),
|
display: isHydrated.value ? t('tab.for_you') : '',
|
||||||
disabled: !isMastoInitialised.value || !currentUser.value,
|
disabled: !isMastoInitialised.value || !currentUser.value,
|
||||||
},
|
},
|
||||||
] as const)
|
] as const)
|
||||||
|
|
|
@ -10,12 +10,12 @@ const tabs = $computed(() => [
|
||||||
{
|
{
|
||||||
name: 'all',
|
name: 'all',
|
||||||
to: '/notifications',
|
to: '/notifications',
|
||||||
display: t('tab.notifications_all'),
|
display: isHydrated.value ? t('tab.notifications_all') : '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'mention',
|
name: 'mention',
|
||||||
to: '/notifications/mention',
|
to: '/notifications/mention',
|
||||||
display: t('tab.notifications_mention'),
|
display: isHydrated.value ? t('tab.notifications_mention') : '',
|
||||||
},
|
},
|
||||||
] as const)
|
] as const)
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue