feature/3_env_file #9

Merged
philipp merged 6 commits from feature/3_env_file into dev 2021-03-05 18:09:16 +00:00
2 changed files with 18 additions and 4 deletions
Showing only changes of commit 20229ab142 - Show all commits

View File

@ -0,0 +1,7 @@
<template>
<div></div>
</template>
<script setup>
//
</script>

View File

@ -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');