29 lines
995 B
Vue
29 lines
995 B
Vue
<script setup lang="ts">
|
|
const auth = useAuthStore()
|
|
|
|
// Redirect to login if not authenticated
|
|
if (!auth.isAuthenticated) {
|
|
navigateTo('/login')
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div class="h-screen flex flex-col bg-gray-950 text-gray-100">
|
|
<!-- Top bar -->
|
|
<header class="h-12 flex items-center justify-between px-4 bg-gray-900 border-b border-gray-800 shrink-0">
|
|
<div class="flex items-center gap-3">
|
|
<h1 class="text-lg font-bold tracking-wider text-wraith-400">WRAITH</h1>
|
|
</div>
|
|
<div class="flex items-center gap-3">
|
|
<NuxtLink to="/vault" class="text-sm text-gray-400 hover:text-white">Vault</NuxtLink>
|
|
<NuxtLink to="/settings" class="text-sm text-gray-400 hover:text-white">Settings</NuxtLink>
|
|
<button @click="auth.logout()" class="text-sm text-gray-500 hover:text-red-400">Logout</button>
|
|
</div>
|
|
</header>
|
|
<!-- Main content -->
|
|
<div class="flex-1 flex overflow-hidden">
|
|
<slot />
|
|
</div>
|
|
</div>
|
|
</template>
|