1
0
Fork 0

Merge pull request #2338 from dustin-richards-was-here/master

Add "Confirm" button to alarm and timer edit menus
master
Gordon Williams 2022-12-01 09:55:11 +00:00 committed by GitHub
commit 320f976e7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 3 deletions

View File

@ -34,4 +34,5 @@
0.32: Fix wrong hidden filter
Add option for auto-delete a timer after it expires
0.33: Allow hiding timers&alarms
0.34: Add "Confirm" option to alarm/timer edit menus

View File

@ -128,7 +128,12 @@ function showEditAlarmMenu(selectedAlarm, alarmIndex) {
value: alarm.hidden || false,
onchange: v => alarm.hidden = v
},
/*LANG*/"Cancel": () => showMainMenu()
/*LANG*/"Cancel": () => showMainMenu(),
/*LANG*/"Confirm": () => {
prepareAlarmForSave(alarm, alarmIndex, time);
saveAndReload();
showMainMenu();
}
};
if (!isNew) {
@ -293,7 +298,12 @@ function showEditTimerMenu(selectedTimer, timerIndex) {
onchange: v => timer.hidden = v
},
/*LANG*/"Vibrate": require("buzz_menu").pattern(timer.vibrate, v => timer.vibrate = v),
/*LANG*/"Cancel": () => showMainMenu()
/*LANG*/"Cancel": () => showMainMenu(),
/*LANG*/"Confirm": () => {
prepareTimerForSave(timer, timerIndex, time);
saveAndReload();
showMainMenu();
}
};
if (!isNew) {

View File

@ -2,7 +2,7 @@
"id": "alarm",
"name": "Alarms & Timers",
"shortName": "Alarms",
"version": "0.33",
"version": "0.34",
"description": "Set alarms and timers on your Bangle",
"icon": "app.png",
"tags": "tool,alarm,widget",