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