Big formatting spree
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m50s

This commit is contained in:
2026-04-29 09:06:41 +01:00
parent b41e67fe1a
commit 3844a32751
76 changed files with 3146 additions and 2788 deletions

View File

@@ -12,29 +12,39 @@ const username = ref("");
const password = ref("");
async function handleLogin() {
await auth.logIn(username.value, password.value);
if (auth.loggedIn && route.query.redirect) {
router.push(route.query.redirect);
}
await auth.logIn(username.value, password.value);
if (auth.loggedIn && route.query.redirect) {
router.push(route.query.redirect);
}
}
function handleLogout() {
auth.logOut();
auth.logOut();
}
</script>
<template>
<div v-if="auth.loggedIn" class="flex flex-col">
<h1>Logged in</h1>
<p>{{ auth.user.id }}</p>
<p>{{ auth.user.username }}</p>
<p>{{ auth.user.admin }}</p>
<Button @click="handleLogout">Log Out</Button>
</div>
<div v-else class="flex flex-col">
<h1>Login</h1>
<input type="text" v-model="username" placeholder="Username" @keyup.enter="handleLogin" />
<input type="password" v-model="password" placeholder="Password" @keyup.enter="handleLogin" />
<Button @click="handleLogin">Log In</Button>
</div>
<div v-if="auth.loggedIn" class="flex flex-col">
<h1>Logged in</h1>
<p>{{ auth.user.id }}</p>
<p>{{ auth.user.username }}</p>
<p>{{ auth.user.admin }}</p>
<Button @click="handleLogout">Log Out</Button>
</div>
<div v-else class="flex flex-col">
<h1>Login</h1>
<input
type="text"
v-model="username"
placeholder="Username"
@keyup.enter="handleLogin"
/>
<input
type="password"
v-model="password"
placeholder="Password"
@keyup.enter="handleLogin"
/>
<Button @click="handleLogin">Log In</Button>
</div>
</template>