diff --git a/ui/src/components/Terminal.tsx b/ui/src/components/Terminal.tsx
index 38927ea..5451afe 100644
--- a/ui/src/components/Terminal.tsx
+++ b/ui/src/components/Terminal.tsx
@@ -61,9 +61,9 @@ function Terminal({
dataChannel,
type,
}: {
- title: string;
- dataChannel: RTCDataChannel;
- type: AvailableTerminalTypes;
+ readonly title: string;
+ readonly dataChannel: RTCDataChannel;
+ readonly type: AvailableTerminalTypes;
}) {
const enableTerminal = useUiStore(state => state.terminalType == type);
const setTerminalType = useUiStore(state => state.setTerminalType);
diff --git a/ui/src/components/popovers/PasteModal.tsx b/ui/src/components/popovers/PasteModal.tsx
index 70b3067..ed642a8 100644
--- a/ui/src/components/popovers/PasteModal.tsx
+++ b/ui/src/components/popovers/PasteModal.tsx
@@ -131,7 +131,7 @@ export default function PasteModal() {
}}
>
-
e.stopPropagation()}>
+
e.stopPropagation()} onKeyDown={e => e.stopPropagation()}>
{
if (!peerConnection) return;
if (!kvmTerminal) {
- // console.log('Creating data channel "terminal"');
setKvmTerminal(peerConnection.createDataChannel("terminal"));
}
if (!serialConsole) {
- // console.log('Creating data channel "serial"');
setSerialConsole(peerConnection.createDataChannel("serial"));
}
}, [kvmTerminal, peerConnection, serialConsole]);
@@ -755,10 +753,10 @@ export default function KvmIdRoute() {
const ConnectionStatusElement = useMemo(() => {
const hasConnectionFailed =
- connectionFailed || ["failed", "closed"].includes(peerConnectionState || "");
+ connectionFailed || ["failed", "closed"].includes(peerConnectionState ?? "");
const isPeerConnectionLoading =
- ["connecting", "new"].includes(peerConnectionState || "") ||
+ ["connecting", "new"].includes(peerConnectionState ?? "") ||
peerConnection === null;
const isDisconnected = peerConnectionState === "disconnected";
@@ -826,7 +824,7 @@ export default function KvmIdRoute() {
isLoggedIn={authMode === "password" || !!user}
userEmail={user?.email}
picture={user?.picture}
- kvmName={deviceName || "JetKVM Device"}
+ kvmName={deviceName ?? "JetKVM Device"}
/>
@@ -846,6 +844,9 @@ export default function KvmIdRoute() {
e.stopPropagation()}
+ onMouseUp={e => e.stopPropagation()}
+ onMouseDown={e => e.stopPropagation()}
onKeyUp={e => e.stopPropagation()}
onKeyDown={e => {
e.stopPropagation();
@@ -869,7 +870,12 @@ export default function KvmIdRoute() {
);
}
-function SidebarContainer({ sidebarView }: { sidebarView: string | null }) {
+interface SidebarContainerProps {
+ readonly sidebarView: string | null;
+}
+
+function SidebarContainer(props: SidebarContainerProps) {
+ const { sidebarView }= props;
return (