added auth support
This commit is contained in:
parent
869be69d67
commit
f3dbaef776
7 changed files with 112 additions and 3 deletions
31
app/components/forms/auth/login-form.vue
Normal file
31
app/components/forms/auth/login-form.vue
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<script lang="ts" setup>
|
||||
const email = ref("");
|
||||
const password = ref("");
|
||||
const {login} = useAuth();
|
||||
|
||||
const handleLogin = () => login(email.value, password.value)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<form class="password-form" @submit.prevent="handleLogin">
|
||||
<div class="form-group">
|
||||
<label for="email">Email</label>
|
||||
<input id="email" v-model="email" type="email"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="password">Password</label>
|
||||
<input id="password" v-model="password" type="password"/>
|
||||
</div>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.form-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue