This commit is contained in:
2025-12-16 03:42:18 +00:00
parent 9681143719
commit 52757b05f9
9 changed files with 159 additions and 38 deletions

View File

@@ -23,7 +23,7 @@ async function post() {
</script>
<template>
<div v-if="auth.loggedIn">
<div v-if="auth.loggedIn" class="flex-col">
<h1>Create Post</h1>
<input type="text" v-model="title" placeholder="Title" />
<textarea v-model="content" placeholder="Content"></textarea>

View File

@@ -12,12 +12,13 @@ function handleLogin() {
</script>
<template>
<div v-if="auth.loggedIn">
<div v-if="auth.loggedIn" class="flex-col">
<h1>Logged in</h1>
<p>{{ auth.user.ID }}</p>
<p>{{ auth.user.id }}</p>
<p>{{ auth.user.username }}</p>
<p>{{ auth.user.admin }}</p>
</div>
<div v-else>
<div v-else class="flex-col">
<h1>Create User</h1>
<input type="text" v-model="username" placeholder="Username" />
<input type="password" v-model="password" placeholder="Password" />

View File

@@ -16,13 +16,14 @@ function handleLogout() {
</script>
<template>
<div v-if="auth.loggedIn">
<div v-if="auth.loggedIn" class="flex-col">
<h1>Logged in</h1>
<p>{{ auth.user.ID }}</p>
<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>
<div v-else class="flex-col">
<h1>Login</h1>
<input type="text" v-model="username" placeholder="Username" />
<input type="password" v-model="password" placeholder="Password" />