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, currencyName: null,
hour12: true, hour12: true,
uiColor: "#000000", 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 //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.uiColor = res.data.uiColor || "#000000";
l.emailAddress = res.data.emailAddress || null; l.emailAddress = res.data.emailAddress || null;
l.mapUrlTemplate = res.data.mapUrlTemplate || null;
window.$gz.store.commit("setUserOptions", l); window.$gz.store.commit("setUserOptions", l);
} }
} catch (error) { } catch (error) {

View File

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

View File

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