Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ export default defineComponent({
}
},
methods: {
async presentLoader(options = { message: '', backdropDismiss: true }) {
async presentLoader(options = { message: '', backdropDismiss: false }) {
// When having a custom message remove already existing loader
if(options.message && this.loader) this.dismissLoader();

if (!this.loader) {
this.loader = await loadingController
.create({
message: options.message ? translate(options.message) : translate("Click the backdrop to dismiss."),
message: options.message ? translate(options.message) : (options.backdropDismiss ? translate("Click the backdrop to dismiss.") : translate("Loading...")),
translucent: true,
backdropDismiss: options.backdropDismiss
backdropDismiss: options.backdropDismiss || false
});
}
this.loader.present();
Expand Down Expand Up @@ -95,9 +95,9 @@ export default defineComponent({
async mounted() {
this.loader = await loadingController
.create({
message: translate("Click the backdrop to dismiss."),
message: translate("Loading..."),
translucent: true,
backdropDismiss: true
backdropDismiss: false
});
emitter.on('presentLoader', this.presentLoader);
emitter.on('dismissLoader', this.dismissLoader);
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
"Leave page": "Leave page",
"line items": "line items",
"Loading": "Loading",
"Loading...": "Loading...",
"Log file": "Log file",
"Login": "Login",
"Logging in": "Logging in",
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const actions: ActionTree<UserState, RootState> = {
// store the url on which we need to redirect the user after logout api completes in case of SSO enabled
let redirectionUrl = ''

emitter.emit('presentLoader', { message: 'Logging out', backdropDismiss: false })
emitter.emit('presentLoader', { message: 'Logging out' })

// Calling the logout api to flag the user as logged out, only when user is authorised
// if the user is already unauthorised then not calling the logout api as it returns 401 again that results in a loop, thus there is no need to call logout api if the user is unauthorised
Expand Down