mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
feat: login via passkey
This commit is contained in:
parent
44c3180df7
commit
bdfbbd0e8f
37 changed files with 1529 additions and 643 deletions
|
@ -1,10 +1,19 @@
|
|||
<script setup lang="ts">
|
||||
import { watch } from 'vue'
|
||||
|
||||
import dayjs from 'dayjs'
|
||||
import { useSettingsStore } from '@/pinia'
|
||||
import gettext from '@/gettext'
|
||||
import loadTranslations from '@/api/translations'
|
||||
|
||||
import 'dayjs/locale/fr'
|
||||
import 'dayjs/locale/ja'
|
||||
import 'dayjs/locale/ko'
|
||||
import 'dayjs/locale/de'
|
||||
import 'dayjs/locale/zh-cn'
|
||||
import 'dayjs/locale/zh-tw'
|
||||
import 'dayjs/locale/pt'
|
||||
import 'dayjs/locale/es'
|
||||
import 'dayjs/locale/it'
|
||||
|
||||
const settings = useSettingsStore()
|
||||
|
||||
const route = useRoute()
|
||||
|
@ -29,6 +38,44 @@ watch(current, v => {
|
|||
|
||||
document.title = `${name()} | Nginx UI`
|
||||
})
|
||||
|
||||
function init() {
|
||||
switch (current.value) {
|
||||
case 'fr':
|
||||
dayjs.locale('fr')
|
||||
break
|
||||
case 'ja':
|
||||
dayjs.locale('ja')
|
||||
break
|
||||
case 'ko':
|
||||
dayjs.locale('ko')
|
||||
break
|
||||
case 'de':
|
||||
dayjs.locale('de')
|
||||
break
|
||||
case 'en':
|
||||
dayjs.locale('en')
|
||||
break
|
||||
case 'zh_TW':
|
||||
dayjs.locale('zh-tw')
|
||||
break
|
||||
case 'pt':
|
||||
dayjs.locale('pt')
|
||||
break
|
||||
case 'es':
|
||||
dayjs.locale('es')
|
||||
break
|
||||
case 'it':
|
||||
dayjs.locale('it')
|
||||
break
|
||||
default:
|
||||
dayjs.locale('zh-cn')
|
||||
}
|
||||
}
|
||||
|
||||
init()
|
||||
|
||||
watch(current, init)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue