This commit is contained in:
@@ -276,14 +276,15 @@ export default {
|
||||
window.$gz.eventBus.$off();
|
||||
},
|
||||
mounted() {
|
||||
// this.$vuetify.theme.dark = true;
|
||||
this.$root.$gzconfirm = this.$refs.gzconfirm.open;
|
||||
this.$root.$gznotify = this.$refs.gznotify.addNotification;
|
||||
let vm = this;
|
||||
vm.$vuetify.theme.dark = vm.$store.state.darkMode;
|
||||
vm.$root.$gzconfirm = vm.$refs.gzconfirm.open;
|
||||
vm.$root.$gznotify = vm.$refs.gznotify.addNotification;
|
||||
|
||||
//weird bastardization thing
|
||||
//basically I want to access $gz in vue components where I can't access Window
|
||||
//this smells bad but it works
|
||||
this.$root.$gz = window.$gz;
|
||||
vm.$root.$gz = window.$gz;
|
||||
|
||||
//Capture open object type and id if present
|
||||
//localhost:8080/login?type=2&id=22
|
||||
@@ -304,8 +305,8 @@ export default {
|
||||
}
|
||||
|
||||
//redirect to login if not authenticated
|
||||
if (!this.$store.state.authenticated) {
|
||||
this.$router.push("login");
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user