Skip to content

Commit

Permalink
Merge pull request #375 from ps-igel/upstreamMerge
Browse files Browse the repository at this point in the history
numerals clock: fixed settings issue
  • Loading branch information
gfwilliams committed May 4, 2020
2 parents 90ba486 + 3dad58f commit b8ed7d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps.json
Expand Up @@ -1283,7 +1283,7 @@
"name": "Numerals Clock",
"shortName": "Numerals Clock",
"icon": "numerals.png",
"version":"0.04",
"version":"0.05",
"description": "A simple big numerals clock",
"tags": "numerals,clock",
"type":"clock",
Expand Down
1 change: 1 addition & 0 deletions apps/numerals/ChangeLog
Expand Up @@ -2,3 +2,4 @@
0.02: Use BTN2 for settings menu like other clocks
0.03: maximize numerals, make menu button configurable, change icon to mac palette, add default settings file, respect 12hour setting
0.04: Don't overwrite existing settings on app update
0.05: Fix settings issue
5 changes: 3 additions & 2 deletions apps/numerals/numerals.settings.js
Expand Up @@ -11,7 +11,8 @@
updateSettings();
}
let numeralsSettings = storage.readJSON('numerals.json',1);
if (!numeralsSettings) resetSettings();
if (!numeralsSettings) resetSettings();
if (numeralsSettings.menuButton===undefined) numeralsSettings.menuButton=22;
let dm = ["fill","frame"];
let col = ["rnd","r/g","y/w","o/c","b/y"];
let btn = [[24,"BTN1"],[22,"BTN2"],[23,"BTN3"],[11,"BTN4"],[16,"BTN5"]];
Expand All @@ -30,7 +31,7 @@
onchange: v=> { numeralsSettings.drawMode=dm[v]; updateSettings();}
},
"Menu button": {
value: 1|btn[numeralsSettings.menuButton],
value: btn.findIndex(e=>e[0]==numeralsSettings.menuButton),
min:0,max:4,
format: v=>btn[v][1],
onchange: v=> { numeralsSettings.menuButton=btn[v][0]; updateSettings();}
Expand Down

0 comments on commit b8ed7d6

Please sign in to comment.