parent
5a5261d6b0
commit
20229ab142
7
src/components/EnvError.vue
Normal file
7
src/components/EnvError.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
//
|
||||
</script>
|
15
src/main.js
15
src/main.js
@ -21,21 +21,28 @@ const i18n = createI18n({
|
||||
});
|
||||
|
||||
// ---------------
|
||||
const EnvError = import('./components/EnvError.vue');
|
||||
const Home = import('./components/Home.vue');
|
||||
const Imprint = import('./components/Imprint.vue');
|
||||
const Privacy = import('./components/Privacy.vue');
|
||||
const Register = import('./components/Register.vue');
|
||||
const Profile = import('./components/Profile.vue');
|
||||
//
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes: [
|
||||
let routes = [];
|
||||
if (config.baseurl && config.documentserver_key) {
|
||||
routes = [
|
||||
{ path: '/', component: Home },
|
||||
{ path: '/imprint', component: Imprint },
|
||||
{ path: '/privacy', component: Privacy },
|
||||
{ path: '/register', component: Register },
|
||||
{ path: '/profile', component: Profile }
|
||||
]
|
||||
];
|
||||
} else {
|
||||
routes = [ { path: '/*', component: EnvError } ];
|
||||
}
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes
|
||||
});
|
||||
// ---------------
|
||||
createApp(App).use(Toast).use(i18n).use(router).mount('#app');
|
||||
|
Loading…
x
Reference in New Issue
Block a user