Format Dashboard.jsx: add trailing commas

Apply consistent formatting to ui/src/pages/Dashboard/Dashboard.jsx by adding trailing commas in object literals, function call argument lists, and callbacks (primarily around WebRTC handling and error messages). This is a non-functional style change to match the project's code style (e.g., Prettier/ESLint) and should not affect runtime behavior.
This commit is contained in:
Cédric Verstraeten
2026-03-09 21:29:30 +01:00
parent f64b5fb65b
commit 2ad768780f
+10 -10
View File
@@ -252,7 +252,7 @@ class Dashboard extends React.Component {
client_id: this.webrtcClientId,
message_type: messageType,
message,
})
}),
);
}
@@ -286,7 +286,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;
@@ -304,7 +304,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;
@@ -312,7 +312,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;
@@ -339,7 +339,7 @@ class Dashboard extends React.Component {
});
} catch (error) {
this.fallbackToSDLiveview(
`Unable to initialise WebRTC liveview: ${error.message}`
`Unable to initialise WebRTC liveview: ${error.message}`,
);
}
}
@@ -359,7 +359,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;
}
@@ -378,7 +378,7 @@ class Dashboard extends React.Component {
this.pendingRemoteCandidates = [];
this.webrtcPeerConnection = new window.RTCPeerConnection(
this.buildPeerConnectionConfig()
this.buildPeerConnectionConfig(),
);
this.webrtcPeerConnection.ontrack = (event) => {
@@ -421,7 +421,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.`,
);
}
};
@@ -445,7 +445,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);
@@ -478,7 +478,7 @@ class Dashboard extends React.Component {
},
() => {
this.initialiseSDLiveview();
}
},
);
}