Add more user feedback (loading buttons, empty states)

This commit is contained in:
2024-09-24 16:36:30 +02:00
parent 8329a6ae09
commit fd4c1d5a65
8 changed files with 171 additions and 20 deletions

View File

@@ -6,11 +6,14 @@ import { useAccountStore } from '@/data/stores/accountStore';
const accountStore = useAccountStore()
const showRegisterCard = defineModel("showRegisterCard", { type: Boolean, default: false })
const loginInProgress = ref(false)
const username = ref("duranduran")
const password = ref("H4nn0ver")
function startLogin() {
accountStore.login(username.value, password.value)
async function startLogin() {
loginInProgress.value = true
await accountStore.login(username.value, password.value)
loginInProgress.value = false
}
</script>
@@ -33,6 +36,7 @@ function startLogin() {
<outlined-button
@click="showRegisterCard = true"
prepend-icon="mdi-plus"
:disabled="loginInProgress"
>
{{ $t('account.noAccountRegister') }}
</outlined-button>
@@ -40,6 +44,7 @@ function startLogin() {
<outlined-button
append-icon="mdi-arrow-right"
@click="startLogin"
:loading="loginInProgress"
>
{{ $t('menu.login') }}
</outlined-button>