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

Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
This commit is contained in:
Marcel Müller 2024-05-16 13:17:40 +02:00 committed by Julius Härtl
parent 95148ffe92
commit f6e6d7a834

View file

@ -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')
},