Skip to content

Commit

Permalink
Merge pull request #89 from amansinghbais/88-demoLogin
Browse files Browse the repository at this point in the history
Improved: added spinner in launchpad login next button to be shown while checkLoginOption request accomplishes (#88)
  • Loading branch information
ymaheshwari1 authored Aug 23, 2024
2 parents 09933e3 + b56f8cd commit a09e8ed
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
<div class="ion-padding">
<!-- @keyup.enter.stop to stop the form from submitting on enter press as keyup.enter is already bound
through the form above, causing both the form and the button to submit. -->
<ion-button color="primary" expand="block" @click.prevent="setOms()" @keyup.enter.stop>
<ion-button color="primary" expand="block" @click.prevent="isCheckingOms ? '' : setOms()" @keyup.enter.stop>
{{ $t("Next") }}
<ion-icon slot="end" :icon="arrowForwardOutline" />
<ion-spinner v-if="isCheckingOms" name="crescent" data-spinner-size="medium" slot="end" />
<ion-icon v-else slot="end" :icon="arrowForwardOutline" />
</ion-button>
</div>
</section>
Expand Down Expand Up @@ -106,6 +107,7 @@ export default defineComponent({
isConfirmingForActiveSession: false,
loader: null as any,
loginOption: {} as any,
isCheckingOms: false,
isLoggingIn: false
};
},
Expand Down Expand Up @@ -212,6 +214,8 @@ export default defineComponent({
return
}
this.isCheckingOms = true
const instanceURL = this.instanceUrl.trim().toLowerCase();
if (!this.baseURL) this.authStore.setOMS(this.alias[instanceURL] ? this.alias[instanceURL] : instanceURL);
Expand All @@ -226,6 +230,7 @@ export default defineComponent({
} else {
this.toggleOmsInput()
}
this.isCheckingOms = false
},
async fetchLoginOptions() {
this.loginOption = {}
Expand Down

0 comments on commit a09e8ed

Please sign in to comment.