Anton clock: Smaller seconds, weekday with seconds, seconds without colon, cleaner configuration
parent
7829af0ef2
commit
d36743032c
|
|
@ -11,8 +11,8 @@ The basic time representation only shows hours and minutes of the current time.
|
|||
* Date can be shown in three different formats:
|
||||
* ISO-8601: 2021-12-19
|
||||
* short local format: 19/12/2021, 19.12.2021
|
||||
* long local format (not together with seconds): DEC 19 2021
|
||||
* Weekday can be shown (not together with seconds)
|
||||
* long local format: DEC 19 2021
|
||||
* Weekday can be shown (on seconds screen only instead of year)
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
@ -33,9 +33,10 @@ You configure Anton clock through several "on/off" switches in two menus.
|
|||
The main menu contains several settings covering Anton clock in general.
|
||||
|
||||
* **Seconds...** - Opens the submenu for configuring the presentation of the current time's seconds.
|
||||
* **ISO8601 date** - Show the date in ISO-8601 format, irrespective of the current locale.
|
||||
* **Long date** - Show the date in long format (usually with month in letters instead of number).
|
||||
Exact format depends on the current locale. _Only evaluated if ISO8601 date is not set._
|
||||
* **Date** - Format of the date representation. Possible values are
|
||||
* **Long** - "Long" date format in the current locale. Usually with the month as name, not number.
|
||||
* **Short** - "Short" date format in the current locale. Usually with the month as number.
|
||||
* **ISO8601** - Show the date in ISO-8601 format (YYYY-MM-DD), irrespective of the current locale.
|
||||
* **Show Weekday** - Weekday is shown in the time presentation without seconds.
|
||||
Weekday name depends on the current locale.
|
||||
If seconds are shown, the weekday is never shown as there is not enough space on the watch face.
|
||||
|
|
@ -49,21 +50,28 @@ Otherwise, a scaled version of the built-in 6x8 pixels font is used.
|
|||
|
||||
The "Seconds" submenu configures how (and if) seconds are shown on the "Anton" watch face.
|
||||
|
||||
* **Always** - Seconds are _always_ shown, irrespective of the display's unlock state.
|
||||
If this is enabled, weekdays will never been shown.
|
||||
_Enabling this option increases power consumption as the watch face will update once per second instead of once per minute._
|
||||
* **If unlocked** - Seconds are shown if the display is unlocked.
|
||||
On a locked display, only hour, minutes, date and weekday are shown.
|
||||
"Always" overrides this option.
|
||||
* **Show** - Configure when the seconds should be shown at all:
|
||||
* **Never** - Seconds are never shown.
|
||||
In this case, hour and minute are a bit more centered on the screen and the clock will always only update every minute.
|
||||
This saves battery power.
|
||||
* **Unlocked** - Seconds are shown if the display is unlocked.
|
||||
On locked displays, only hour, minutes, date and optionally the weekday are shown.
|
||||
_This option is highly recommended on the Bangle.js 2!_
|
||||
* **Coloured** - If enabled, seconds are shown in blue instead of black.
|
||||
* **Always** - Seconds are _always_ shown, irrespective of the display's unlock state.
|
||||
_Enabling this option increases power consumption as the watch face will update once per second instead of once per minute._
|
||||
* **With ":"** - If enabled, a colon ":" is prepended to the seconds.
|
||||
This resembles the usual time representation "hh:mm:ss", even though the seconds are printed on a separate line.
|
||||
* **Color** - If enabled, seconds are shown in blue instead of black.
|
||||
If the date is shown on the seconds screen, it is colored read instead of black.
|
||||
This make the visual orientation much easier on the watch face.
|
||||
* **With date** - If enabled, the date is shown together with the seconds.
|
||||
Depending on the "ISO8601 date" settings, ISO8601 or short local format is used.
|
||||
The date is coloured in red if the "Coloured" option is chosen.
|
||||
* **Date** - It is possible to show the date together with the seconds:
|
||||
* **No** - Date is _not_ shown in the seconds screen.
|
||||
In this case, the seconds are centered below hour and minute.
|
||||
* **Year** - Date is shown with day, month, and year. If "Date" in the main settings is configured to _ISO8601_, this is used here, too. Otherwise, the short local format is used.
|
||||
* **Weekday** - Date is shown with day, month, and weekday.
|
||||
|
||||
If neither "Always" nor "If unlocked" is selected, Anton clock does _never_ show seconds.
|
||||
The date is coloured in red if the "Coloured" option is chosen.
|
||||
|
||||
## Compatibility
|
||||
|
||||
Anton clock makes use of core Bangle.js 2 features (coloured display, display lock state). It also runs on the Bangle.js 1 but these features are not available there due to the hardware features.
|
||||
Anton clock makes use of core Bangle.js 2 features (coloured display, display lock state). It also runs on the Bangle.js 1 but these features are not available there due to hardware restrictions.
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -11,28 +11,34 @@
|
|||
require('Storage').writeJSON(FILE, settings);
|
||||
}
|
||||
|
||||
// Helper method which uses int-based menu item for set of string values
|
||||
function stringItems(startvalue, writer, values) {
|
||||
return {
|
||||
value: (startvalue === undefined ? 0 : values.indexOf(startvalue)),
|
||||
format: v => values[v],
|
||||
min: 0,
|
||||
max: values.length - 1,
|
||||
wrap: true,
|
||||
step: 1,
|
||||
onchange: v => {
|
||||
writer(values[v]);
|
||||
writeSettings();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Helper method which breaks string set settings down to local settings object
|
||||
function stringInSettings(name, values) {
|
||||
return stringItems(settings[name], v => settings[name] = v, values);
|
||||
}
|
||||
|
||||
var mainmenu = {
|
||||
"": {
|
||||
"title": "Anton clock"
|
||||
},
|
||||
"< Back": () => back(),
|
||||
"Seconds...": () => E.showMenu(secmenu),
|
||||
"ISO8601 date": {
|
||||
value: (settings.dateAsISO !== undefined ? settings.dateAsISO : false),
|
||||
format: v => v ? "On" : "Off",
|
||||
onchange: v => {
|
||||
settings.dateAsISO = v;
|
||||
writeSettings();
|
||||
}
|
||||
},
|
||||
"Long date": {
|
||||
value: (settings.longDate !== undefined ? settings.longDate : true),
|
||||
format: v => v ? "On" : "Off",
|
||||
onchange: v => {
|
||||
settings.longDate = v;
|
||||
writeSettings();
|
||||
}
|
||||
},
|
||||
"Date": stringInSettings("dateOnMain", ["Short", "Long", "ISO8601"]),
|
||||
"Show Weekday": {
|
||||
value: (settings.weekDay !== undefined ? settings.weekDay : true),
|
||||
format: v => v ? "On" : "Off",
|
||||
|
|
@ -65,23 +71,16 @@
|
|||
"title": "Show seconds..."
|
||||
},
|
||||
"< Back": () => E.showMenu(mainmenu),
|
||||
"Always": {
|
||||
value: (settings.secondsAlways !== undefined ? settings.secondsAlways : false),
|
||||
"Show": stringInSettings("secondsMode", ["Never", "Unlocked", "Always"]),
|
||||
"With \":\"": {
|
||||
value: (settings.secondsWithColon !== undefined ? settings.secondsWithColon : false),
|
||||
format: v => v ? "On" : "Off",
|
||||
onchange: v => {
|
||||
settings.secondsAlways = v;
|
||||
settings.secondsWithColon = v;
|
||||
writeSettings();
|
||||
}
|
||||
},
|
||||
"If unlocked": {
|
||||
value: (settings.secondsOnUnlock !== undefined ? settings.secondsOnUnlock : false),
|
||||
format: v => v ? "On" : "Off",
|
||||
onchange: v => {
|
||||
settings.secondsOnUnlock = v;
|
||||
writeSettings();
|
||||
}
|
||||
},
|
||||
"Coloured": {
|
||||
"Color": {
|
||||
value: (settings.secondsColoured !== undefined ? settings.secondsColoured : false),
|
||||
format: v => v ? "On" : "Off",
|
||||
onchange: v => {
|
||||
|
|
@ -89,14 +88,7 @@
|
|||
writeSettings();
|
||||
}
|
||||
},
|
||||
"With date": {
|
||||
value: (settings.dateOnSecs !== undefined ? settings.dateOnSecs : false),
|
||||
format: v => v ? "On" : "Off",
|
||||
onchange: v => {
|
||||
settings.dateOnSecs = v;
|
||||
writeSettings();
|
||||
}
|
||||
}
|
||||
"Date": stringInSettings("dateOnSecs", ["No", "Year", "Weekday"])
|
||||
};
|
||||
|
||||
// Actually display the menu
|
||||
|
|
|
|||
Loading…
Reference in New Issue