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
6 changes: 3 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ initialise({
}
})

async function presentLoader(options = { message: "Click the backdrop to dismiss.", backdropDismiss: true }) {
async function presentLoader(options = { message: '', backdropDismiss: false }) {
// When having a custom message remove already existing loader, if not removed it takes into account the already existing loader
if(options.message && loader.value) dismissLoader();

if (!loader.value) {
loader.value = await loadingController
.create({
message: translate(options.message),
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
});
}
loader.value.present();
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
"Leave page": "Leave page",
"Line status": "Line status",
"Loading": "Loading",
"Loading...": "Loading...",
"Loading cycle count details": "Loading cycle count details",
"Location": "Location",
"Log variance": "Log variance",
Expand Down
4 changes: 2 additions & 2 deletions src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const actions: ActionTree<UserState, RootState> = {
}
}

emitter.emit("presentLoader", { message: "Logging in...", backdropDismiss: false })
emitter.emit("presentLoader", { message: "Logging in..." })
const api_key = await UserService.login(token)

const userProfile = await UserService.getUserProfile(api_key);
Expand Down Expand Up @@ -86,7 +86,7 @@ const actions: ActionTree<UserState, RootState> = {
* Logout user
*/
async logout({ commit, dispatch }) {
emitter.emit('presentLoader', { message: 'Logging out', backdropDismiss: false })
emitter.emit('presentLoader', { message: 'Logging out' })

const authStore = useAuthStore()

Expand Down
Loading