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