Configurable clock views (#5625)

* Configurable clock views

* Configurable clock views

* Configurable clock views

* Configurable clock views

* Configurable clock views

* Configurable clock views

* Update README.md

* Update README.md

* Configurable clock views
This commit is contained in:
ireneusz-ptak
2020-06-12 17:29:15 +03:00
committed by GitHub
parent f3fab567c5
commit 3d6f488eda
11 changed files with 267 additions and 192 deletions
+20 -2
View File
@@ -306,11 +306,29 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or
### Views
There are a few alternate web views available from the main menu that display a simplified BG stream. (If you launch one of these in a fullscreen view in iOS, you can use a left-to-right swipe gesture to exit the view.)
Nightscout allows to create custom, simplified views using a predefined set of elements. This option is available under `[+]` link in the main menu.
List of available items:
* `SGV` - Sensor Glucose Value
* `SGV age` - time since the last SGV read
* `SGV delta` - change of SGV in the last 5 minutes
* `Trend arrow` - icon of the SG trend
* `Time` - current time
* `Line break` - invisible item that will move following items to the next line (by default all are showing on the same level)
All visible items have `Size` property which allows to customize the view even more. Also, all items may appear multiple times on the view.
Apart from adding items, it is possible to customize other aspects of the views, like selecting `Color` or `Black` background. The first one will indicate current BG threshold (green = in range; blue = below range; yellow = above range; red = urgent below/above).
`Show SGV age` option will make `SGV age` item appear `Always` or only if the predefined threshold is reached: `Only after threshold`. Breaching `SGV age threshold` will also make `Color` background turn grey and strike through `SGV`.
`Clock view configurator` will generate an URL (available under `Open my clock view!` link) that could be bookmarked.
There are a few default views available from the main menu:
* `Clock` - Shows current BG, trend arrow, and time of day. Grey text on a black background.
* `Color` - Shows current BG and trend arrow. White text on a background that changes color to indicate current BG threshold (green = in range; blue = below range; yellow = above range; red = urgent below/above). Set `SHOW_CLOCK_DELTA` to `true` to show BG change in the last 5 minutes, set `SHOW_CLOCK_LAST_TIME` to `true` to always show BG age.
* `Color` - Shows current BG and trend arrow. White text on a color background.
* `Simple` - Shows current BG. Grey text on a black background.
If you launch one of these views in a fullscreen view in iOS, you can use a left-to-right swipe gesture to exit the view.
### Split View
Some users will need easy access to multiple Nightscout views at the same time. We have a special view for this case, accessed on /split path on your Nightscout URL. The view supports any number of sites between 1 to 8 way split, where the content for the screen can be loaded from multiple Nightscout instances. Note you still need to host separate instances for each Nightscout being monitored including the one that hosts the split view page - these variables only add the ability to load multiple views into one browser page. To set the URLs from which the content is loaded, set: