From 9c8228b697e2e8cc6bd11512580ebb1bd439cc88 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 5 Apr 2026 21:59:05 +0800 Subject: [PATCH] fix: compact enhance pro workspace layout --- components/canvas/EnhanceProWorkspace.tsx | 572 +++++++++++---------- components/canvas/RealtimeCanvasDialog.tsx | 24 +- 2 files changed, 305 insertions(+), 291 deletions(-) diff --git a/components/canvas/EnhanceProWorkspace.tsx b/components/canvas/EnhanceProWorkspace.tsx index 879a233b4..8aa7c8625 100644 --- a/components/canvas/EnhanceProWorkspace.tsx +++ b/components/canvas/EnhanceProWorkspace.tsx @@ -89,6 +89,10 @@ const FALLBACK_CONFIG: EnhanceProClientConfig = { presets: defaultEnhanceProPresets(), }; +const SOLID_PANEL_FIELD_CLASS = "border-white/10 bg-[#1a1b22] text-white"; +const SOLID_PANEL_CARD_CLASS = "rounded-2xl border border-white/10 bg-[#17181f]"; +const SOLID_PANEL_CHIP_CLASS = "rounded-full border border-white/10 bg-[#1b1c24]"; + function clampNumber(value: number, min: number, max: number) { return Math.min(max, Math.max(min, value)); } @@ -486,7 +490,7 @@ export function EnhanceProWorkspace({ className="max-h-full max-w-full object-contain" src={getDisplayImageUrl(activePreviewUrl, 1800)} /> -
+
{activePreviewLabel}
@@ -506,7 +510,7 @@ export function EnhanceProWorkspace({ {sidePreviewItems.length > 0 ? (
-
+
{sidePreviewItems.map((item, index) => { const isActive = item.isSource ? selectedResultIndex < 0 @@ -539,50 +543,29 @@ export function EnhanceProWorkspace({ ) : null}
-
-
+
+
图像增强模式
-
- 使用 {config.providerName}{" "} - 对单张图片进行更可控的增强、修复和细节重建。 -
-
+
{selectedPreset?.model || config.defaultModel}
- -
- {sourceImageUrl ? ( - 增强源图 - ) : ( -
- 暂无源图 -
- )} -
-
- - 原图 {naturalSize.width} x {naturalSize.height} - - - 最大输出长边 {config.maxOutputEdge}px - -
-
+
{isLoading ? ( -
+
正在加载增强配置...
@@ -602,9 +585,11 @@ export function EnhanceProWorkspace({ ) : null}
- + {selectedPreset ? ( -
+
{selectedPreset.description || `${selectedPreset.model} · ${getSubjectDetectionLabel(selectedPreset.subjectDetection)}`}
@@ -624,11 +609,14 @@ export function EnhanceProWorkspace({
-