This commit is contained in:
2019-04-16 22:12:44 +00:00
parent a35077298b
commit d475b8aff9
7 changed files with 24 additions and 20 deletions

View File

@@ -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;
},