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 2222 <input type =" password" placeholder =" Password" v-model =" formData.password" class =" matcha-input" >
2323 <span class =" matcha-input-error" >{{ errors[0] }}</span >
2424 </ValidationProvider >
25- <input type =" submit" :disabled =" invalid" value =" Sign In" v-bind:class =" {'auth-sub-container-content-submit-button': true, 'opacity-50': invalid, 'cursor-pointer': !invalid}" >
25+ <input v-if =" !submitted" type =" submit" :disabled =" invalid" value =" Sign In" v-bind:class =" {'auth-sub-container-content-submit-button': true, 'opacity-50': invalid, 'cursor-pointer': !invalid}" >
26+ <div v-else class =" flex items-center justify-center mt-4" >
27+ <img class =" h-12" src =" ../../assets/loading.svg" >
28+ </div >
2629 </form >
2730 </ValidationObserver >
2831 </div >
@@ -52,10 +55,12 @@ export default {
5255 happened: false ,
5356 message: ' ' ,
5457 },
58+ submitted: false ,
5559 }),
5660 methods: {
5761 async onSubmit () {
5862 try {
63+ this .submitted = true ;
5964 this .clearError ();
6065 const response = await this .signInUser (this .formData );
6166 localStorage .setItem (process .env .VUE_APP_ACCESS_TOKEN , response .data .return .access_token );
@@ -68,8 +73,10 @@ export default {
6873 } else {
6974 this .$router .push (' /onboarding' );
7075 }
76+ this .submitted = false ;
7177 } catch (error) {
7278 this .displayError (this .$errorMessenger (error));
79+ this .submitted = false ;
7380 }
7481 },
7582 async signInUser (user ) {
You can’t perform that action at this time.
0 commit comments