mirror of https://github.com/espruino/BangleApps
clkinfo stopw: better settings
parent
1ac5942a93
commit
685aedad41
|
@ -13,9 +13,11 @@
|
||||||
"< Back": back,
|
"< Back": back,
|
||||||
"Format": {
|
"Format": {
|
||||||
value: settings.format,
|
value: settings.format,
|
||||||
format: function () { return settings.format == 0 ? "12h34m56s" : "12:34:56"; },
|
min: 0,
|
||||||
onchange: function () {
|
max: 1,
|
||||||
settings.format = (settings.format + 1) % 2;
|
format: function (v) { return v === 0 ? "12m34s" : "12:34"; },
|
||||||
|
onchange: function (v) {
|
||||||
|
settings.format = v;
|
||||||
save();
|
save();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -22,9 +22,11 @@ type StopWatchSettings = {
|
||||||
"< Back": back,
|
"< Back": back,
|
||||||
"Format": {
|
"Format": {
|
||||||
value: settings.format,
|
value: settings.format,
|
||||||
format: () => settings.format == StopWatchFormat.HMS ? "12h34m56s" : "12:34:56",
|
min: StopWatchFormat.HMS,
|
||||||
onchange: () => {
|
max: StopWatchFormat.Colon,
|
||||||
settings.format = (settings.format + 1) % 2;
|
format: v => v === StopWatchFormat.HMS ? "12m34s" : "12:34",
|
||||||
|
onchange: v => {
|
||||||
|
settings.format = v;
|
||||||
save();
|
save();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue