This commit is contained in:
@@ -235,6 +235,14 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
//detect version change, wipe persisted form settings if so
|
||||
//get current version now
|
||||
var currentVersion = window.$gz.clientInfo.version;
|
||||
if (currentVersion != window.$gz.store.state.lastClientVersion) {
|
||||
window.$gz.store.commit("setLastClientVersion", currentVersion);
|
||||
window.$gz.store.commit("clearAllFormSettings");
|
||||
}
|
||||
|
||||
//////////////////////////////////
|
||||
// WIRE UP
|
||||
// EVENT HANDLERS ON GZEVENTBUS
|
||||
|
||||
@@ -1,21 +1,5 @@
|
||||
export default {
|
||||
version: "8.0.0-alpha.2020.Feb-27",
|
||||
version: "8.0.0-alpha.2020.Feb-29",
|
||||
copyright:
|
||||
"Copyright © 1999-2020, Ground Zero Tech-Works Inc. All Rights Reserved",
|
||||
browser: {
|
||||
platform: window.navigator.platform,
|
||||
userAgent: window.navigator.userAgent,
|
||||
languages: window.navigator.languages,
|
||||
tz: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
oscpu: window.navigator.oscpu,
|
||||
maxTouchPoints: window.navigator.maxTouchPoints,
|
||||
webdriver: window.navigator.webdriver,
|
||||
vendor: window.navigator.vendor,
|
||||
availWidth: window.screen.availWidth,
|
||||
availHeight: window.screen.availHeight,
|
||||
width: window.screen.width,
|
||||
height: window.screen.height,
|
||||
devicePixelRatio: window.devicePixelRatio,
|
||||
pixelDepth: window.screen.pixelDepth
|
||||
}
|
||||
"Copyright © 1999-2020, Ground Zero Tech-Works Inc. All Rights Reserved"
|
||||
};
|
||||
|
||||
@@ -15,6 +15,7 @@ import VueCurrencyInput from "vue-currency-input";
|
||||
import lodash from "./libs/lodash.min.js";
|
||||
|
||||
//my libs
|
||||
import ayaNovaVersion from "./api/ayanova-version";
|
||||
import gzeventbus from "./api/eventbus";
|
||||
import gzmenu from "./api/gzmenu";
|
||||
import gzdialog from "./api/gzdialog";
|
||||
@@ -65,7 +66,8 @@ window.$gz = {
|
||||
form: gzform,
|
||||
report: gzreport,
|
||||
errorHandler: errorhandler,
|
||||
store: store
|
||||
store: store,
|
||||
clientInfo: ayaNovaVersion
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -10,6 +10,7 @@ Vue.use(Vuex);
|
||||
export default new Vuex.Store({
|
||||
plugins: [createPersistedState()],
|
||||
state: {
|
||||
lastClientVersion:"",
|
||||
authenticated: false,
|
||||
apiUrl: "",
|
||||
helpUrl: "",
|
||||
@@ -33,6 +34,9 @@ export default new Vuex.Store({
|
||||
formCustomTemplate: {} //this is the custom fields settings for forms
|
||||
},
|
||||
mutations: {
|
||||
setLastClientVersion(state, data) {
|
||||
state.lastClientVersion = data;
|
||||
},
|
||||
login(state, data) {
|
||||
// mutate state
|
||||
state.authenticated = data.authenticated;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
<v-divider class="mt-6"></v-divider>
|
||||
<v-subheader>{{ lt("Browser") }}</v-subheader>
|
||||
<div v-for="(value, name) in clientInfo.browser" :key="name">
|
||||
<div v-for="(value, name) in browser" :key="name">
|
||||
<span class="ml-6 body-1">{{ name }}: </span>
|
||||
<span class="body-2">{{ value }}</span>
|
||||
</div>
|
||||
@@ -220,6 +220,23 @@ export default {
|
||||
});
|
||||
},
|
||||
created() {
|
||||
this.browser = {
|
||||
platform: window.navigator.platform,
|
||||
userAgent: window.navigator.userAgent,
|
||||
languages: window.navigator.languages,
|
||||
tz: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
oscpu: window.navigator.oscpu,
|
||||
maxTouchPoints: window.navigator.maxTouchPoints,
|
||||
webdriver: window.navigator.webdriver,
|
||||
vendor: window.navigator.vendor,
|
||||
availWidth: window.screen.availWidth,
|
||||
availHeight: window.screen.availHeight,
|
||||
width: window.screen.width,
|
||||
height: window.screen.height,
|
||||
devicePixelRatio: window.devicePixelRatio,
|
||||
pixelDepth: window.screen.pixelDepth
|
||||
};
|
||||
|
||||
window.$gz.api
|
||||
.get("ServerInfo")
|
||||
.then(response => {
|
||||
@@ -238,6 +255,7 @@ export default {
|
||||
return {
|
||||
serverInfo: { license: { license: {} } },
|
||||
clientInfo: {},
|
||||
browser: {},
|
||||
formState: {
|
||||
ready: false,
|
||||
loading: true,
|
||||
|
||||
Reference in New Issue
Block a user