Fixes for iOS and FKB
This commit is contained in:
@@ -11,15 +11,20 @@ export const BrowserModBrowserMixin = (C) => class extends C {
|
||||
}
|
||||
|
||||
sensor_update() {
|
||||
this.sendUpdate({browser: {
|
||||
path: window.location.pathname,
|
||||
visibility: document.visibilityState,
|
||||
userAgent: navigator.userAgent,
|
||||
currentUser: this._hass &&this._hass.user && this._hass.user.name,
|
||||
fullyKiosk: this.isFully,
|
||||
width: window.innerWidth,
|
||||
height: window.innerHeight,
|
||||
}});
|
||||
window.queueMicrotask( async () => {
|
||||
const battery = navigator.getBattery ? await navigator.getBattery() : undefined;
|
||||
this.sendUpdate({browser: {
|
||||
path: window.location.pathname,
|
||||
visibility: document.visibilityState,
|
||||
userAgent: navigator.userAgent,
|
||||
currentUser: this._hass &&this._hass.user && this._hass.user.name,
|
||||
fullyKiosk: this.isFully,
|
||||
width: window.innerWidth,
|
||||
height: window.innerHeight,
|
||||
battery: this.isFully ? window.fully.getBatteryLevel() : battery ? battery.level*100 : undefined,
|
||||
charging: this.isFully ? window.fully.isPlugged() : battery ? battery.charging : undefined,
|
||||
}});
|
||||
});
|
||||
}
|
||||
|
||||
do_navigate(path) {
|
||||
|
||||
Reference in New Issue
Block a user