File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 3535 <input type =" password" placeholder =" Password" v-model =" formData.password" class =" matcha-input" >
3636 <span class =" matcha-input-error" >{{ passwordErrorHandler(errors[0]) }}</span >
3737 </ValidationProvider >
38- <input type =" submit" :disabled =" invalid" value =" Sign Up" v-bind:class =" {'auth-sub-container-content-submit-button': true, 'opacity-50': invalid, 'cursor-pointer': !invalid}" >
38+ <input v-if =" !submitted" type =" submit" :disabled =" invalid" value =" Sign Up" v-bind:class =" {'auth-sub-container-content-submit-button': true, 'opacity-50': invalid, 'cursor-pointer': !invalid}" >
39+ <div v-else class =" flex items-center justify-center mt-4" >
40+ <img class =" h-12" src =" ../../assets/loading.svg" >
41+ </div >
3942 </form >
4043 </ValidationObserver >
4144 </div >
@@ -69,6 +72,7 @@ export default {
6972 happened: false ,
7073 message: ' ' ,
7174 },
75+ submitted: false ,
7276 }),
7377 methods: {
7478 passwordErrorHandler (error ) {
@@ -79,11 +83,14 @@ export default {
7983 },
8084 async onSubmit () {
8185 try {
86+ this .submitted = true ;
8287 this .clearError ();
8388 await this .signUpUser (this .formData );
8489 this .confirmationEmailSent = true ;
90+ this .submitted = false ;
8591 } catch (error) {
8692 this .displayError (this .$errorMessenger (error));
93+ this .submitted = false ;
8794 }
8895 },
8996 async signUpUser (user ) {
You can’t perform that action at this time.
0 commit comments