Improved smpltmr clock info to be not specialiset for bw clock.
parent
3809c91f1f
commit
ae84bc9a18
|
|
@ -1,3 +1,4 @@
|
|||
0.01: Release
|
||||
0.02: Rewrite with new interface
|
||||
0.03: Added clock infos to expose timer functionality to clocks.
|
||||
0.04: Improvements of clock infos.
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
img: img,
|
||||
items: [
|
||||
{
|
||||
name: "Timer",
|
||||
name: null,
|
||||
get: () => ({ text: getAlarmMinutesText() + (isAlarmEnabled() ? " min" : ""), img: null}),
|
||||
show: function() { smpltmrItems.items[0].emit("redraw"); },
|
||||
hide: function () {},
|
||||
|
|
@ -78,17 +78,18 @@
|
|||
]
|
||||
};
|
||||
|
||||
var offsets = [+1,+5,-1,-5];
|
||||
var offsets = [+5,-5];
|
||||
offsets.forEach((o, i) => {
|
||||
smpltmrItems.items = smpltmrItems.items.concat({
|
||||
name: String(o),
|
||||
get: () => ({ text: getAlarmMinutesText() + " (" + (o > 0 ? "+" : "") + o + ")", img: null}),
|
||||
name: null,
|
||||
get: () => ({ text: (o > 0 ? "+" : "") + o + " min.", img: null}),
|
||||
show: function() { smpltmrItems.items[i+1].emit("redraw"); },
|
||||
hide: function () {},
|
||||
run: function() {
|
||||
if(o > 0) increaseAlarm(o);
|
||||
else decreaseAlarm(Math.abs(o));
|
||||
this.show();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"id": "smpltmr",
|
||||
"name": "Simple Timer",
|
||||
"shortName": "Simple Timer",
|
||||
"version": "0.03",
|
||||
"version": "0.04",
|
||||
"description": "A very simple app to start a timer.",
|
||||
"icon": "app.png",
|
||||
"tags": "tool,alarm,timer",
|
||||
|
|
|
|||
Loading…
Reference in New Issue