forked from platypush/platypush
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).
This commit is contained in:
parent
aa22507f50
commit
fd2d83c80b
3 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue