mirror of https://github.com/espruino/BangleApps
Merge pull request #3608 from bobrippling/feat/sched-event-icon
sched: add disabled-event iconpull/3604/head
commit
3ab9411767
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +113,7 @@
|
|||
items: all.filter(a=>!a.appid)
|
||||
//.sort((a,b)=>alarm.getTimeToAlarm(a)-alarm.getTimeToAlarm(b))
|
||||
.sort((a,b)=>getAlarmOrder(a)-getAlarmOrder(b))
|
||||
.map((a, i)=>({
|
||||
.map(a => ({
|
||||
name: null,
|
||||
hasRange: true,
|
||||
get: () => ({ text: getAlarmText(a), img: getAlarmIcon(a),
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue