This commit is contained in:
@@ -98,6 +98,13 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
drawer: null,
|
||||
appBar: {
|
||||
isMain: true,
|
||||
icon: "",
|
||||
title: "",
|
||||
contextMenuItems: [],
|
||||
mainMenuItems: []
|
||||
},
|
||||
items: [
|
||||
{ header: "Today" },
|
||||
{
|
||||
@@ -131,8 +138,16 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
//subscribe to context menu changes
|
||||
var that = this;
|
||||
this.$gzevent.$on("context-menu-change", function(ctx) {
|
||||
alert("CLICK " + ctx);
|
||||
that.appBar.isMain = ctx.isMain;
|
||||
that.appBar.icon = ctx.icon;
|
||||
that.appBar.title = ctx.title;
|
||||
that.appBar.contextMenuItems = ctx.contextMenuItems
|
||||
? ctx.contextMenuItems
|
||||
: [];
|
||||
|
||||
//alert("CLICK " + ctx);
|
||||
});
|
||||
//redirect to login if not authenticated
|
||||
if (!this.$store.state.authenticated) {
|
||||
@@ -157,9 +172,7 @@ export default {
|
||||
navItems() {
|
||||
return this.$store.state.navItems;
|
||||
},
|
||||
appBar() {
|
||||
return this.$store.state.appBar;
|
||||
},
|
||||
|
||||
copyright() {
|
||||
return aboutInfo.copyright;
|
||||
},
|
||||
|
||||
@@ -18,14 +18,7 @@ export default new Vuex.Store({
|
||||
roles: 0,
|
||||
localeText: {},
|
||||
navItems: [],
|
||||
logArray: [],
|
||||
appBar: {
|
||||
isMain: true,
|
||||
icon: "",
|
||||
title: "",
|
||||
contextMenuItems: [],
|
||||
mainMenuItems: []
|
||||
}
|
||||
logArray: []
|
||||
},
|
||||
mutations: {
|
||||
login(state, data) {
|
||||
@@ -65,9 +58,6 @@ export default new Vuex.Store({
|
||||
state.logArray.length - MaxLogLength
|
||||
);
|
||||
}
|
||||
},
|
||||
setAppBar(state, data) {
|
||||
state.appBar = data;
|
||||
}
|
||||
},
|
||||
actions: {}
|
||||
|
||||
@@ -127,11 +127,12 @@ export default {
|
||||
]);
|
||||
},
|
||||
created() {
|
||||
this.$store.commit("setAppBar", {
|
||||
this.$gzevent.$emit("context-menu-change", {
|
||||
isMain: true,
|
||||
icon: "fa-info-circle",
|
||||
title: this.$gzlocale.get("HelpAboutAyaNova")
|
||||
});
|
||||
|
||||
this.clientInfo.version = aboutInfo.version;
|
||||
this.$gzapi
|
||||
.get("ServerInfo")
|
||||
|
||||
@@ -10,7 +10,7 @@ export default {
|
||||
HelloWorld
|
||||
},
|
||||
beforeCreate() {
|
||||
this.$store.commit("setAppBar", {
|
||||
this.$gzevent.$emit("context-menu-change", {
|
||||
isMain: true,
|
||||
icon: "fa-home",
|
||||
title: this.$gzlocale.get("Home")
|
||||
|
||||
@@ -171,7 +171,7 @@ export default {
|
||||
});
|
||||
},
|
||||
created() {
|
||||
this.$store.commit("setAppBar", {
|
||||
this.$gzevent.$emit("context-menu-change", {
|
||||
isMain: false,
|
||||
icon: "fa-splotch",
|
||||
title: this.$gzlocale.get("Widget")
|
||||
|
||||
@@ -48,7 +48,7 @@ export default {
|
||||
});
|
||||
},
|
||||
created() {
|
||||
this.$store.commit("setAppBar", {
|
||||
this.$gzevent.$emit("context-menu-change", {
|
||||
isMain: true,
|
||||
icon: "fa-dolly",
|
||||
title: this.$gzlocale.get("Inventory")
|
||||
|
||||
@@ -65,7 +65,7 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.$store.commit("setAppBar", {
|
||||
this.$gzevent.$emit("context-menu-change", {
|
||||
isMain: true,
|
||||
icon: "",
|
||||
title: ""
|
||||
|
||||
Reference in New Issue
Block a user