From 3100d10dc0a6d698be9178d19900500fc1ceaecd Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 5 Apr 2026 22:09:21 +0800 Subject: [PATCH] fix: restore light theme for realtime canvas enhance mode --- components/canvas/EnhanceProWorkspace.tsx | 118 +++++++++------------ components/canvas/RealtimeCanvasDialog.tsx | 42 ++++---- 2 files changed, 73 insertions(+), 87 deletions(-) diff --git a/components/canvas/EnhanceProWorkspace.tsx b/components/canvas/EnhanceProWorkspace.tsx index 8aa7c8625..5a5265e27 100644 --- a/components/canvas/EnhanceProWorkspace.tsx +++ b/components/canvas/EnhanceProWorkspace.tsx @@ -6,7 +6,6 @@ import { Loader2, Send, Sparkles, - Wand2, } from "lucide-react"; import { useEffect, useMemo, useState } from "react"; import { toast } from "sonner"; @@ -89,9 +88,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]"; +const SOLID_PANEL_FIELD_CLASS = + "border-border/60 bg-background text-foreground shadow-sm"; +const SOLID_PANEL_CARD_CLASS = + "rounded-2xl border border-border/60 bg-card shadow-sm"; function clampNumber(value: number, min: number, max: number) { return Math.min(max, Math.max(min, value)); @@ -481,8 +481,8 @@ export function EnhanceProWorkspace({ }, [generatedImages, sourceImageUrl]); return ( -
-
+
+
{activePreviewUrl ? ( <> -
+
{activePreviewLabel}
) : (
- -
+ +
还没有可增强的图片
-
+
请先在主画布中选中一张图片,再从底部工具栏进入“图像增强 Pro”, 或者先在实时画布模式里生成一张结果后再切回来。
@@ -510,7 +510,7 @@ export function EnhanceProWorkspace({ {sidePreviewItems.length > 0 ? (
-
+
{sidePreviewItems.map((item, index) => { const isActive = item.isSource ? selectedResultIndex < 0 @@ -520,8 +520,8 @@ export function EnhanceProWorkspace({ className={cn( "group flex h-16 w-16 shrink-0 overflow-hidden rounded-2xl border transition", isActive - ? "border-sky-400 shadow-[0_0_0_1px_rgba(56,189,248,0.35)]" - : "border-white/10 hover:border-white/35" + ? "border-sky-500 shadow-[0_0_0_1px_rgba(14,165,233,0.18)]" + : "border-border/60 hover:border-foreground/20" )} key={item.key} onClick={() => @@ -543,49 +543,35 @@ export function EnhanceProWorkspace({ ) : null}
-
-
-
-
-
- - 图像增强模式 -
-
+
+
+ {isLoading ? (
- {selectedPreset?.model || config.defaultModel} -
-
-
- -
- {isLoading ? ( -
正在加载增强配置...
) : null} {!config.enabled && !isLoading ? ( -
+
当前未启用图像增强 Pro。请先在系统设置的“本地AI设置”里完成 Krea 配置。
) : null} {lastErrorMessage ? ( -
+
{lastErrorMessage}
) : null}
-