mirror of https://github.com/espruino/BangleApps
qmsched: set minutes in 5-min steps
parent
73062edf83
commit
0b455f921c
|
@ -5,3 +5,4 @@
|
||||||
0.05: Avoid immediately redrawing widgets on load
|
0.05: Avoid immediately redrawing widgets on load
|
||||||
0.06: Fix: don't try to redraw widget when widgets not loaded
|
0.06: Fix: don't try to redraw widget when widgets not loaded
|
||||||
0.07: Option to switch theme
|
0.07: Option to switch theme
|
||||||
|
Changed time selection to 5-minute intervals
|
|
@ -155,31 +155,19 @@ function showEditMenu(index) {
|
||||||
"< Cancel": () => showMainMenu(),
|
"< Cancel": () => showMainMenu(),
|
||||||
"Hours": {
|
"Hours": {
|
||||||
value: hrs,
|
value: hrs,
|
||||||
onchange: function(v) {
|
min:0, max:23, wrap:true,
|
||||||
if (v<0) {v = 23;}
|
onchange: v => {hrs = v;},
|
||||||
if (v>23) {v = 0;}
|
|
||||||
hrs = v;
|
|
||||||
this.value = v;
|
|
||||||
}, // no arrow fn -> preserve 'this'
|
|
||||||
},
|
},
|
||||||
"Minutes": {
|
"Minutes": {
|
||||||
value: mins,
|
value: mins,
|
||||||
onchange: function(v) {
|
min:0, max:55, step:5, wrap:true,
|
||||||
if (v<0) {v = 59;}
|
onchange: v => {mins = v;},
|
||||||
if (v>59) {v = 0;}
|
|
||||||
mins = v;
|
|
||||||
this.value = v;
|
|
||||||
}, // no arrow fn -> preserve 'this'
|
|
||||||
},
|
},
|
||||||
"Switch to": {
|
"Switch to": {
|
||||||
value: mode,
|
value: mode,
|
||||||
|
min:0, max:2, wrap:true,
|
||||||
format: v => modeNames[v],
|
format: v => modeNames[v],
|
||||||
onchange: function(v) {
|
onchange: v => {mode = v;},
|
||||||
if (v<0) {v = 2;}
|
|
||||||
if (v>2) {v = 0;}
|
|
||||||
mode = v;
|
|
||||||
this.value = v;
|
|
||||||
}, // no arrow fn -> preserve 'this'
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
function getSched() {
|
function getSched() {
|
||||||
|
|
Loading…
Reference in New Issue