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.
This commit is contained in:
Cédric Verstraeten
2026-03-09 21:23:16 +01:00
parent fc6fa9d425
commit bb773316a2
2 changed files with 12 additions and 13 deletions
+8 -8
View File
@@ -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);
+4 -5
View File
@@ -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;