This commit is contained in:
@@ -324,33 +324,15 @@ export default {
|
||||
//this smells bad but it works
|
||||
vm.$root.$gz = window.$gz;
|
||||
|
||||
// //Capture open object type and id if present
|
||||
// //localhost:8080/login?type=2&id=22
|
||||
|
||||
// if (window.location.search) {
|
||||
// //https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
|
||||
// var searchParams = new URLSearchParams(window.location.search);
|
||||
// var openObject = {};
|
||||
// //data should be format for open-object-handler
|
||||
// // { type: [AYATYPE], id: [RECORDID] }
|
||||
// if (searchParams.has("type")) {
|
||||
// openObject.type = Number(searchParams.get("type"));
|
||||
// if (searchParams.has("id")) {
|
||||
// openObject.id = Number(searchParams.get("id"));
|
||||
// }
|
||||
// window.$gz.store.commit("setOpenObject", openObject);
|
||||
// }
|
||||
// }
|
||||
|
||||
//redirect to login if not authenticated
|
||||
if (!vm.$store.state.authenticated) {
|
||||
vm.$router.push("login");
|
||||
} else {
|
||||
//this can be safely called any time, it checks if there is an open object in store and
|
||||
//opens it or if not just returns
|
||||
// window.$gz.eventBus.$emit("openobject", null);
|
||||
//If a direct open path was being used but user is not logged in this will catch it
|
||||
//otherwise they will just go on to that path directly
|
||||
vm.$router.push({
|
||||
name: "login",
|
||||
params: { topath: window.location.pathname }
|
||||
});
|
||||
}
|
||||
|
||||
//RELOAD / REFRESH HANDLING
|
||||
//Restart notification polling due to refresh?
|
||||
if (window.$gz.store.state.authenticated) {
|
||||
|
||||
Reference in New Issue
Block a user