From bb773316a299194bc3551f394c363a7e56eb7aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Verstraeten?= Date: Mon, 9 Mar 2026 21:23:16 +0100 Subject: [PATCH] Add trailing commas and tidy Media.scss Add trailing commas to multi-line function calls and RTCPeerConnection instantiation in Dashboard.jsx for consistent formatting. In Media.scss remove an extra blank line and relocate the .media-filters__field:first-child rule to consolidate related styles. Purely stylistic/organizational changes with no intended behavior change. --- ui/src/pages/Dashboard/Dashboard.jsx | 16 ++++++++-------- ui/src/pages/Media/Media.scss | 9 ++++----- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/ui/src/pages/Dashboard/Dashboard.jsx b/ui/src/pages/Dashboard/Dashboard.jsx index ec1a632..49a796d 100644 --- a/ui/src/pages/Dashboard/Dashboard.jsx +++ b/ui/src/pages/Dashboard/Dashboard.jsx @@ -271,7 +271,7 @@ class Dashboard extends React.Component { await this.flushPendingRemoteCandidates(); } catch (error) { this.fallbackToSDLiveview( - `Unable to apply WebRTC answer: ${error.message}` + `Unable to apply WebRTC answer: ${error.message}`, ); } break; @@ -289,7 +289,7 @@ class Dashboard extends React.Component { } } catch (error) { this.fallbackToSDLiveview( - `Unable to apply WebRTC candidate: ${error.message}` + `Unable to apply WebRTC candidate: ${error.message}`, ); } break; @@ -297,7 +297,7 @@ class Dashboard extends React.Component { case 'webrtc-error': this.fallbackToSDLiveview( - message.message || 'The agent could not start the WebRTC liveview.' + message.message || 'The agent could not start the WebRTC liveview.', ); break; @@ -324,7 +324,7 @@ class Dashboard extends React.Component { }); } catch (error) { this.fallbackToSDLiveview( - `Unable to initialise WebRTC liveview: ${error.message}` + `Unable to initialise WebRTC liveview: ${error.message}`, ); } } @@ -344,7 +344,7 @@ class Dashboard extends React.Component { await this.webrtcPeerConnection.addIceCandidate(candidateInit); } catch (error) { this.fallbackToSDLiveview( - `Unable to add remote ICE candidate: ${error.message}` + `Unable to add remote ICE candidate: ${error.message}`, ); return; } @@ -363,7 +363,7 @@ class Dashboard extends React.Component { this.pendingRemoteCandidates = []; this.webrtcPeerConnection = new window.RTCPeerConnection( - this.buildPeerConnectionConfig() + this.buildPeerConnectionConfig(), ); this.webrtcPeerConnection.ontrack = (event) => { @@ -406,7 +406,7 @@ class Dashboard extends React.Component { connectionState === 'closed' ) { this.fallbackToSDLiveview( - `WebRTC connection ${connectionState}, falling back to SD liveview.` + `WebRTC connection ${connectionState}, falling back to SD liveview.`, ); } }; @@ -430,7 +430,7 @@ class Dashboard extends React.Component { const { liveviewLoaded } = this.state; if (!liveviewLoaded) { this.fallbackToSDLiveview( - 'WebRTC connection timed out, falling back to SD liveview.' + 'WebRTC connection timed out, falling back to SD liveview.', ); } }, 10000); diff --git a/ui/src/pages/Media/Media.scss b/ui/src/pages/Media/Media.scss index 7179459..17883b8 100644 --- a/ui/src/pages/Media/Media.scss +++ b/ui/src/pages/Media/Media.scss @@ -1,5 +1,4 @@ #media { - .media-control-bar { .control-bar { display: block; @@ -58,10 +57,6 @@ width: 100%; } - .media-filters__field:first-child .media-filters__input { - padding-left: 0; - } - .media-filters__input::-webkit-datetime-edit, .media-filters__input::-webkit-datetime-edit-fields-wrapper { padding: 0; @@ -72,6 +67,10 @@ outline: 0; } + .media-filters__field:first-child .media-filters__input { + padding-left: 0; + } + .media-filters__field:last-child { border-right: 0; padding-right: 0;