@@ -715,12 +715,10 @@ export default function KvmIdRoute() {
715
715
useEffect ( ( ) => {
716
716
if ( ! peerConnection ) return ;
717
717
if ( ! kvmTerminal ) {
718
- // console.log('Creating data channel "terminal"');
719
718
setKvmTerminal ( peerConnection . createDataChannel ( "terminal" ) ) ;
720
719
}
721
720
722
721
if ( ! serialConsole ) {
723
- // console.log('Creating data channel "serial"');
724
722
setSerialConsole ( peerConnection . createDataChannel ( "serial" ) ) ;
725
723
}
726
724
} , [ kvmTerminal , peerConnection , serialConsole ] ) ;
@@ -755,10 +753,10 @@ export default function KvmIdRoute() {
755
753
756
754
const ConnectionStatusElement = useMemo ( ( ) => {
757
755
const hasConnectionFailed =
758
- connectionFailed || [ "failed" , "closed" ] . includes ( peerConnectionState || "" ) ;
756
+ connectionFailed || [ "failed" , "closed" ] . includes ( peerConnectionState ?? "" ) ;
759
757
760
758
const isPeerConnectionLoading =
761
- [ "connecting" , "new" ] . includes ( peerConnectionState || "" ) ||
759
+ [ "connecting" , "new" ] . includes ( peerConnectionState ?? "" ) ||
762
760
peerConnection === null ;
763
761
764
762
const isDisconnected = peerConnectionState === "disconnected" ;
@@ -826,7 +824,7 @@ export default function KvmIdRoute() {
826
824
isLoggedIn = { authMode === "password" || ! ! user }
827
825
userEmail = { user ?. email }
828
826
picture = { user ?. picture }
829
- kvmName = { deviceName || "JetKVM Device" }
827
+ kvmName = { deviceName ?? "JetKVM Device" }
830
828
/>
831
829
832
830
< div className = "relative flex h-full w-full overflow-hidden" >
@@ -846,6 +844,9 @@ export default function KvmIdRoute() {
846
844
847
845
< div
848
846
className = "z-50"
847
+ onClick = { e => e . stopPropagation ( ) }
848
+ onMouseUp = { e => e . stopPropagation ( ) }
849
+ onMouseDown = { e => e . stopPropagation ( ) }
849
850
onKeyUp = { e => e . stopPropagation ( ) }
850
851
onKeyDown = { e => {
851
852
e . stopPropagation ( ) ;
@@ -869,7 +870,12 @@ export default function KvmIdRoute() {
869
870
) ;
870
871
}
871
872
872
- function SidebarContainer ( { sidebarView } : { sidebarView : string | null } ) {
873
+ interface SidebarContainerProps {
874
+ readonly sidebarView : string | null ;
875
+ }
876
+
877
+ function SidebarContainer ( props : SidebarContainerProps ) {
878
+ const { sidebarView } = props ;
873
879
return (
874
880
< div
875
881
className = { cx (
0 commit comments