clkinfostopw: remove unused setting code

pull/2824/head
Rob Pilling 2023-06-11 12:59:01 +01:00
parent c004336e3e
commit 69df7b35e5
1 changed files with 0 additions and 36 deletions

View File

@ -1,36 +0,0 @@
const enum StopWatchFormat {
HMS,
Colon,
}
type StopWatchSettings = {
format: StopWatchFormat,
};
(back => {
const SETTINGS_FILE = "clkinfostopw.setting.json";
const storage = require("Storage");
const settings: StopWatchSettings = Object.assign(
{ format: StopWatchFormat.HMS },
storage.readJSON(SETTINGS_FILE, true),
);
const save = () => {
storage.writeJSON(SETTINGS_FILE, settings)
};
E.showMenu({
"": { "title": "stopwatch" },
"< Back": back,
"Format": {
value: settings.format,
min: StopWatchFormat.HMS,
max: StopWatchFormat.Colon,
format: v => v === StopWatchFormat.HMS ? "12m34s" : "12:34",
onchange: v => {
settings.format = v;
save();
},
},
});
}) satisfies SettingsFunc