From fd2d83c80bd3b0199383cfc06ec5edbf702abaef Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 14 Jan 2023 22:27:43 +0100 Subject: [PATCH] Renamed Notification mixin's warn and error methods. Renamed to `notifyWarning` and `notifyError` respectively. Those names can often clash with other properties defined on components that extend the mixin (like entities). --- .../backend/http/webapp/src/components/Light/Animate.vue | 2 +- platypush/backend/http/webapp/src/utils/Notification.vue | 4 ++-- platypush/backend/http/webapp/src/views/Dashboard.vue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platypush/backend/http/webapp/src/components/Light/Animate.vue b/platypush/backend/http/webapp/src/components/Light/Animate.vue index ca6d1498..4645879e 100644 --- a/platypush/backend/http/webapp/src/components/Light/Animate.vue +++ b/platypush/backend/http/webapp/src/components/Light/Animate.vue @@ -229,7 +229,7 @@ export default { const eventType = this.animationRunning ? 'stop' : 'start' const selectedLights = Object.entries(this.selectedLights).filter((light) => light[1]).map((light) => light[0]) if (!selectedLights.length) { - this.warn('No lights have been selected') + this.notifyWarning('No lights have been selected') return } diff --git a/platypush/backend/http/webapp/src/utils/Notification.vue b/platypush/backend/http/webapp/src/utils/Notification.vue index 8478a9b8..f6446cef 100644 --- a/platypush/backend/http/webapp/src/utils/Notification.vue +++ b/platypush/backend/http/webapp/src/utils/Notification.vue @@ -8,14 +8,14 @@ export default { bus.emit('notification-create', notification) }, - warn(msg) { + notifyWarning(msg) { this.notify({ text: msg, warning: true, }) }, - error(msg) { + notifyError(msg) { this.notify({ text: msg, error: true, diff --git a/platypush/backend/http/webapp/src/views/Dashboard.vue b/platypush/backend/http/webapp/src/views/Dashboard.vue index 545b9edb..172b7ed3 100644 --- a/platypush/backend/http/webapp/src/views/Dashboard.vue +++ b/platypush/backend/http/webapp/src/views/Dashboard.vue @@ -106,7 +106,7 @@ export default { const template = (await this.request('config.get_dashboard', { name: name })) if (!template) { - this.error(`Dashboard ${name} not found`) + this.notifyError(`Dashboard ${name} not found`) } this.parseTemplate(name, template)