1
0
Fork 0
forked from TWS/kalkutago

WIP: Add busy indicators to login view

This commit is contained in:
D. Scott Boggs 2023-08-23 06:44:30 -04:00
parent 68e9b15da9
commit 7d77f50c29

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>