frontend: Owner management

This commit is contained in:
Frank Agerholm 2026-01-25 17:00:59 +01:00
commit 994ba0bc01
No known key found for this signature in database
8 changed files with 293 additions and 27 deletions

View file

@ -1,12 +1,34 @@
<script setup>
const { token, loadToken, logout } = useAuth()
const router = useRouter()
if (process.client) {
loadToken()
}
function doLogout() {
logout()
router.push("/login")
}
</script>
<template>
<div class="min-h-screen bg-gray-100 text-gray-900">
<header class="p-4 bg-white shadow">
<div>
<header class="p-4 bg-white shadow flex justify-between">
<nav class="flex gap-4">
<NuxtLink to="/">Dashboard</NuxtLink>
<NuxtLink to="/owners">Owners</NuxtLink>
<NuxtLink to="/servers">Servers</NuxtLink>
<NuxtLink to="/workentries">Work Entries</NuxtLink>
</nav>
<div>
<button
v-if="token"
@click="doLogout"
class="text-red-600 hover:underline"
>
Logout
</button>
</div>
</header>
<main class="p-6">
@ -14,4 +36,3 @@
</main>
</div>
</template>