Feature: User auth #15

Merged
scott merged 29 commits from scott/kalkutago:feature/user-auth into main 2023-08-27 08:00:57 -04:00
Showing only changes of commit 37426aaa52 - Show all commits

View file

@ -7,8 +7,8 @@ const name = ref("")
const password = ref("")
const signUpWait = ref(false)
const loginWait = ref(false)
const signUpClass = computed(() => `submit button is-success ${signUpWait ? 'is-loading' : ''}`)
const loginClass = computed(() => `submit button is-success ${loginWait ? 'is-loading' : ''}`)
const signUpClass = computed(() => `submit button is-success ${signUpWait.value ? 'is-loading' : ''}`)
const loginClass = computed(() => `submit button is-info ${loginWait.value ? 'is-loading' : ''}`)
async function signUp() {
const $name = name.value
@ -40,6 +40,8 @@ async function login() {
}
}
if(state.user?.name) router.push("/")
</script>
<template>
<div class="modal is-active">
@ -50,7 +52,7 @@ async function login() {
</header>
<section class="modal-card-body">
<div class="field">
<label for="username">Name</label>
<label for="username" class=label>Name</label>
<div class="control">
<input type="text" name="username" class="input" v-model="name" />
</div>