This commit is contained in:
2019-12-11 21:23:37 +00:00
parent a1755864de
commit a86df67e11
3 changed files with 23 additions and 4 deletions

View File

@@ -166,6 +166,10 @@ export default {
if (!this.$store.state.authenticated) {
this.$router.push({ name: "login" });
}
//FUTURE: If need to detect a reload, this works reliably
//OK if here then is this a reliable way to detect a reload or refresh or re-open of the app from a closed window but still authenticated?
//console.log("APP.VUE::Mounted=>RELOAD DETECTED?");
},
computed: {
isAuthenticated() {

View File

@@ -83,6 +83,10 @@ function handleError(action, error, route, reject) {
error.message.includes("Network request failed")
) {
window.$gz.store.commit("logItem", "Network error");
window.$gz.eventBus.$emit(
"notify-error",
window.$gz.locale.get("ErrorServerUnresponsive")
);
//note: using locale key in square brackets
return reject("[ErrorServerUnresponsive]");
//throw "Error: unable to contact server";