sched: add disabled event icon

pull/3608/head
Rob Pilling 2024-10-09 21:55:00 +01:00
parent c01c81f78e
commit e1c63e8583
3 changed files with 6 additions and 3 deletions

View File

@ -28,3 +28,4 @@
0.25: Fix wrap around when snoozed through midnight
0.26: Fix hitting snooze on an alarm after when the snooze would've fired
0.27: Tapping clkinfo enables/disables the selected alarm
0.28: Added an icon for disabled events

View File

@ -4,7 +4,8 @@
const iconAlarmOff = atob("GBiBAAAAAAAAAAYAYA4AcBx+ODn/nAP/wAf/4A/n8A/n8B/n+B/n+B/nAB/mAB/geB/5/g/5tg/zAwfzhwPzhwHzAwB5tgAB/gAAeA==");
const iconTimerOn = atob("GBiBAAAAAAAAAAAAAAf/4Af/4AGBgAGBgAGBgAD/AAD/AAB+AAA8AAA8AAB+AADnAADDAAGBgAGBgAGBgAf/4Af/4AAAAAAAAAAAAA==");
const iconTimerOff = atob("GBiBAAAAAAAAAAAAAAf/4Af/4AGBgAGBgAGBgAD/AAD/AAB+AAA8AAA8AAB+AADkeADB/gGBtgGDAwGDhwfzhwfzAwABtgAB/gAAeA==");
const iconEvent = atob("GBiBAAAAAAAAAAAAAA//8B//+BgAGBgAGBgAGB//+B//+B//+B/++B/8+B/5+B8z+B+H+B/P+B//+B//+B//+A//8AAAAAAAAAAAAA==");
const iconEventOn = atob("GBiBAAAAAAAAAAAAAA//8B//+BgAGBgAGBgAGB//+B//+B//+B/++B/8+B/5+B8z+B+H+B/P+B//+B//+B//+A//8AAAAAAAAAAAAA==");
const iconEventOff = atob("GBgBAAAAAAAAAAAAD//wH//4GAAYGAAYGAAYH//4H//4H//4H/74H/wAH/gAHzB4H4H+H8m2H/MDH/OHH/OHD/MDAAG2AAH+AAB4");
//from 0 to max, the higher the closer to fire (as in a progress bar)
function getAlarmValue(a){
@ -21,12 +22,13 @@
}
function getAlarmIcon(a) {
if(a.date) return iconEvent;
if(a.on) {
if(a.timer) return iconTimerOn;
if(a.date) return iconEventOn;
return iconAlarmOn;
} else {
if(a.timer) return iconTimerOff;
if(a.date) return iconEventOff;
return iconAlarmOff;
}
}

View File

@ -1,7 +1,7 @@
{
"id": "sched",
"name": "Scheduler",
"version": "0.27",
"version": "0.28",
"description": "Scheduling library for alarms and timers",
"icon": "app.png",
"type": "scheduler",