Added camera functionality
This commit is contained in:
@@ -90,6 +90,9 @@ loadDevTools().then(() => {
|
||||
changeDeviceID(ev) {
|
||||
window.browser_mod.deviceID = ev.target.value;
|
||||
}
|
||||
toggleCameraEnabled() {
|
||||
window.browser_mod.cameraEnabled = !window.browser_mod.cameraEnabled;
|
||||
}
|
||||
unregister_device(ev) {
|
||||
const deviceID = ev.currentTarget.deviceID;
|
||||
if (deviceID === window.browser_mod.deviceID)
|
||||
@@ -104,7 +107,7 @@ loadDevTools().then(() => {
|
||||
window.browser_mod.addEventListener("browser-mod-config-update", () => this.requestUpdate());
|
||||
}
|
||||
render() {
|
||||
var _a, _b, _c;
|
||||
var _a, _b, _c, _d;
|
||||
return $ `
|
||||
<ha-app-layout>
|
||||
<app-header slot="header" fixed>
|
||||
@@ -137,7 +140,13 @@ loadDevTools().then(() => {
|
||||
></ha-icon>
|
||||
`}
|
||||
</h1>
|
||||
<div class="card-content">Browser-mod not connected.</div>
|
||||
<div class="card-content">
|
||||
<p>Settings that apply to this browser.</p>
|
||||
<p>
|
||||
It is strongly recommended to refresh your browser window
|
||||
after any change to those settings.
|
||||
</p>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<ha-settings-row>
|
||||
<span slot="heading">Enable</span>
|
||||
@@ -168,7 +177,10 @@ loadDevTools().then(() => {
|
||||
>Get camera input from this device (hardware
|
||||
dependent)</span
|
||||
>
|
||||
<ha-switch> </ha-switch>
|
||||
<ha-switch
|
||||
.checked=${(_d = window.browser_mod) === null || _d === void 0 ? void 0 : _d.cameraEnabled}
|
||||
@change=${this.toggleCameraEnabled}
|
||||
></ha-switch>
|
||||
</ha-settings-row>
|
||||
</div>
|
||||
</ha-card>
|
||||
@@ -184,7 +196,10 @@ loadDevTools().then(() => {
|
||||
.datetime=${window.browser_mod.devices[d].last_seen}
|
||||
></ha-relative-time>
|
||||
</span>
|
||||
<ha-icon-button .deviceID=${d} @click=${this.unregister_device}>
|
||||
<ha-icon-button
|
||||
.deviceID=${d}
|
||||
@click=${this.unregister_device}
|
||||
>
|
||||
<ha-icon .icon=${"mdi:delete"}></ha-icon>
|
||||
</ha-icon-button>
|
||||
<ha-icon-button>
|
||||
|
||||
Reference in New Issue
Block a user