diff --git a/apps/jsonclock/README.md b/apps/jsonclock/README.md new file mode 100644 index 000000000..d449daad7 --- /dev/null +++ b/apps/jsonclock/README.md @@ -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) diff --git a/apps/jsonclock/app.js b/apps/jsonclock/app.js index 00b267e52..2bfd549b5 100644 --- a/apps/jsonclock/app.js +++ b/apps/jsonclock/app.js @@ -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}`; diff --git a/apps/jsonclock/dark.png b/apps/jsonclock/dark.png new file mode 100644 index 000000000..fcbc3e6ff Binary files /dev/null and b/apps/jsonclock/dark.png differ diff --git a/apps/jsonclock/light.png b/apps/jsonclock/light.png new file mode 100644 index 000000000..b5ecef0d6 Binary files /dev/null and b/apps/jsonclock/light.png differ diff --git a/apps/jsonclock/no_location.png b/apps/jsonclock/no_location.png new file mode 100644 index 000000000..5699ba7e3 Binary files /dev/null and b/apps/jsonclock/no_location.png differ diff --git a/apps/jsonclock/no_steps.png b/apps/jsonclock/no_steps.png new file mode 100644 index 000000000..5919aa0f2 Binary files /dev/null and b/apps/jsonclock/no_steps.png differ