feat: auth w.i.p.

This commit is contained in:
Florian Sylvain
2024-10-09 22:44:28 +02:00
parent 7afbe2b4c3
commit 87e894ab50
16 changed files with 247 additions and 43 deletions
+17 -2
View File
@@ -1,14 +1,29 @@
<script setup lang="ts">
import { RouterView } from 'vue-router'
import { RouterView, useRouter } from 'vue-router'
import { useSettingsStore } from './stores/settings'
import FooterBar from './components/FooterBar.vue'
import { defineAsyncComponent } from 'vue'
const settingsStore = useSettingsStore()
const router = useRouter()
const excludedNavBarRoutes = ['/login', '/register']
const NavBarLoaded = defineAsyncComponent(() => import('./components/NavBar.vue'))
</script>
<template>
<VThemeProvider :theme="settingsStore.darkModeEnabled ? 'dark' : 'light'" with-background>
<VApp>
<RouterView />
<VLayout>
<NavBarLoaded v-if="!excludedNavBarRoutes.includes(router.currentRoute.value.path)" />
<VMain>
<section class="pa-4 d-flex flex-column ga-4 w-100 h-100">
<RouterView />
</section>
</VMain>
<FooterBar app />
</VLayout>
</VApp>
</VThemeProvider>
</template>