This commit is contained in:
2018-11-26 18:16:34 +00:00
parent b41a71e862
commit dc4a04472b
3 changed files with 18 additions and 3 deletions

View File

@@ -22,9 +22,12 @@
</v-toolbar-title>
<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-icon>fa-bell</v-icon>
</v-btn>
<v-tooltip bottom>
<v-btn icon v-bind:href="helpUrl" target="blank;">
<v-icon>fa-question-circle</v-icon>
</v-btn>
<span>Tooltip</span>
</v-tooltip>
</v-toolbar>
<v-content>
<v-container fluid fill-height>
@@ -84,6 +87,9 @@ export default {
},
version() {
return aboutInfo.version;
},
helpUrl() {
return this.$store.state.helpUrl;
}
},
props: {

View File

@@ -83,12 +83,17 @@ export default {
window.location.port == "8080"
) {
store.commit("setAPIURL", "http://localhost:7575/api/v8.0/");
store.commit("setHelpURL", "http://localhost:7575/docs/");
store.commit(
"logItem",
"apiutil::APIUrl -> setting to dev. mode: " + store.state.apiUrl
);
} else {
//production location <protocol>//<hostname>:<port>/
store.commit(
"setHelpURL",
window.location.protocol + "//" + window.location.host + "/docs/"
);
store.commit(
"setAPIURL",
window.location.protocol + "//" + window.location.host + "/api/v8.0/"

View File

@@ -12,6 +12,7 @@ export default new Vuex.Store({
state: {
authenticated: false,
apiUrl: "",
helpUrl: "",
apiToken: "-",
userId: 0,
roles: 0,
@@ -45,6 +46,9 @@ export default new Vuex.Store({
setAPIURL(state, data) {
state.apiUrl = data;
},
setHelpURL(state, data) {
state.helpUrl = data;
},
logItem(state, msg) {
msg = Date.now() + "|" + msg;
state.logArray.push(msg);