mirror of https://github.com/espruino/BangleApps
Update pebble.settings.js
parent
aba96398f1
commit
24689a7684
|
@ -2,7 +2,7 @@
|
|||
const SETTINGS_FILE = "pebble.json";
|
||||
|
||||
// initialize with default settings...
|
||||
let s = {'bg': '#0f0', 'color': 'Green'}
|
||||
let s = {'bg': '#0f0', 'color': 'Green', 'theme':'System'}
|
||||
|
||||
// ...and overwrite them with any saved values
|
||||
// This way saved values are preserved if a new version adds more settings
|
||||
|
@ -20,6 +20,7 @@
|
|||
|
||||
var color_options = ['Green','Orange','Cyan','Purple','Red','Blue'];
|
||||
var bg_code = ['#0f0','#ff0','#0ff','#f0f','#f00','#00f'];
|
||||
var theme_options = ['System', 'Light', 'Dark'];
|
||||
|
||||
E.showMenu({
|
||||
'': { 'title': 'Pebble Clock' },
|
||||
|
@ -33,6 +34,14 @@
|
|||
s.bg = bg_code[v];
|
||||
save();
|
||||
},
|
||||
'Theme': {
|
||||
value: 0 | theme_options.indexOf(s.theme),
|
||||
min: 0, max: theme_options.length - 1,
|
||||
format: v => theme_options[v],
|
||||
onchange: v => {
|
||||
s.theme = theme_options[v];
|
||||
save();
|
||||
},
|
||||
}
|
||||
});
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue