mirror of https://github.com/espruino/BangleApps
calendar: use hardware version to set color scheme
parent
bae67ecf6d
commit
a67ef83bd8
|
@ -1,4 +1,4 @@
|
|||
0.01: Basic calendar
|
||||
0.02: Make Bangle 2 compatible
|
||||
0.03: Add setting to start week on Sunday
|
||||
0.04: Add setting to switch color schemes. Default color scheme will now use colors that are not dithered on Bangle 2. Use localized names for months and days of the week (Language app needed).
|
||||
0.04: Add setting to switch color schemes. On Bangle 2 non-dithering colors will be used by default. Use localized names for months and days of the week (Language app needed).
|
||||
|
|
|
@ -20,10 +20,14 @@ const yellow = "#ffff00";
|
|||
let settings = require('Storage').readJSON("calendar.json", true) || {};
|
||||
if (settings.startOnSun === undefined)
|
||||
settings.startOnSun = false;
|
||||
if (settings.ndColor === undefined)
|
||||
settings.ndColor = true;
|
||||
if (settings.ndColors === undefined)
|
||||
if (process.env.HWVERSION == 2) {
|
||||
settings.ndColors = true;
|
||||
} else {
|
||||
settings.ndColors = false;
|
||||
}
|
||||
|
||||
if (settings.ndColor === true) {
|
||||
if (settings.ndColors === true) {
|
||||
let bgColor = white;
|
||||
let bgColorMonth = blue;
|
||||
let bgColorDow = black;
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
if (settings.startOnSun === undefined)
|
||||
settings.startOnSun = false;
|
||||
if (settings.ndColors === undefined)
|
||||
if (process.env.HWVERSION == 2) {
|
||||
settings.ndColors = true;
|
||||
} else {
|
||||
settings.ndColors = false;
|
||||
}
|
||||
|
||||
function writeSettings() {
|
||||
require('Storage').writeJSON(FILE, settings);
|
||||
|
|
Loading…
Reference in New Issue