This commit is contained in:
2020-11-12 22:24:29 +00:00
parent da91700fa1
commit a8fc8f4cbf
3 changed files with 13 additions and 2 deletions

View File

@@ -801,7 +801,8 @@ async function getUserOptions() {
currencyName: null,
hour12: true,
uiColor: "#000000",
emailAddress: null
emailAddress: null,
mapUrlTemplate: null
};
//get language to use, try user set override first, if empty then browser set, if empty then default to en-us
@@ -824,6 +825,8 @@ async function getUserOptions() {
l.uiColor = res.data.uiColor || "#000000";
l.emailAddress = res.data.emailAddress || null;
l.mapUrlTemplate = res.data.mapUrlTemplate || null;
window.$gz.store.commit("setUserOptions", l);
}
} catch (error) {

View File

@@ -38,7 +38,8 @@ export default new Vuex.Store({
currencyName: "USD",
hour12: true,
uiColor: "#000000",
emailAddress: null
emailAddress: null,
mapUrlTemplate: null
},
globalSettings: {},
navItems: [],
@@ -89,6 +90,7 @@ export default new Vuex.Store({
state.userOptions.hour12 = true;
state.userOptions.uiColor = "#000000";
state.userOptions.emailAddress = null;
state.userOptions.mapUrlTemplate = null;
state.globalSettings = {};
state.knownPassword = false;
state.newNotificationCount = 0;
@@ -112,6 +114,7 @@ export default new Vuex.Store({
state.userOptions.timeZoneOverride = data.timeZoneOverride;
state.userOptions.emailAddress = data.emailAddress;
state.userOptions.uiColor = data.uiColor;
state.userOptions.mapUrlTemplate = data.mapUrlTemplate;
},
setGlobalSettings(state, data) {
// mutate state

View File

@@ -45,6 +45,7 @@
:items="selectLists.mapUrls"
item-text="name"
item-value="value"
@input="mapUrlSelectionChanged"
></v-select>
</v-col>
@@ -263,6 +264,10 @@ export default {
vm.darkMode ? "$ayiSun" : "$ayiMoon"
);
},
mapUrlSelectionChanged(val) {
this.obj.mapUrlTemplate = val;
this.fieldValueChanged("mapUrlTemplate");
},
fieldValueChanged(ref) {
if (!this.formState.loading && !this.formState.readOnly) {
window.$gz.form.fieldValueChanged(this, ref);