diff --git a/ayanova/src/api/gzdialog.js b/ayanova/src/api/gzdialog.js index 413c2c7d..d1a138f2 100644 --- a/ayanova/src/api/gzdialog.js +++ b/ayanova/src/api/gzdialog.js @@ -27,7 +27,8 @@ export default { //ERROR window.$gz.eventBus.$on("notify-error", function handleNotifyWarn( msg, - helpUrl + helpUrl, + overrideTimeout ) { //log full message window.$gz.store.commit("logItem", "notify-error: " + msg); @@ -36,7 +37,7 @@ export default { vm.$root.$gznotify({ message: msg, type: "error", - timeout: CalculateDelay(msg), + timeout: overrideTimeout ?? CalculateDelay(msg), helpUrl: helpUrl }); }); @@ -62,14 +63,15 @@ export default { //INFO window.$gz.eventBus.$on("notify-info", function handleNotifyInfo( msg, - helpUrl + helpUrl, + overrideTimeout ) { window.$gz.store.commit("logItem", "notify-info: " + msg); msg = msg.substring(0, 600); vm.$root.$gznotify({ message: msg, type: "info", - timeout: CalculateDelay(msg), + timeout: overrideTimeout ?? CalculateDelay(msg), helpUrl: helpUrl }); }); @@ -78,13 +80,15 @@ export default { //SUCCESS window.$gz.eventBus.$on("notify-success", function handleNotifySuccess( msg, - helpUrl + helpUrl, + overrideTimeout ) { vm.$root.$gznotify({ message: msg, type: "success", - timeout: CalculateDelay(msg), - helpUrl: helpUrl + timeout: overrideTimeout ?? CalculateDelay(msg), + helpUrl: helpUrl, + overrideTimeout }); }); diff --git a/ayanova/src/components/gznotify.vue b/ayanova/src/components/gznotify.vue index 07eb27eb..d184f470 100644 --- a/ayanova/src/components/gznotify.vue +++ b/ayanova/src/components/gznotify.vue @@ -4,6 +4,7 @@ :value="isVisible" :color="currentNotification.type" multi-line + :timeout="currentNotification.timeout" > {{ currentNotification.message }} @@ -35,6 +36,7 @@ export default { }), methods: { addNotification(options) { + console.log("Add notification options:", options); if (!options.message) { return; } @@ -61,6 +63,7 @@ export default { this.isVisible = true; }); //Show it for the designated time before moving on to the next + setTimeout(() => { this.isVisible = false; //recurse