From ae8f88ce323448baaa54707a10abf24e94276d2e Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 16 Jun 2020 23:25:11 +0000 Subject: [PATCH] --- ayanova/src/App.vue | 1 + ayanova/src/api/translation.js | 4 +++- ayanova/src/components/gzconfirm.vue | 13 +++++++++---- ayanova/src/views/login.vue | 19 +++++++++++++++++++ 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/ayanova/src/App.vue b/ayanova/src/App.vue index 07ad4166..c19a9972 100644 --- a/ayanova/src/App.vue +++ b/ayanova/src/App.vue @@ -260,6 +260,7 @@ export default { }, created() { //Detect version change, wipe persisted form settings if has changed + let currentVersion = window.$gz.clientInfo.version; if (currentVersion != window.$gz.store.state.lastClientVersion) { window.$gz.store.commit( diff --git a/ayanova/src/api/translation.js b/ayanova/src/api/translation.js index ff3b88b0..3dd94683 100644 --- a/ayanova/src/api/translation.js +++ b/ayanova/src/api/translation.js @@ -171,7 +171,9 @@ export default { "AttachmentNotes", "Upload", "AttachmentFileName", - "FileAttachment" + "FileAttachment", + "MaintenanceExpired", + "MaintenanceExpiredNote" ], //////////////////////////////////////////////////////// diff --git a/ayanova/src/components/gzconfirm.vue b/ayanova/src/components/gzconfirm.vue index 9cd9322f..053d28b9 100644 --- a/ayanova/src/components/gzconfirm.vue +++ b/ayanova/src/components/gzconfirm.vue @@ -9,7 +9,7 @@ :data-cy="!!$ay.dev ? 'gzconfirm' : false" > - + @@ -22,11 +22,13 @@ - {{ options.title }} + {{ options.title }} - - {{ options.message }} + @@ -69,6 +71,9 @@ export default { }), methods: { open(options) { + if (options.message.includes("\n")) { + options.message = options.message.replace(/\n/g, "
"); + } this.options = Object.assign(this.options, options); this.maxWidth = Math.floor(window.innerWidth * 0.9); let calculatedWidth = Math.floor(window.innerWidth * 0.5); diff --git a/ayanova/src/views/login.vue b/ayanova/src/views/login.vue index 4f56e854..2517bab4 100644 --- a/ayanova/src/views/login.vue +++ b/ayanova/src/views/login.vue @@ -217,6 +217,15 @@ export default { }, created() { let vm = this; + + (async function() { + await window.$gz.dialog.displayLTModalNotificationMessage( + "The support and updates subscription has now expired\nAyaNova can not be updated and support is no longer available", + "Maintenance expired", + "error" + ); + })(); + window.$gz.eventBus.$emit("menu-change", { isMain: true, icon: "", @@ -257,6 +266,16 @@ export default { auth .authenticate(vm.input.username, vm.input.password) .then(() => { + //check if support and updates has expired and show warning if so + if (vm.$store.state.globalSettings.maintenanceExpired) { + (async function() { + await window.$gz.dialog.displayLTModalNotificationMessage( + "MaintenanceExpiredNote", + "MaintenanceExpired", + "error" + ); + })(); + } if (vm.$store.state.openObject != null) { window.$gz.eventBus.$emit("openobject", null); } else {