Delete apps/regattatimer/regattatimer.settings.js

pull/3236/head
naden 2024-02-23 17:19:59 +01:00 committed by GitHub
parent 291bad8e35
commit a83af8166f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 46 deletions

View File

@ -1,46 +0,0 @@
(function(back) {
var file = "regattatimer.json";
// Load settings
var settings = Object.assign({
"dial": "numeric",
"gps": false,
"compass": false,
"language": "en",
"fgColor": "#FFFF00",
"bgColor": "#000000"
}, require('Storage').readJSON(file, true) || {});
function writeSettings() {
require('Storage').writeJSON(file, settings);
}
// Show the menu
E.showMenu({
"" : { "title" : "Regatta Timer" },
"< Back" : () => back(),
'GPS': {
value: !!settings.gps, // !! converts undefined to false
onchange: v => {
settings.gps = v;
writeSettings();
}
},
'COMPASS': {
value: !!settings.gps, // 0| converts undefined to 0
onchange: v => {
settings.compass = v;
writeSettings();
}
}
"DIAL": {
value: settings.dial,
min: 0,
max: 1,
format: v => ["Numeric", "Disc"][v],
onchange: v => {
settings.dial = v;
writeSettings();
}
}
});
})