clkinfo stopw: better settings

pull/2695/head
Rob Pilling 2023-04-17 08:52:10 +01:00
parent 1ac5942a93
commit 685aedad41
2 changed files with 10 additions and 6 deletions

View File

@ -13,9 +13,11 @@
"< Back": back,
"Format": {
value: settings.format,
format: function () { return settings.format == 0 ? "12h34m56s" : "12:34:56"; },
onchange: function () {
settings.format = (settings.format + 1) % 2;
min: 0,
max: 1,
format: function (v) { return v === 0 ? "12m34s" : "12:34"; },
onchange: function (v) {
settings.format = v;
save();
},
},

View File

@ -22,9 +22,11 @@ type StopWatchSettings = {
"< Back": back,
"Format": {
value: settings.format,
format: () => settings.format == StopWatchFormat.HMS ? "12h34m56s" : "12:34:56",
onchange: () => {
settings.format = (settings.format + 1) % 2;
min: StopWatchFormat.HMS,
max: StopWatchFormat.Colon,
format: v => v === StopWatchFormat.HMS ? "12m34s" : "12:34",
onchange: v => {
settings.format = v;
save();
},
},