diff --git a/packages/frontend/src/components/server-configuration-dialog.tsx b/packages/frontend/src/components/server-configuration-dialog.tsx index f4b0729..ab100b2 100644 --- a/packages/frontend/src/components/server-configuration-dialog.tsx +++ b/packages/frontend/src/components/server-configuration-dialog.tsx @@ -1,5 +1,6 @@ import { CheckIcon, ServerIcon, Undo2 } from "lucide-react"; import { type ReactNode, useState } from "react"; +import { createPortal } from "react-dom"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"; import { Input } from "@/components/ui/input"; @@ -108,76 +109,79 @@ export function ServerConfigurationDialog({ trigger }: { trigger?: ReactNode }) }; return ( - - - {trigger || ( - - )} - + <> + + + {trigger || ( + + )} + - - - Server Configuration - + + + Server Configuration + -
-
- -
- handleServerURLChange(e.target.value)} - onKeyDown={(e) => { - if (e.key === "Enter" && canSave && !isCheckingHealth) { - e.preventDefault(); - void handleSave(); - } - }} - placeholder="https://example.com" - className={!isValid ? "border-destructive" : ""} - /> - - +
+
+ +
+ handleServerURLChange(e.target.value)} + onKeyDown={(e) => { + if (e.key === "Enter" && canSave && !isCheckingHealth) { + e.preventDefault(); + void handleSave(); + } + }} + placeholder="https://example.com" + className={!isValid ? "border-destructive" : ""} + /> + + +
+ {!isValid && ( + + )} + {healthError && }
- {!isValid && ( - - )} - {healthError && }
-
- - - {countdown !== null && ( -
-
Redirecting
-
{countdown}
-
- )} -
+ +
+ {countdown !== null && + createPortal( +
+
Redirecting
+
{countdown}
+
, + document.body, + )} + ); }