Files
kite/frontend/src/App.vue
T
curo1305 aa957d6c50 feat(02-06): auth layout switching + admin role guard (GAPs 2, 3, 4)
- App.vue: conditionally renders AuthLayout for auth routes, app shell otherwise
- router/index.js: meta.layout='auth' on all four auth routes
- router/index.js: meta.requiresAdmin=true on /admin route
- router/index.js: beforeEach role check redirects non-admin to /
- router/index.js: /account redirects to /settings
2026-05-31 20:37:46 +02:00

22 lines
597 B
Vue

<template>
<AuthLayout v-if="route.meta.layout === 'auth'" />
<div v-else class="flex h-screen overflow-hidden">
<AppSidebar />
<main class="flex-1 overflow-y-auto">
<router-view />
</main>
</div>
</template>
<script setup>
import { onMounted } from 'vue'
import { useRoute } from 'vue-router'
import AppSidebar from './components/layout/AppSidebar.vue'
import AuthLayout from './layouts/AuthLayout.vue'
import { useTopicsStore } from './stores/topics.js'
const route = useRoute()
const topicsStore = useTopicsStore()
onMounted(() => topicsStore.fetchTopics())
</script>