1
0
Fork 0

[Alarms & Timers] Replace showPrompt with showAlert

master
Alessandro Cocco 2022-05-20 22:41:26 +02:00
parent de56796580
commit f432e10b35
1 changed files with 5 additions and 5 deletions

View File

@ -320,10 +320,10 @@ function showAdvancedMenu() {
function enableAll(on) {
if (alarms.filter(e => e.on == !on).length == 0) {
E.showPrompt(on ? /*LANG*/"Nothing to Enable" : /*LANG*/"Nothing to Disable", {
title: on ? /*LANG*/"Enable All" : /*LANG*/"Disable All",
buttons: { /*LANG*/"Ok": true }
}).then(() => showAdvancedMenu());
E.showAlert(
on ? /*LANG*/"Nothing to Enable" : /*LANG*/"Nothing to Disable",
on ? /*LANG*/"Enable All" : /*LANG*/"Disable All"
).then(() => showAdvancedMenu());
} else {
E.showPrompt(/*LANG*/"Are you sure?", { title: on ? /*LANG*/"Enable All" : /*LANG*/"Disable All" }).then((confirm) => {
if (confirm) {
@ -339,7 +339,7 @@ function enableAll(on) {
function deleteAll() {
if (alarms.length == 0) {
E.showPrompt(/*LANG*/"Nothing to delete", { title: /*LANG*/"Delete All", buttons: { /*LANG*/"Ok": true } }).then(() => showAdvancedMenu());
E.showAlert(/*LANG*/"Nothing to delete", /*LANG*/"Delete All").then(() => showAdvancedMenu());
} else {
E.showPrompt(/*LANG*/"Are you sure?", {
title: /*LANG*/"Delete All"