Merge branch 'master' of github.com:espruino/BangleApps
commit
4a42d84432
11
apps.json
11
apps.json
|
|
@ -4148,11 +4148,12 @@
|
|||
"version": "0.01",
|
||||
"description": "Navigate between clock and launcher with Swipe action",
|
||||
"icon": "swiperclocklaunch.png",
|
||||
"type": "boot",
|
||||
"tags": "system",
|
||||
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||
"type": "bootloader",
|
||||
"tags": "tools, system",
|
||||
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||
"storage": [
|
||||
{"name":"swiperclocklaunch.boot.js","url":"boot.js"}
|
||||
{"name":"swiperclocklaunch.boot.js","url":"boot.js"},
|
||||
{"name":"swiperclocklaunch.img","url":"icon.js","evaluate":true}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -4160,7 +4161,7 @@
|
|||
"name": "Q Alarm and Timer",
|
||||
"shortName": "Q Alarm",
|
||||
"icon": "app.png",
|
||||
"version": "0.01",
|
||||
"version": "0.02",
|
||||
"description": "Alarm and timer app with days of week and 'hard' option.",
|
||||
"tags": "tool,alarm,widget",
|
||||
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
0.01: First version!
|
||||
0.02: Fixed alarms not working and localised days of week.
|
||||
|
|
@ -172,21 +172,14 @@ function showDaysMenu(alarmIndex, alarm) {
|
|||
"< Back": () => showEditAlarmMenu(alarmIndex, alarm),
|
||||
};
|
||||
|
||||
[
|
||||
"Sunday",
|
||||
"Monday",
|
||||
"Tuesday",
|
||||
"Wednesday",
|
||||
"Thursday",
|
||||
"Friday",
|
||||
"Saturday",
|
||||
].forEach((dayOfWeek, i) => {
|
||||
for (let i = 0; i < 7; i++) {
|
||||
let dayOfWeek = require("locale").dow({ getDay: () => i });
|
||||
menu[dayOfWeek] = {
|
||||
value: alarm.daysOfWeek[i],
|
||||
format: (v) => (v ? "Yes" : "No"),
|
||||
onchange: (v) => (alarm.daysOfWeek[i] = v),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
return E.showMenu(menu);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
// This file shows the alarm
|
||||
|
||||
print("Starting alarm");
|
||||
|
||||
function formatTime(t) {
|
||||
let hrs = Math.floor(t / 3600000);
|
||||
let mins = Math.round((t / 60000) % 60);
|
||||
|
|
@ -150,8 +148,6 @@ let active = alarms.filter(
|
|||
(alarm.timer || alarm.daysOfWeek[time.getDay()])
|
||||
);
|
||||
|
||||
print(active);
|
||||
|
||||
if (active.length) {
|
||||
showAlarm(active.sort((a, b) => a.t - b.t)[0]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,13 +29,12 @@ let nextAlarms = (require("Storage").readJSON("qalarm.json", 1) || [])
|
|||
.sort((a, b) => a.t - b.t);
|
||||
|
||||
if (nextAlarms[0]) {
|
||||
print("Found alarm, scheduling...", nextAlarms[0].t - t);
|
||||
setTimeout(() => {
|
||||
load("qalarm.js");
|
||||
eval(require("Storage").read("qalarmcheck.js"));
|
||||
}, 3600000 * (nextAlarms[0].t - t));
|
||||
load("qalarm.js");
|
||||
}, nextAlarms[0].t - t);
|
||||
} else {
|
||||
print("No alarms found. Will re-check at midnight.");
|
||||
// No alarms found: will re-check at midnight
|
||||
setTimeout(() => {
|
||||
eval(require("Storage").read("qalarmcheck.js"));
|
||||
}, 86400000 - t);
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
require("heatshrink").decompress(atob("lEoxH+AB8WAAwYQEaQrdEp4pWEyYoRC49kxGs2fX6+z1mIsgpUCQtAxAjCAA+zxFAFCAQFxAkJAAuIFBxMF1oeHgEABI+sFBomEORInJPgJ7EEyonLFAJQJBIh0IE5x6GE47CME5nXsgnGOojmME5p5HJyAnO6+IE5LEKE6JQEE4lkC5gnPUIh2SE6B4EAAesC5oAP1gnHTxpPDAQIAFeJQACH5wnP64nWAA3CBJB3WAA203fQBAp3IY4plENQ4HC2gABkjHNxAnX2nJBYeIEYf+AYVkE5oDGE4e0UgdkEwYnDUAITEACikBTwgnFxAnZFAJ2FE4lAJ7dAE4pQFY6yfCToYmDE4kW1jvX1geEE4YoF2YfFABRzD67EEEwqiGFCAmETg5QJPQYAMTQJ0GE5AoGshSPYQgmKFA72BFJWzxBzEExgoIKYOI1grC2esxBLGExwpKABolPFCwmSFKQlVFZoXP"))
|
||||
Loading…
Reference in New Issue