This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user