mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
fix: document.tile is not translated
This commit is contained in:
parent
c783b962ac
commit
002d9c22ab
4 changed files with 9 additions and 5 deletions
|
@ -7,6 +7,7 @@ import { computed } from 'vue'
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
content?: string
|
content?: string
|
||||||
defaultHeight?: string
|
defaultHeight?: string
|
||||||
|
readonly?: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const emit = defineEmits(['update:content'])
|
const emit = defineEmits(['update:content'])
|
||||||
|
@ -30,6 +31,7 @@ const value = computed({
|
||||||
minHeight: defaultHeight || '100vh',
|
minHeight: defaultHeight || '100vh',
|
||||||
borderRadius: '5px',
|
borderRadius: '5px',
|
||||||
}"
|
}"
|
||||||
|
:readonly="readonly"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,14 @@ const current = ref(gettext.current)
|
||||||
|
|
||||||
const languageAvailable = gettext.available
|
const languageAvailable = gettext.available
|
||||||
|
|
||||||
function init() {
|
async function init() {
|
||||||
if (current.value !== 'en') {
|
if (current.value !== 'en') {
|
||||||
http.get(`/translation/${current.value}`).then(r => {
|
await http.get(`/translation/${current.value}`).then(r => {
|
||||||
gettext.translations[current.value] = r
|
gettext.translations[current.value] = r
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// @ts-expect-error name type
|
||||||
|
document.title = `${route.name?.()} | Nginx UI`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,5 +8,4 @@ export default createGettext({
|
||||||
silent: true,
|
silent: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
export class useGettext {
|
export class useGettext {}
|
||||||
}
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
} from '@ant-design/icons-vue'
|
} from '@ant-design/icons-vue'
|
||||||
import NProgress from 'nprogress'
|
import NProgress from 'nprogress'
|
||||||
|
|
||||||
import gettext from '../gettext'
|
import gettext from '@/gettext'
|
||||||
import { useUserStore } from '@/pinia'
|
import { useUserStore } from '@/pinia'
|
||||||
|
|
||||||
import 'nprogress/nprogress.css'
|
import 'nprogress/nprogress.css'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue