дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 17:21:13 +02:00
Each dialog gets a native window over its project window: a full-height sidebar under the traffic lights, the title heading the content and the buttons in its corner. The windows hand their result back to the project window, which opens the created or cloned project or makes the remote connection and reports its progress. Remote windows and the browser build keep the dialogs in the page.
28 рядки
1014 B
TypeScript
28 рядки
1014 B
TypeScript
/**
|
|
* The New Project window (`new-project-<parent>`): the wizard in its own native window. The
|
|
* created project opens from the parent project window, which then has it (or a new window).
|
|
*/
|
|
import { emitTo } from "@tauri-apps/api/event";
|
|
import { closeDialogWindow, useDialogWindow } from "@/workbench/dialogWindow";
|
|
import { OverlayHost } from "@/workbench/OverlayHost";
|
|
import { useApplyTheme } from "@/workbench/theme";
|
|
import { WindowResizeHandles } from "@/workbench/WindowResizeHandles";
|
|
import { NEW_PROJECT_CREATED, NewProjectDialog } from "./NewProject";
|
|
|
|
export function NewProjectWindow() {
|
|
useApplyTheme();
|
|
const parent = useDialogWindow((s) => s.parent);
|
|
const created = async (dir: string) => {
|
|
if (!parent) return;
|
|
await emitTo(parent, NEW_PROJECT_CREATED, { dir });
|
|
closeDialogWindow();
|
|
};
|
|
return (
|
|
<>
|
|
{parent && <NewProjectDialog standalone onClose={closeDialogWindow} onCreated={created} />}
|
|
<OverlayHost />
|
|
<WindowResizeHandles />
|
|
</>
|
|
);
|
|
}
|