mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
Added charging state to the uploader battery pill when it's provided by AAPSClientV3. (#7873)
Co-authored-by: Sulka Haro <sulka@sulka.net>
This commit is contained in:
co-authored by
Sulka Haro
parent
d1fe8f50da
commit
0f69153779
@@ -72,6 +72,7 @@ function init(ctx) {
|
||||
|
||||
var battery = uploaderStatus.battery;
|
||||
var voltage = uploaderStatus.batteryVoltage;
|
||||
var charging = status.isCharging ? status.isCharging : false;
|
||||
var voltageDisplay;
|
||||
|
||||
if (voltage) {
|
||||
@@ -93,7 +94,7 @@ function init(ctx) {
|
||||
uploaderStatus.voltageDisplay = voltageDisplay;
|
||||
}
|
||||
|
||||
uploaderStatus.display = battery ? battery + '%' : voltageDisplay;
|
||||
uploaderStatus.display = (battery ? battery + '%' : voltageDisplay) + (charging ? "⚡" : "");
|
||||
|
||||
if (battery >= 95) {
|
||||
uploaderStatus.level = 100;
|
||||
|
||||
Reference in New Issue
Block a user