From 67d280df847794bdbf7c40870c90abc990938258 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Fri, 9 May 2025 20:38:05 +0700 Subject: [PATCH] remove old demo modal --- .../app/src/pages/PageEnigma/PageEditor.tsx | 241 +++++++++--------- 1 file changed, 117 insertions(+), 124 deletions(-) diff --git a/frontend/apps/editor3d/app/src/pages/PageEnigma/PageEditor.tsx b/frontend/apps/editor3d/app/src/pages/PageEnigma/PageEditor.tsx index 36d55c9298..f6834fd166 100644 --- a/frontend/apps/editor3d/app/src/pages/PageEnigma/PageEditor.tsx +++ b/frontend/apps/editor3d/app/src/pages/PageEnigma/PageEditor.tsx @@ -1,5 +1,4 @@ import React, { useContext, useEffect } from "react"; -import { invoke } from "@tauri-apps/api/core"; import { useSignals } from "@preact/signals-react/runtime"; import { LoadingDots, TopBar } from "~/components"; import { Controls3D } from "./comps/Controls3D"; @@ -32,7 +31,14 @@ import { FocalLengthDisplay } from "./comps/FocalLengthDisplay/FocalLengthDispla import { appTabId, setAppTabId } from "~/signals/appTab"; import { KonvaCanvasContainer } from "../Page2d/KonvaCanvasContainer"; import { KonvaRootComponent } from "../Page2d/KonvaRootComponent"; -import { addCamera, cameras, deleteCamera, focalLengthDragging, selectedCameraId, updateCamera } from "./signals/camera"; +import { + addCamera, + cameras, + deleteCamera, + focalLengthDragging, + selectedCameraId, + updateCamera, +} from "./signals/camera"; import { isPromptBoxFocused } from "./signals/promptBox"; import { uploadImage } from "~/components/reusable/UploadModalMedia/uploadImage"; import { EngineContext } from "./contexts/EngineContext"; @@ -40,11 +46,7 @@ import Queue, { QueueNames } from "./Queue"; import { toEngineActions } from "./Queue/toEngineActions"; import { UnionedDataTypes } from "./Queue/Queue"; import { LoginModal } from "@storyteller/ui-login-modal"; -import { DemoModal } from "@storyteller/ui-demo-modal"; -import { IsDesktopApp } from "@storyteller/tauri-utils"; -import { - DomLevels, -} from "./signals/hotkeys"; +import { DomLevels } from "./signals/hotkeys"; import { AUTH_STATUS } from "../../enums/authentication"; import { authentication } from "../../signals/authentication/authentication"; @@ -247,139 +249,130 @@ export const PageEditor = () => { action: toEngineActions.CHANGE_CAMERA_ASPECT_RATIO, data: newRatio, }); - } + }; const ContentFor3D = () => { - return (<> - -
- {/* Engine section/side panel */} + return ( + <> +
-
- - - - + {/* Engine section/side panel */} +
+
+ + + + - {/* Focal Length Display */} - + {/* Focal Length Display */} + - {/* Pose Mode Selector */} - + {/* Pose Mode Selector */} + - {/* Top controls */} -
-
- - -
-
- - {/* Bottom controls */} -
+ {/* Top controls */}
- - +
+ + +
- + {/* Bottom controls */} +
+
+ + +
+ + +
+ + { + if (!editorEngine) { + return; + } + + editorEngine!.positive_prompt = prompt; + }} + snapshotCurrentFrame={editorEngine?.snapShotOfCurrentFrame} + /> + +
- - { - if (!editorEngine) { - return; - } - - editorEngine!.positive_prompt = prompt - }} - snapshotCurrentFrame={ - editorEngine?.snapShotOfCurrentFrame - } - /> - -
-
- { - if (IsDesktopApp()) { - await invoke("open_sora_login_command"); - } - }} - /> - {}} - videoSrc2D="/resources/videos/artcraft-canvas-demo.mp4" - videoSrc3D="/resources/videos/artcraft-3d-demo.mp4" - openAiLogo="/resources/images/openai-logo.png" - onOpenChange={(isOpen: boolean) => { - if (isOpen) { - disableHotkeyInput(DomLevels.DIALOGUE); - } else { - enableHotkeyInput(DomLevels.DIALOGUE); - } - }} - onArtCraftAuthSuccess={(userInfo: any) => { - authentication.status.value = AUTH_STATUS.LOGGED_IN; - authentication.userInfo.value = userInfo; - }} - /> - ); - } + + {}} + videoSrc2D="/resources/videos/artcraft-canvas-demo.mp4" + videoSrc3D="/resources/videos/artcraft-3d-demo.mp4" + openAiLogo="/resources/images/openai-logo.png" + onOpenChange={(isOpen: boolean) => { + if (isOpen) { + disableHotkeyInput(DomLevels.DIALOGUE); + } else { + enableHotkeyInput(DomLevels.DIALOGUE); + } + }} + onArtCraftAuthSuccess={(userInfo: any) => { + authentication.status.value = AUTH_STATUS.LOGGED_IN; + authentication.userInfo.value = userInfo; + }} + /> + + ); + }; const ContentFor2D = () => { - return - - ; + return ( + + + + ); }; return (