This commit is contained in:
@@ -56,12 +56,30 @@
|
|||||||
</v-list-tile>
|
</v-list-tile>
|
||||||
</template>
|
</template>
|
||||||
</v-list>-->
|
</v-list>-->
|
||||||
<v-list>
|
<!-- MAIN MENU -->
|
||||||
|
<v-list v-if="appBar.isMain">
|
||||||
|
<v-list-tile
|
||||||
|
v-for="item in appBar.mainMenuItems"
|
||||||
|
:key="item.key"
|
||||||
|
@click="$gzevent.$emit('main-menu-click',item.key)"
|
||||||
|
>
|
||||||
|
<v-divider v-if="item.divider" :key="index" :inset="item.inset"></v-divider>
|
||||||
|
<v-list-tile-action>
|
||||||
|
<v-icon v-if="item.icon">{{ "fa-" + item.icon }}</v-icon>
|
||||||
|
</v-list-tile-action>
|
||||||
|
<v-list-tile-content>
|
||||||
|
<v-list-tile-title>{{ item.title }}</v-list-tile-title>
|
||||||
|
</v-list-tile-content>
|
||||||
|
</v-list-tile>
|
||||||
|
</v-list>
|
||||||
|
<!-- CONTEXT MENU -->
|
||||||
|
<v-list v-if="!appBar.isMain">
|
||||||
<v-list-tile
|
<v-list-tile
|
||||||
v-for="item in appBar.contextItems"
|
v-for="item in appBar.contextItems"
|
||||||
:key="item.key"
|
:key="item.key"
|
||||||
@click="$gzevent.$emit('context-click',item.key)"
|
@click="$gzevent.$emit('context-menu-click',item.key)"
|
||||||
>
|
>
|
||||||
|
|
||||||
<v-list-tile-action>
|
<v-list-tile-action>
|
||||||
<v-icon v-if="item.icon">{{ "fa-" + item.icon }}</v-icon>
|
<v-icon v-if="item.icon">{{ "fa-" + item.icon }}</v-icon>
|
||||||
</v-list-tile-action>
|
</v-list-tile-action>
|
||||||
@@ -107,7 +125,11 @@ export default {
|
|||||||
icon: "",
|
icon: "",
|
||||||
title: "",
|
title: "",
|
||||||
contextItems: [],
|
contextItems: [],
|
||||||
mainMenuItems: []
|
mainMenuItems: [
|
||||||
|
{ title: "Log off", icon: "sign-out-alt", key: "app:logout" },
|
||||||
|
{ title: "Help", key: "app:help" },
|
||||||
|
{ divider: true }
|
||||||
|
]
|
||||||
},
|
},
|
||||||
items: [
|
items: [
|
||||||
{ header: "Today" },
|
{ header: "Today" },
|
||||||
@@ -131,22 +153,21 @@ export default {
|
|||||||
subtitle:
|
subtitle:
|
||||||
"<span class='text--primary'>Sandra Adams</span> — Do you have Paris recommendations? Have you ever been?"
|
"<span class='text--primary'>Sandra Adams</span> — Do you have Paris recommendations? Have you ever been?"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
contextItems: []
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
//subscribe to context menu changes
|
//subscribe to context menu changes
|
||||||
var that = this;
|
var that = this;
|
||||||
this.$gzevent.$on("context-menu-change", function(ctx) {
|
this.$gzevent.$on("menu-change", function(ctx) {
|
||||||
that.appBar.isMain = ctx.isMain;
|
that.appBar.isMain = ctx.isMain;
|
||||||
that.appBar.icon = ctx.icon;
|
that.appBar.icon = ctx.icon;
|
||||||
that.appBar.title = ctx.title;
|
that.appBar.title = ctx.title;
|
||||||
that.appBar.contextItems = ctx.contextItems ? ctx.contextItems : [];
|
that.appBar.contextItems = ctx.contextItems ? ctx.contextItems : [];
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$gzevent.$on("context-click", function(key) {
|
this.$gzevent.$on("main-menu-click", function(key) {
|
||||||
alert("App.vue::context click: " + key);
|
alert("App.vue::main-menu click: " + key);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ export default {
|
|||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$gzevent.$emit("context-menu-change", {
|
this.$gzevent.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "fa-info-circle",
|
icon: "fa-info-circle",
|
||||||
title: this.$gzlocale.get("HelpAboutAyaNova")
|
title: this.$gzlocale.get("HelpAboutAyaNova")
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export default {
|
|||||||
HelloWorld
|
HelloWorld
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
this.$gzevent.$emit("context-menu-change", {
|
this.$gzevent.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "fa-home",
|
icon: "fa-home",
|
||||||
title: this.$gzlocale.get("Home")
|
title: this.$gzlocale.get("Home")
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$gzevent.$emit("context-menu-change", {
|
this.$gzevent.$emit("menu-change", {
|
||||||
isMain: false,
|
isMain: false,
|
||||||
icon: "fa-splotch",
|
icon: "fa-splotch",
|
||||||
title: this.$gzlocale.get("Widget"),
|
title: this.$gzlocale.get("Widget"),
|
||||||
@@ -184,11 +184,11 @@ export default {
|
|||||||
{ title: "Click Me 4", key: "4" }
|
{ title: "Click Me 4", key: "4" }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
this.$gzevent.$on("context-click", clickHandler);
|
this.$gzevent.$on("context-menu-click", clickHandler);
|
||||||
this.getDataFromApi();
|
this.getDataFromApi();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.$gzevent.$off("context-click", clickHandler);
|
this.$gzevent.$off("context-menu-click", clickHandler);
|
||||||
},
|
},
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$gzevent.$emit("context-menu-change", {
|
this.$gzevent.$emit("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.$gzevent.$emit("context-menu-change", {
|
this.$gzevent.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "",
|
icon: "",
|
||||||
title: ""
|
title: ""
|
||||||
|
|||||||
Reference in New Issue
Block a user