This commit is contained in:
2019-04-15 23:27:34 +00:00
parent a831ab3e65
commit d81cfe62b4
7 changed files with 64 additions and 29 deletions

View File

@@ -12,27 +12,41 @@
</v-list-tile>
</v-list>
</v-navigation-drawer>
<v-toolbar
v-if="isAuthenticated"
:color="contextAppBar.isMain?'primary':'secondary'"
dark
fixed
app
>
<v-toolbar v-if="isAuthenticated" :color="appBar.isMain?'primary':'secondary'" dark fixed app>
<v-toolbar-side-icon @click.stop="drawer = !drawer"></v-toolbar-side-icon>
<v-toolbar-title style="width: 300px" class="ml-0 pl-3">
<v-icon>{{ contextAppBar.icon }}</v-icon>
<span>{{ contextAppBar.title}}</span>
<!-- <v-avatar size="32px" tile>
<img :src="require('./assets/logo.svg')" alt="AyaNova">
</v-avatar>
<span class="hidden-sm-and-down">AyaNova</span>-->
<v-icon>{{ appBar.icon }}</v-icon>&nbsp;
<span>{{ appBar.title}}</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn icon>
<v-icon>fa-save</v-icon>
</v-btn>
<v-btn icon>
<v-icon>fa-search</v-icon>
</v-btn>
<!-- <v-text-field flat solo-inverted hide-details prepend-inner-icon="fa-search" label="Search"></v-text-field>
<v-spacer></v-spacer>
<v-btn icon v-bind:href="helpUrl" target="blank;">
<v-icon>fa-question-circle</v-icon>
</v-btn>
<v-btn icon>
<v-icon>fa-ellipsis-v</v-icon>
</v-btn>-->
<v-menu bottom left>
<template v-slot:activator="{ on }">
<v-btn dark icon v-on="on">
<v-icon>fa-ellipsis-v</v-icon>
</v-btn>
</template>
<v-list>
<v-list-tile v-for="(item, i) in items" :key="i">
<v-list-tile-title>{{ item.title }}</v-list-tile-title>
</v-list-tile>
</v-list>
</v-menu>
</v-toolbar>
<v-content>
<v-container fluid fill-height>
@@ -63,7 +77,13 @@ export default {
name: "App",
data() {
return {
drawer: null
drawer: null,
items: [
{ title: "Click Me" },
{ title: "Click Me" },
{ title: "Click Me" },
{ title: "Click Me 2" }
]
};
},
mounted() {
@@ -86,8 +106,8 @@ export default {
navItems() {
return this.$store.state.navItems;
},
contextAppBar() {
return this.$store.state.contextAppBar;
appBar() {
return this.$store.state.appBar;
},
copyright() {
return aboutInfo.copyright;

View File

@@ -19,10 +19,12 @@ export default new Vuex.Store({
localeText: {},
navItems: [],
logArray: [],
contextAppBar: {
appBar: {
isMain: true,
icon: "",
title: ""
title: "",
contextMenuItems: [],
mainMenuItems: []
}
},
mutations: {
@@ -64,11 +66,8 @@ export default new Vuex.Store({
);
}
},
setContextAppBar(state, data) {
state.contextAppBar = data;
},
setAppBarMainState(state) {
state.contextAppBar = { isMain: true };
setAppBar(state, data) {
state.appBar = data;
}
},
actions: {}

View File

@@ -127,7 +127,11 @@ export default {
]);
},
created() {
this.$store.commit("setAppBarMainState");
this.$store.commit("setAppBar", {
isMain: true,
icon: "fa-info-circle",
title: this.$gzlocale.get("HelpAboutAyaNova")
});
this.clientInfo.version = aboutInfo.version;
this.$gzapi
.get("ServerInfo")

View File

@@ -9,8 +9,12 @@ export default {
components: {
HelloWorld
},
created() {
this.$store.commit("setAppBarMainState");
beforeCreate() {
this.$store.commit("setAppBar", {
isMain: true,
icon: "fa-home",
title: this.$gzlocale.get("Home")
});
}
};
</script>

View File

@@ -171,7 +171,7 @@ export default {
});
},
created() {
this.$store.commit("setContextAppBar", {
this.$store.commit("setAppBar", {
isMain: false,
icon: "fa-splotch",
title: this.$gzlocale.get("Widget")

View File

@@ -48,7 +48,11 @@ export default {
});
},
created() {
this.$store.commit("setAppBarMainState");
this.$store.commit("setAppBar", {
isMain: true,
icon: "fa-dolly",
title: this.$gzlocale.get("Inventory")
});
},
components: {
WidgetList,

View File

@@ -65,7 +65,11 @@ export default {
};
},
created() {
this.$store.commit("setAppBarMainState");
this.$store.commit("setAppBar", {
isMain: true,
icon: "",
title: ""
});
},
methods: {
login() {