bugfix and added readme

master
David Volovskiy 2025-04-19 16:49:22 -04:00
parent 81755f82e8
commit 88e0322e97
6 changed files with 20 additions and 1 deletions

19
apps/jsonclock/README.md Normal file
View File

@ -0,0 +1,19 @@
# JSON Clock ![](app.png)
*JSON view of the time.*
Written by: [David Volvoskiy](https://github.com/voloved) and fully
inspired by [This FitBit face](https://github.com/Sharkgrammer/clockface.json)
* Displays a JSON that shows the date, time, step count, sunrise/set and battery.
* If the Bangle's theme is dark, then it'll show in dark view (`Settings>System>Theme>Dark BW`)
* It'll show 12 hrs if it's set so in `Settings>System>Locale>Time Format`
* Along with the physical button, you can leave the clock by pressing the `X` next to the `clockface.json` in the tab.
* If the steps cannot be gotten, they won't display
* If the location isn't set, then the JSON array will ignore the sun info and instead display the time as a struct.
## Screenshots
![](dark.png)
![](white.png)
![](no_steps.png)
![](no_location.png)

View File

@ -61,7 +61,7 @@ function getHr(h) {
function extractTime(d) {
const out = getHr(d.getHours());
const hr = out[0];
const h = out[0];
const amPm = out[1];
const m = d.getMinutes();
return `${h}:${("0"+m).substr(-2)}${amPm}`;

BIN
apps/jsonclock/dark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
apps/jsonclock/light.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
apps/jsonclock/no_steps.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB