adding loggedIn to auth

This commit is contained in:
2025-12-10 04:43:18 +00:00
parent 0458e1ed09
commit f5bf580abb
11 changed files with 26 additions and 9 deletions

View File

@@ -5,7 +5,6 @@ import { useAuthStore } from "@/stores/auth";
const auth = useAuthStore();
const username = ref("");
const password = ref("");
const loggedIn = computed(() => !!auth.user.username);
function handleLogin() {
auth.createUser(username.value, password.value);
@@ -13,7 +12,7 @@ function handleLogin() {
</script>
<template>
<div v-if="loggedIn">
<div v-if="auth.loggedIn">
<h1>Logged in</h1>
<p>{{ auth.user.ID }}</p>
<p>{{ auth.user.username }}</p>