Refactor: Extract sidebar navigation from individual views into a new AppSidebar component.

This commit is contained in:
xds
2026-02-07 15:04:12 +03:00
parent 7f8ce19cb1
commit 1b9fddd209
8 changed files with 774 additions and 948 deletions

View File

@@ -1,13 +1,28 @@
<script setup>
import { RouterView } from 'vue-router'
import { RouterView, useRoute } from 'vue-router'
import AppSidebar from './components/AppSidebar.vue'
const route = useRoute()
</script>
<template>
<RouterView v-slot="{ Component }">
<transition name="fade" mode="out-in">
<component :is="Component" />
</transition>
</RouterView>
<!-- Login Layout (Full Screen) -->
<div v-if="route.name === 'login'" class="h-screen w-full">
<RouterView />
</div>
<!-- Main Layout (Sidebar + Content) -->
<div v-else class="flex h-screen bg-slate-900 text-slate-100 font-sans overflow-hidden">
<AppSidebar />
<div class="flex-1 h-full overflow-hidden relative">
<RouterView v-slot="{ Component }">
<transition name="fade" mode="out-in">
<component :is="Component" />
</transition>
</RouterView>
</div>
</div>
</template>
<style>