Loading src/components/paneConnect.vue +20 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,26 @@ export default { this.$store.dispatch('firstConnect') .then (() => { console.log("Connected!") this.checkServerVersion() }) .catch(error => { this.modalError(error) // Let mixin handle error }) }, checkServerVersion: function () { this.$store.dispatch('updateState') .then (() => { console.log(this.$store.state.apiState.version) var serverVersion = this.$store.state.apiState.version var serverVersionMajor = serverVersion.substring(0, 3) console.log(serverVersionMajor) var clientVersion = process.env.PACKAGE_VERSION var clientVersionMajor = clientVersion.substring(0, 3) console.log(clientVersionMajor) if (serverVersionMajor != clientVersionMajor) { this.modalDialog("Version mismatch", "Client and microscope versions do not match. Consider updating your microscope software. Some functionality may currently be broken.", status='warning') } }) .catch(error => { this.modalError(error) // Let mixin handle error Loading Loading
src/components/paneConnect.vue +20 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,26 @@ export default { this.$store.dispatch('firstConnect') .then (() => { console.log("Connected!") this.checkServerVersion() }) .catch(error => { this.modalError(error) // Let mixin handle error }) }, checkServerVersion: function () { this.$store.dispatch('updateState') .then (() => { console.log(this.$store.state.apiState.version) var serverVersion = this.$store.state.apiState.version var serverVersionMajor = serverVersion.substring(0, 3) console.log(serverVersionMajor) var clientVersion = process.env.PACKAGE_VERSION var clientVersionMajor = clientVersion.substring(0, 3) console.log(clientVersionMajor) if (serverVersionMajor != clientVersionMajor) { this.modalDialog("Version mismatch", "Client and microscope versions do not match. Consider updating your microscope software. Some functionality may currently be broken.", status='warning') } }) .catch(error => { this.modalError(error) // Let mixin handle error Loading