fix(login): Prevent submitting the login form multiple times

Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
pull/45352/head
Marcel Müller 2024-05-16 13:17:40 +07:00 committed by Julius Härtl
parent 95148ffe92
commit f6e6d7a834
1 changed files with 7 additions and 1 deletions

@ -274,7 +274,13 @@ export default {
updateUsername() {
this.$emit('update:username', this.user)
},
submit() {
submit(event) {
if (this.loading) {
// Prevent the form from being submitted twice
event.preventDefault()
return
}
this.loading = true
this.$emit('submit')
},