mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2026-02-04 02:56:30 -06:00
Fix problem of broken navigation text in Chinese and set the correct value of html lang (#456)
* feat: set correct html lang value with i18n locale * feat: do not wrap side menu text when locale is chinese --------- Co-authored-by: Katos <7927609+katosdev@users.noreply.github.com>
This commit is contained in:
parent
344489819c
commit
3ca10897bb
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<NuxtLayout>
|
||||
<Html lang="en" :data-theme="theme || 'homebox'" />
|
||||
<Html :lang="locale" :data-theme="theme || 'homebox'" />
|
||||
<Link rel="icon" type="image/svg" href="/favicon.svg"></Link>
|
||||
<Link rel="apple-touch-icon" href="/apple-touch-icon.png" size="180x180" />
|
||||
<Link rel="mask-icon" href="/mask-icon.svg" color="#5b7f67" />
|
||||
@ -11,5 +11,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { theme } = useTheme();
|
||||
|
||||
const { locale } = useI18n();
|
||||
</script>
|
||||
|
||||
@ -79,6 +79,7 @@
|
||||
:to="n.to"
|
||||
:class="{
|
||||
'bg-secondary text-secondary-content': n.active?.value,
|
||||
'text-nowrap': typeof locale === 'string' && locale.startsWith('zh-'),
|
||||
}"
|
||||
>
|
||||
<component :is="n.icon" class="mr-4 size-6" />
|
||||
@ -114,7 +115,7 @@
|
||||
import MdiMenu from "~icons/mdi/menu";
|
||||
import MdiPlus from "~icons/mdi/plus";
|
||||
|
||||
const { t } = useI18n();
|
||||
const { t, locale } = useI18n();
|
||||
const username = computed(() => authCtx.user?.name || "User");
|
||||
|
||||
const preferences = useViewPreferences();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user