Initial commit: 网络验证平台

This commit is contained in:
Admin
2026-04-27 17:22:56 +08:00
commit afe67d704e
780 changed files with 88960 additions and 0 deletions
File diff suppressed because it is too large Load Diff
+18
View File
@@ -0,0 +1,18 @@
import { useStorage } from '@vueuse/core'
export type Language = 'en' | 'zh'
export const SUPPORTED_LOCALES = new Set<Language>([
'en',
'zh',
])
export const DEFAULT_LOCALE: Language = 'zh'
export const appLocale = useStorage<Language>('app-locale', DEFAULT_LOCALE)
watch(appLocale, (newLocale) => {
if (!SUPPORTED_LOCALES.has(newLocale)) {
appLocale.value = DEFAULT_LOCALE
}
}, { immediate: true })
+22
View File
@@ -0,0 +1,22 @@
import type { App } from 'vue'
import { createI18n } from 'vue-i18n'
import type { Language } from '.'
import { appLocale, DEFAULT_LOCALE } from '.'
import en from './en.json'
import zh from './zh.json'
export function setupI18n(app: App) {
const i18n = createI18n({
legacy: false,
locale: appLocale.value,
fallbackLocale: DEFAULT_LOCALE,
messages: <Record<Language, Record<string, any>>>{
zh,
en,
},
})
app.use(i18n)
}
File diff suppressed because it is too large Load Diff