From d064b6ea916b336e7ce3922c476207ab07f50263 Mon Sep 17 00:00:00 2001 From: Dermot Duffy Date: Sun, 26 Dec 2021 10:15:25 -0800 Subject: [PATCH] Move WebRTC in the editor from live -> cameras. --- src/editor.ts | 12 ++++++++---- src/localize/languages/en.json | 10 +++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/editor.ts b/src/editor.ts index 7f5616e6..2ee97ae3 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -21,6 +21,8 @@ import { CONF_CAMERAS_ARRAY_LABEL, CONF_CAMERAS_ARRAY_TITLE, CONF_CAMERAS_ARRAY_URL, + CONF_CAMERAS_ARRAY_WEBRTC_ENTITY, + CONF_CAMERAS_ARRAY_WEBRTC_URL, CONF_CAMERAS_ARRAY_ZONE, CONF_DIMENSIONS_ASPECT_RATIO, CONF_DIMENSIONS_ASPECT_RATIO_MODE, @@ -37,8 +39,6 @@ import { CONF_LIVE_CONTROLS_THUMBNAILS_SIZE, CONF_LIVE_PRELOAD, CONF_LIVE_PROVIDER, - CONF_LIVE_WEBRTC_ENTITY, - CONF_LIVE_WEBRTC_URL, CONF_MENU_BUTTONS_CLIPS, CONF_MENU_BUTTONS_FRIGATE, CONF_MENU_BUTTONS_FRIGATE_DOWNLOAD, @@ -427,6 +427,12 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor ${this._renderStringInput( getArrayConfigPath(CONF_CAMERAS_ARRAY_ID, cameraIndex), )} + ${this._renderDropdown( + getArrayConfigPath(CONF_CAMERAS_ARRAY_WEBRTC_ENTITY, cameraIndex), + cameraEntities)} + ${this._renderStringInput( + getArrayConfigPath(CONF_CAMERAS_ARRAY_WEBRTC_URL, cameraIndex), + )} ` : ``} `; @@ -664,8 +670,6 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor
${this._renderSwitch(CONF_LIVE_PRELOAD, defaults.live.preload)} ${this._renderDropdown(CONF_LIVE_PROVIDER, liveProviders)} - ${this._renderDropdown(CONF_LIVE_WEBRTC_ENTITY, cameraEntities)} - ${this._renderStringInput(CONF_LIVE_WEBRTC_URL)} ${this._renderDropdown( CONF_LIVE_CONTROLS_THUMBNAILS_MODE, thumbnailModes, diff --git a/src/localize/languages/en.json b/src/localize/languages/en.json index 90ddbcb5..7a8ed5b1 100644 --- a/src/localize/languages/en.json +++ b/src/localize/languages/en.json @@ -18,7 +18,11 @@ "frigate_url": "Frigate server URL", "title": "Title for this camera (Autodetected from entity)", "icon": "Icon for this camera (Autodetected from entity)", - "zone": "Frigate zone" + "zone": "Frigate zone", + "webrtc": { + "entity": "WebRTC Camera Entity (Not a Frigate camera)", + "url": "WebRTC Camera URL" + } }, "view": { "default": "Default view", @@ -66,10 +70,6 @@ "frigate-jsmpeg": "Frigate JSMpeg", "webrtc": "WebRTC" }, - "webrtc": { - "entity": "WebRTC Camera Entity (Not a Frigate camera)", - "url": "WebRTC Camera URL" - }, "controls": { "thumbnails": { "mode": "Live thumbnails mode",