diff --git a/ayanova/src/App.vue b/ayanova/src/App.vue index ec6a5ea9..2d270f51 100644 --- a/ayanova/src/App.vue +++ b/ayanova/src/App.vue @@ -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 diff --git a/ayanova/src/api/ayanova-version.js b/ayanova/src/api/ayanova-version.js index bae23ed3..a29787df 100644 --- a/ayanova/src/api/ayanova-version.js +++ b/ayanova/src/api/ayanova-version.js @@ -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" }; diff --git a/ayanova/src/main.js b/ayanova/src/main.js index 62e3e867..a6658ded 100644 --- a/ayanova/src/main.js +++ b/ayanova/src/main.js @@ -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 }; ///////////////////////////////////////////////////////////////// diff --git a/ayanova/src/store.js b/ayanova/src/store.js index 51f15c41..b897bfb9 100644 --- a/ayanova/src/store.js +++ b/ayanova/src/store.js @@ -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; diff --git a/ayanova/src/views/ay-about.vue b/ayanova/src/views/ay-about.vue index 9be29cc5..605a1b50 100644 --- a/ayanova/src/views/ay-about.vue +++ b/ayanova/src/views/ay-about.vue @@ -50,7 +50,7 @@ {{ lt("Browser") }} -
+
{{ name }}: {{ value }}
@@ -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,