From d4796a90ab15e9b620dd84ea5a2526e7963d8539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Sat, 12 Sep 2026 17:42:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=83=E5=B1=80=E9=87=8D=E6=9E=84:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 预览改为全区域背景层。 - 左右面板、顶部流程条改为覆盖层,可遮挡预览。 - 左右面板开合状态仅保存在当前 React 会话。 - 增加左右面板“收起/展开”入口。 - 编辑器关闭入口改为单独的 ×,继续通过 onBack 注入关闭逻辑。 - 保留全局顶部栏与现有快捷键、业务状态、保存流程。 - 底层页面仍由现有父级路由控制,不新增 URL 状态。 --- .../src/view/ui-editor/index.tsx | 111 +++++++++++------- 1 file changed, 69 insertions(+), 42 deletions(-) diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/index.tsx b/apps/ai-game-creator-shell/src/view/ui-editor/index.tsx index 2ea43b868..cf4e99514 100644 --- a/apps/ai-game-creator-shell/src/view/ui-editor/index.tsx +++ b/apps/ai-game-creator-shell/src/view/ui-editor/index.tsx @@ -1,4 +1,4 @@ -import { ChevronLeft, Redo2, Undo2 } from 'lucide-react'; +import { Redo2, Undo2, X } from 'lucide-react'; import { type ReactNode, useEffect, useMemo, useState } from 'react'; import { ThemedModal } from '../../components/modal/ThemedModal'; @@ -71,6 +71,8 @@ export default function UiEditorPage({ const [generateAfterWarning, setGenerateAfterWarning] = useState(false); const [generateSuccess, setGenerateSuccess] = useState(null); const [returnConfirmOpen, setReturnConfirmOpen] = useState(false); + const [leftPanelOpen, setLeftPanelOpen] = useState(true); + const [rightPanelOpen, setRightPanelOpen] = useState(true); const saveDisabled = session.save.isSaving || session.save.isGenerating || @@ -162,16 +164,16 @@ export default function UiEditorPage({ } return ( -
+
{resourceId ? (
{resourceLabel ?? 'UI 设计'}
@@ -244,44 +246,69 @@ export default function UiEditorPage({ {generateSuccess}
) : null} - -
- -
- - +
+ +
+
+
+ {leftPanelOpen ? : null} +
-
- {session.input.activeStep === 'structure-recognition' ? ( - { - session.input.focusNode(treeId, nodeId); - session.input.highlightStatusField(nodeId, 'layout_status'); - }} - /> - ) : session.input.activeStep === 'asset-separation' ? ( - { - session.input.focusNode(treeId, nodeId); - session.input.highlightStatusField(nodeId, 'component_status'); - }} - /> - ) : ( - - )} - +
+ + +
+
+ {rightPanelOpen ? ( + <> + {session.input.activeStep === 'structure-recognition' ? ( + { + session.input.focusNode(treeId, nodeId); + session.input.highlightStatusField(nodeId, 'layout_status'); + }} + /> + ) : session.input.activeStep === 'asset-separation' ? ( + { + session.input.focusNode(treeId, nodeId); + session.input.highlightStatusField( + nodeId, + 'component_status', + ); + }} + /> + ) : ( + + )} + + + ) : null} +