Add setting to show the weekday and not the year

master
elcste 2025-05-29 16:33:45 -05:00
parent 15ddeaae14
commit cd50676977
5 changed files with 14 additions and 4 deletions

View File

@ -7,3 +7,4 @@
0.06: Fix issue showing widgets when app is fast-loaded into from launcher with widgets disabled
0.07: Enable fast loading and queue updates to the second
0.08: Restore redraw on charging event + fixup for safer fast-loading
0.09: Add setting to show the weekday and not the year

View File

@ -14,3 +14,4 @@
* whether to load widgets, or not; if widgets are loaded, they are swipeable from the top; if not, NO ACTIONS of widgets are available
* date and battery can be printed both below hands (as if hands were physical) and above (more readable)
* hour hand can be made slighly shorter to improve readability when minute hand is behind a number
* show the weekday and not the year

View File

@ -2,7 +2,8 @@
const defaultSettings = {
loadWidgets : false,
textAboveHands : false,
shortHrHand : false
shortHrHand : false,
weekdayNoYear : false
};
const settings = Object.assign(defaultSettings, require('Storage').readJSON('andark.json',1)||{});
@ -65,7 +66,9 @@ const drawText = function(d) {
g.setFont("Vector",10);
g.setBgColor(0,0,0);
g.setColor(1,1,1);
const dateStr = require("locale").date(d);
const dateStr = settings.weekdayNoYear
? require("locale").dow(d, 1)+" "+d.getDate()+" "+require("locale").month(d, 1)
: require("locale").date(d);
g.drawString(dateStr, c.x, c.y+20, true);
const batStr = Math.round(E.getBattery()/5)*5+"%";
if (Bangle.isCharging()) {

View File

@ -1,7 +1,7 @@
{ "id": "andark",
"name": "Analog Dark",
"shortName":"AnDark",
"version":"0.08",
"version":"0.09",
"description": "analog clock face without disturbing widgets",
"icon": "andark_icon.png",
"type": "clock",

View File

@ -2,7 +2,8 @@
const defaultSettings = {
loadWidgets : false,
textAboveHands : false,
shortHrHand : false
shortHrHand : false,
weekdayNoYear : false
}
let settings = Object.assign(defaultSettings, require('Storage').readJSON('andark.json',1)||{});
@ -22,6 +23,10 @@
value : !!settings.shortHrHand,
onchange : v => { settings.shortHrHand=v; save();}
},
/*LANG*/'Show weekday not year': {
value : !!settings.weekdayNoYear,
onchange : v => { settings.weekdayNoYear=v; save();}
},
};
E.showMenu(appMenu);