mirror of
https://github.com/Floriansylvain/snippets-manager-front.git
synced 2026-08-20 03:53:38 +02:00
feat: auth w.i.p.
This commit is contained in:
+17
-2
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user