diff --git a/configurator.py b/configurator.py index 3c475a9..47c5ec2 100755 --- a/configurator.py +++ b/configurator.py @@ -2237,34 +2237,22 @@ INDEX = Template(r""" } else { var $toastContent = $("
" + resp[0].state + "
"); - Materialize.toast($toastContent, 5000); + Materialize.toast($toastContent, 2000); } }); } function reload_automations() { $.get("api/reload_automations", function (resp) { - if (resp.length == 0) { - var $toastContent = $("
Automations reloaded.
"); - Materialize.toast($toastContent, 2000); - } - else { - var $toastContent = $("
" + resp[0].state + "
"); - Materialize.toast($toastContent, 5000); - } + var $toastContent = $("
Automations reloaded
"); + Materialize.toast($toastContent, 2000); }); } function reload_groups() { $.get("api/reload_groups", function (resp) { - if (resp.length == 0) { - var $toastContent = $("
Groups reloaded.
"); - Materialize.toast($toastContent, 2000); - } - else { - var $toastContent = $("
" + resp[0].state + "
"); - Materialize.toast($toastContent, 5000); - } + var $toastContent = $("
Groups reloaded
"); + Materialize.toast($toastContent, 2000); }); }