diff --git a/src/functions/function-show-error-message.js b/src/functions/function-show-error-message.js index 1aacce4..21fb5ca 100644 --- a/src/functions/function-show-error-message.js +++ b/src/functions/function-show-error-message.js @@ -1,6 +1,7 @@ -import { Dialog } from 'quasar' +import { Dialog, Loading } from 'quasar' export function showErrorMessage (errorMessage) { + Loading.hide() Dialog.create({ title: 'Error', message: errorMessage diff --git a/src/store/store-auth.js b/src/store/store-auth.js index a86044c..8d39215 100644 --- a/src/store/store-auth.js +++ b/src/store/store-auth.js @@ -1,4 +1,4 @@ -import { LocalStorage } from 'quasar' +import { LocalStorage, Loading } from 'quasar' import { firebaseAuth } from 'boot/firebase' import { showErrorMessage } from 'src/functions/function-show-error-message' @@ -15,6 +15,7 @@ const mutations = { const actions = { registerUser ({ commit }, payload) { + Loading.show() firebaseAuth.createUserWithEmailAndPassword(payload.email, payload.password) .then(response => { console.log('response: ', response) @@ -24,6 +25,7 @@ const actions = { }) }, loginUser ({ commit }, payload) { + Loading.show() firebaseAuth.signInWithEmailAndPassword(payload.email, payload.password) .then(response => { console.log('response: ', response) @@ -37,6 +39,7 @@ const actions = { }, handleAuthStateChange ({ commit }) { firebaseAuth.onAuthStateChanged(user => { + Loading.hide() if (user) { commit('setLoggedIn', true) /* eslint handle-callback-err: "off" */