{
if (step === "extension") {
window.open(OPENGENI_BROWSER_EXTENSION_URL, "_blank", "noopener,noreferrer");
chrome.watch();
return;
}
if (!offerThisComputer) return setSetupOpen(true);
if (desktop.computer.acting) return;
if (thisComputerNeedsPermissions(desktop.computer.status)) return desktop.openSetup();
void (
desktop.computer.status?.state === "paused"
? desktop.computer.resume().then(() => desktop.computer.status)
: desktop.computer.connect({ screenControl: false })
).then((next) => {
if (thisComputerNeedsPermissions(next)) desktop.openSetup();
void fleet.refresh();
});
}}
onClose={() => setSetupOpen(false)}
opener={opener}
cardRef={cardRef}
details={
chrome.connected && (canContinue || sendError) ? (
{sendError ? (
{`Couldn't send. ${sendError}`}
) : null}
{canContinue ? (
) : null}
) : null
}
/>
{fleet.canManage && !unavailableOnDeployment ? (
{
if (!open) setSetupOpen(false);
}}
workspaceId={workspaceId}
sessionId={sessionId}
origin={origin}
machines={fleet.machines}
machinesLoading={fleet.loading}
machinesError={fleet.error}
personalWorkspace={
context.workspaces?.find((workspace) => workspace.id === workspaceId)?.kind ===
"personal"
}
defaultScope="user"
/>
) : null}
>
);
}