Skip to content

Commit b07a489

Browse files
committed
reset password loading icon
1 parent 9e8f2b0 commit b07a489

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

frontend/src/views/auth/ResetPassword.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525
<input type="password" placeholder="Repeat Password" v-model="formData.passwordRepeat" class="matcha-input mt-4">
2626
<span class="matcha-input-error">{{ passwordErrorHandler(errors[0]) }}</span>
2727
</ValidationProvider>
28-
<input type="submit" :disabled="invalid" value="Reset password" v-bind:class="{'auth-sub-container-content-submit-button': true, 'opacity-50': invalid, 'cursor-pointer': !invalid}">
28+
<input v-if="!submitted" type="submit" :disabled="invalid" value="Reset password" v-bind:class="{'auth-sub-container-content-submit-button': true, 'opacity-50': invalid, 'cursor-pointer': !invalid}">
29+
<div v-else class="flex items-center justify-center mt-4">
30+
<img class="h-12" src="../../assets/loading.svg">
31+
</div>
2932
</form>
3033
</ValidationObserver>
3134
</div>
@@ -56,6 +59,7 @@ export default {
5659
happened: false,
5760
message: '',
5861
},
62+
submitted: false,
5963
}),
6064
methods: {
6165
passwordErrorHandler(error) {
@@ -69,11 +73,14 @@ export default {
6973
},
7074
async onSubmit() {
7175
try {
76+
this.submitted = true;
7277
this.clearError();
7378
await this.resetPassword();
7479
this.passwordHasBeenReset = true;
80+
this.submitted = false;
7581
} catch (error) {
7682
this.displayError(this.$errorMessenger(error));
83+
this.submitted = false;
7784
}
7885
},
7986
async checkToken() {

0 commit comments

Comments
 (0)