import { createApp } from 'vue'; import { createPinia } from 'pinia'; import App from './App.vue'; import { router } from './router'; import { AUTH_STORAGE_KEY } from '@KTXC/stores/userStore'; import { useL10nStore } from '@KTXC/stores/l10nStore'; import { i18n } from '@KTXC/l10n/runtime'; import vuetify from './plugins/vuetify/index'; // Material Design Icons (Vuetify mdi icon set) import '@mdi/font/css/materialdesignicons.min.css'; import '@fontsource/public-sans/index.css' // The public app is only served when the server has determined the user is // unauthenticated. Clear any stale identity persisted by a previous session, // otherwise the shared router guard would treat the user as authenticated // and render the private shell without any of its state loaded. localStorage.removeItem(AUTH_STORAGE_KEY); const app = createApp(App); const pinia = createPinia(); app.use(pinia); app.use(router); app.use(i18n); app.use(vuetify); (async () => { // No session yet: locale comes from browser preferences alone await useL10nStore().init(null); app.mount('#app'); })();