"use client"; import { useNavigation } from "../navigation"; import { useImmersiveMode } from "../platform"; import { ArrowLeft } from "lucide-react"; import { Button } from "@multica/ui/components/ui/button"; import { Dialog, DialogContent, DialogTitle, DialogDescription, } from "@multica/ui/components/ui/dialog"; import { paths } from "@multica/core/paths"; import { CreateWorkspaceForm } from "../workspace/create-workspace-form"; export function CreateWorkspaceModal({ onClose }: { onClose: () => void }) { // This modal is full-screen, so it covers the app titlebar. On macOS desktop // we hide the traffic lights for its lifetime so the Back button in the top- // left corner isn't stolen by the native controls' hit-test. No-op elsewhere. useImmersiveMode(); const router = useNavigation(); return ( { if (!v) onClose(); }} > {/* Top drag region — restores window-drag ability that the full-screen modal would otherwise swallow. Transparent; web browsers ignore the -webkit-app-region property, so this is safe cross-platform. */}
Create a new workspace Workspaces are shared environments where teams can work on projects and issues.
{ onClose(); // Navigate INTO the new workspace. The mutation's own onSuccess // (in core/workspace/mutations.ts) runs before this callback and // has already seeded the workspace list cache, so the destination // [workspaceSlug]/layout will resolve newWs.slug → workspace // synchronously without a loading flash. router.push(paths.workspace(newWs.slug).issues()); }} />
); }