fix: Fix component ordering during reboots in failsafe mode

This commit is contained in:
Adam Shiervani 2025-11-20 17:24:50 +01:00
parent d5ebcda128
commit ec072a3a46
1 changed files with 7 additions and 5 deletions

View File

@ -615,7 +615,7 @@ export default function KvmIdRoute() {
}); });
}, 10000); }, 10000);
const { setNetworkState } = useNetworkStateStore(); const { setNetworkState } = useNetworkStateStore();
const { setHdmiState } = useVideoStore(); const { setHdmiState } = useVideoStore();
const { const {
keyboardLedState, setKeyboardLedState, keyboardLedState, setKeyboardLedState,
@ -815,6 +815,10 @@ export default function KvmIdRoute() {
return <RebootingOverlay show={true} postRebootAction={rebootState.postRebootAction} />; return <RebootingOverlay show={true} postRebootAction={rebootState.postRebootAction} />;
} }
if (isFailsafeMode && failsafeReason) {
return <FailSafeModeOverlay reason={failsafeReason} />;
}
const hasConnectionFailed = const hasConnectionFailed =
connectionFailed || ["failed", "closed"].includes(peerConnectionState ?? ""); connectionFailed || ["failed", "closed"].includes(peerConnectionState ?? "");
@ -839,7 +843,7 @@ export default function KvmIdRoute() {
} }
return null; return null;
}, [location.pathname, rebootState?.isRebooting, rebootState?.postRebootAction, connectionFailed, peerConnectionState, peerConnection, setupPeerConnection, loadingMessage]); }, [location.pathname, rebootState?.isRebooting, rebootState?.postRebootAction, isFailsafeMode, failsafeReason, connectionFailed, peerConnectionState, peerConnection, setupPeerConnection, loadingMessage]);
return ( return (
<FeatureFlagProvider appVersion={appVersion}> <FeatureFlagProvider appVersion={appVersion}>
@ -887,9 +891,7 @@ export default function KvmIdRoute() {
className="animate-slideUpFade pointer-events-none absolute inset-0 flex items-center justify-center p-4" className="animate-slideUpFade pointer-events-none absolute inset-0 flex items-center justify-center p-4"
> >
<div className="relative h-full max-h-[720px] w-full max-w-[1280px] rounded-md"> <div className="relative h-full max-h-[720px] w-full max-w-[1280px] rounded-md">
{isFailsafeMode && failsafeReason ? ( {!!ConnectionStatusElement && ConnectionStatusElement}
<FailSafeModeOverlay reason={failsafeReason} />
) : !!ConnectionStatusElement && ConnectionStatusElement}
</div> </div>
</div> </div>
<SidebarContainer sidebarView={sidebarView} /> <SidebarContainer sidebarView={sidebarView} />