From efa7cff4314d0aca25d0ab246ee5f53967877957 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 4 Mar 2026 00:01:39 +0800 Subject: [PATCH] fix(canvas): compact bottom toolbar and move zoom undo controls to corner --- app/canvas/[id]/page.tsx | 53 ++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/app/canvas/[id]/page.tsx b/app/canvas/[id]/page.tsx index ec9fd4c45..0b3baff21 100644 --- a/app/canvas/[id]/page.tsx +++ b/app/canvas/[id]/page.tsx @@ -685,14 +685,19 @@ export default function CanvasEditorPage({ params }: PageProps) { {/* 5. Floating Toolbar (Bottom) */}
-
+
@@ -706,7 +711,7 @@ export default function CanvasEditorPage({ params }: PageProps) { variant={tool === "pan" ? "secondary" : "ghost"} size="icon" onClick={() => setTool("pan")} - className={cn("h-10 w-10 rounded-2xl", tool === "pan" && "bg-primary text-primary-foreground hover:bg-primary/90")} + className={cn("h-9 w-9 rounded-xl", tool === "pan" && "bg-primary text-primary-foreground hover:bg-primary/90")} > @@ -720,7 +725,7 @@ export default function CanvasEditorPage({ params }: PageProps) { variant="ghost" size="icon" onClick={handleAddImageNode} - className="h-10 w-10 rounded-2xl" + className="h-9 w-9 rounded-xl" > @@ -734,7 +739,7 @@ export default function CanvasEditorPage({ params }: PageProps) { variant="ghost" size="icon" onClick={handleAddTextNode} - className="h-10 w-10 rounded-2xl" + className="h-9 w-9 rounded-xl" > @@ -750,7 +755,7 @@ export default function CanvasEditorPage({ params }: PageProps) { variant="ghost" size="icon" onClick={() => router.push(`/canvas/${id}/realtime`)} - className="h-10 w-10 rounded-2xl" + className="h-9 w-9 rounded-xl" > @@ -765,7 +770,7 @@ export default function CanvasEditorPage({ params }: PageProps) { variant="ghost" size="icon" onClick={() => router.push(`/canvas/${id}/model3d`)} - className="h-10 w-10 rounded-2xl" + className="h-9 w-9 rounded-xl" > @@ -779,20 +784,26 @@ export default function CanvasEditorPage({ params }: PageProps) { variant="ghost" size="icon" onClick={() => router.push('/canvas?new=1')} - className="h-10 w-10 rounded-2xl" + className="h-9 w-9 rounded-xl" > 新建画布 +
+
- - + {/* 6. Bottom Right Compact Controls */} +
+
- 撤销 @@ -800,28 +811,28 @@ export default function CanvasEditorPage({ params }: PageProps) { - 重做 - + - - + {Math.round(viewport.zoom * 100)}% -
- {/* 6. 物品拾取模式覆盖层 */} + {/* 7. 物品拾取模式覆盖层 */}