Files
codex-proxy-rs/frontend/src/main.ts
T
ZyyandCodex 2818edb9fc perf(i18n): load language resources on demand
Load and cache the selected language with synchronized UI messages. Keep the latest selection when loads overlap and render missing messages as empty text without language fallback.

Co-authored-by: Codex <noreply@openai.com>
2026-10-24 00:05:38 +08:00

31 lines
711 B
TypeScript

import { createApp } from 'vue'
import App from './App.vue'
import { i18n, setLocale } from './i18n'
import { readInitialLocale } from './i18n/locale'
import { authPlugin } from './plugins/auth'
import { router } from './router'
import { pinia } from './stores'
import { useThemeStore } from './stores/modules/theme'
import '@fontsource-variable/inter'
import '@fontsource-variable/jetbrains-mono'
import '@codex-proxy/ui/styles.css'
import './styles/index.css'
const app = createApp(App)
app.use(pinia)
useThemeStore(pinia).initializeTheme()
async function mountApp() {
await setLocale(readInitialLocale())
app.use(i18n)
app.use(router)
app.use(authPlugin)
app.mount('#app')
}
void mountApp()