Bonjour,
Je suis à la recherche de la commande permettant de faire apparaitre le toaster rouge ou vert de Jeedom ?
Auriez vous des examples à me proposer ?
Informations Jeedom
Core : 4.4.19 (master)
DNS Jeedom : non
Bonjour,
Je suis à la recherche de la commande permettant de faire apparaitre le toaster rouge ou vert de Jeedom ?
Auriez vous des examples à me proposer ?
Informations Jeedom
Core : 4.4.19 (master)
DNS Jeedom : non
Peut être tenter chat gpt
Hello,
Il faudrait avoir le contexte , car dans certain cas un simple throw new Exception peut faire apparaitre le toast.
sinon un truc comme ceci en js :
let options = {
title: 'mon titre',
message: 'mon message',
level: 'danger', // info, success, danger, warning
timeOut: 0, // temps d'affichage en ms (0 = permanent)
onclick: function() {
jeeDialog.clearToasts()
}
}
jeeDialog.toast(options)
Voir utils.js dans le core :
jeedomUtils.showAlert = function(_options) {
//if (getUrlVars('report') == 1) return
var options = init(_options, {})
options.title = init(options.title, '')
options.message = init(options.message, '')
options.level = init(options.level, '')
options.emptyBefore = init(options.emptyBefore, false)
options.timeOut = init(options.timeOut, init(options.ttl, parseInt(jeedom.theme['interface::toast::duration']) * 1000))
options.extendedTimeOut = init(options.extendedTimeOut, parseInt(jeedom.theme['interface::toast::duration']) * 1000)
if (options.level == 'danger') {
options.timeOut = 0
}
options.attachTo = init(_options.attachTo, false)
if (!options.attachTo) options.attachTo = init(_options.attach, false) //Deprecated, old toastr param
jeeDialog.toast(options)
}
Pour le moment, je me demandais si un message d’info sur la configuration de mon plugin ne serait pas interessant.