feat: add authenticated admin shell
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-08 22:25:29 -04:00
parent a21d1ae854
commit 86c60f9381
10 changed files with 182 additions and 1 deletions
+30
View File
@@ -0,0 +1,30 @@
<script setup>
import { RouterView } from 'vue-router';
import { useAuth } from '@/composables/useAuth.js';
defineProps({ routed: { type: Boolean, default: true } });
const { principal, signOut } = useAuth();
async function logout() {
await signOut();
window.location.href = '/login';
}
</script>
<template>
<main class="admin-shell">
<aside class="admin-sidebar">
<p class="catalog-kicker">Collector workspace</p>
<h1>Inventory</h1>
<nav aria-label="Admin navigation">
<a href="/admin">Overview</a>
</nav>
<div class="admin-sidebar__footer">
<span>{{ principal?.email }}</span>
<button class="button button--secondary" type="button" @click="logout">Sign out</button>
</div>
</aside>
<section class="admin-shell__content"><RouterView v-if="routed" /></section>
</main>
</template>