This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user