Initial Version
This commit is contained in:
39
core/src/public.ts
Normal file
39
core/src/public.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { createApp } from 'vue';
|
||||
import { createPinia } from 'pinia';
|
||||
import App from './App.vue';
|
||||
import { router } from './router';
|
||||
import vuetify from './plugins/vuetify/index';
|
||||
import '@KTXC/scss/style.scss';
|
||||
|
||||
// Material Design Icons (Vuetify mdi icon set)
|
||||
import '@mdi/font/css/materialdesignicons.min.css';
|
||||
|
||||
// google-fonts
|
||||
import '@fontsource/public-sans/400.css';
|
||||
import '@fontsource/public-sans/500.css';
|
||||
import '@fontsource/public-sans/600.css';
|
||||
import '@fontsource/public-sans/700.css';
|
||||
|
||||
// The public app is served when the user has no valid server session.
|
||||
// Clear any stale identity data from localStorage to ensure the client
|
||||
// state matches the server's determination that the user is unauthenticated.
|
||||
//localStorage.removeItem('identityStore.self');
|
||||
|
||||
const app = createApp(App);
|
||||
const pinia = createPinia();
|
||||
app.use(pinia);
|
||||
app.use(router);
|
||||
app.use(vuetify);
|
||||
|
||||
// Wait for router to be ready, then ensure we're on a public route
|
||||
//router.isReady().then(() => {
|
||||
// If the current route requires auth, redirect to login
|
||||
// This handles the case where user navigates to / with an expired session
|
||||
//const currentRoute = router.currentRoute.value;
|
||||
//const requiresAuth = currentRoute.matched.some(record => record.meta?.requiresAuth);
|
||||
//if (requiresAuth || currentRoute.path === '/') {
|
||||
// router.replace('/login');
|
||||
//}
|
||||
//});
|
||||
|
||||
app.mount('#app');
|
||||
Reference in New Issue
Block a user