[Closes #8] Added authentication
This commit is contained in:
parent
6eefa137bb
commit
97211cdccd
65 changed files with 5831 additions and 440 deletions
11
app/pages/member/auth/create-account.vue
Normal file
11
app/pages/member/auth/create-account.vue
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import SignupForm from "@/components/SignupForm.vue";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="bg-muted/50 min-h-screen flex-1 rounded-xl md:min-h-min flex items-center justify-center gap-2">
|
||||
<div class="flex w-full max-w-sm flex-col gap-6">
|
||||
<SignupForm />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
11
app/pages/member/auth/login.vue
Normal file
11
app/pages/member/auth/login.vue
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import LoginForm from "@/components/LoginForm.vue";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="bg-muted/50 min-h-screen flex-1 rounded-xl md:min-h-min flex items-center justify-center gap-2">
|
||||
<div class="flex w-full max-w-sm flex-col gap-6">
|
||||
<LoginForm />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
35
app/pages/member/auth/logout.vue
Normal file
35
app/pages/member/auth/logout.vue
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<script setup lang="ts">
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Field, FieldDescription } from "@/components/ui/field";
|
||||
|
||||
import { useAuthStore } from "~/stores/auth";
|
||||
|
||||
const authStore = useAuthStore();
|
||||
await authStore.init();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="bg-muted/50 min-h-screen flex-1 rounded-xl md:min-h-min flex items-center justify-center gap-2">
|
||||
<div class="flex w-full max-w-sm flex-col gap-6">
|
||||
<Card>
|
||||
<CardHeader class="text-center">
|
||||
<CardTitle class="text-xl">Logout</CardTitle>
|
||||
<CardDescription>Are you sure you want to logout?</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<form autocomplete="off" @submit.prevent="authStore.signOut()">
|
||||
<Field>
|
||||
<Button type="submit" variant="destructive">Logout</Button>
|
||||
</Field>
|
||||
</form>
|
||||
</CardContent>
|
||||
</Card>
|
||||
<FieldDescription class="px-6 text-center">
|
||||
<NuxtLink to="/"><Button variant="link">Home</Button></NuxtLink>
|
||||
<NuxtLink to="/"><Button variant="link">Terms of Service</Button></NuxtLink>
|
||||
<NuxtLink to="/"><Button variant="link">Privacy Policy</Button></NuxtLink>
|
||||
</FieldDescription>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Loading…
Add table
Add a link
Reference in a new issue