diff --git a/components/canvas/EnhanceProWorkspace.tsx b/components/canvas/EnhanceProWorkspace.tsx index 72c9d5d65..db578dfb7 100644 --- a/components/canvas/EnhanceProWorkspace.tsx +++ b/components/canvas/EnhanceProWorkspace.tsx @@ -5,7 +5,10 @@ import { ChevronDown, ImageIcon, Loader2, + ScanFace, Send, + Settings2, + SlidersHorizontal, Sparkles, } from "lucide-react"; import { @@ -101,34 +104,38 @@ const FALLBACK_CONFIG: EnhanceProClientConfig = { }; const PANEL_SHELL_CLASS = - "pointer-events-auto rounded-[24px] border border-[#e0e2e8] bg-white shadow-[0_0_0_1px_rgb(224,226,232),0_16px_36px_rgba(28,28,30,0.04)]"; + "pointer-events-auto rounded-[30px] border border-[#eadfcb] bg-[linear-gradient(180deg,#fffdf9_0%,#fff7ed_100%)] shadow-[0_0_0_1px_rgba(234,223,203,0.88),0_24px_48px_rgba(15,23,42,0.06)]"; const SOLID_PANEL_FIELD_CLASS = - "border-[#e9eaef] bg-white text-[#1c1c1e] shadow-[0_1px_2px_rgba(28,28,30,0.04)]"; + "border-[#eadfcb] bg-[#fffdfa] text-[#1c1c1e] shadow-[inset_0_1px_0_rgba(255,255,255,0.95),0_1px_2px_rgba(28,28,30,0.04)]"; const SOLID_PANEL_CARD_CLASS = - "rounded-[20px] border border-[#e0e2e8] bg-white shadow-[0_0_0_1px_rgb(224,226,232),0_8px_18px_rgba(28,28,30,0.03)]"; + "rounded-[22px] border border-white/90 bg-white/78 shadow-[inset_0_1px_0_rgba(255,255,255,0.95),0_10px_22px_rgba(15,23,42,0.05)]"; const PANEL_SECTION_TITLE_CLASS = - "font-semibold text-[12px] tracking-[-0.02em] text-[#1c1c1e]"; + "font-semibold text-[15px] tracking-[-0.04em] text-[#1c1c1e]"; const PANEL_SECTION_NOTE_CLASS = - "text-[11px] leading-4 text-[#555a6a]"; + "text-[12px] leading-5 text-[#555a6a]"; const SOLID_PANEL_SELECT_CONTENT_CLASS = - "border-[#e0e2e8] bg-white shadow-[0_0_0_1px_rgb(224,226,232),0_16px_34px_rgba(28,28,30,0.08)]"; + "border-[#eadfcb] bg-[#fffdfa] shadow-[0_0_0_1px_rgba(234,223,203,0.88),0_18px_38px_rgba(15,23,42,0.08)]"; const PRIMARY_ACTION_BUTTON_CLASS = - "border border-[#5b76fe] bg-[#5b76fe] text-white shadow-[0_14px_28px_rgba(91,118,254,0.24)] transition hover:border-[#2a41b6] hover:bg-[#2a41b6] disabled:border-[#e0e2e8] disabled:bg-[#eef1f6] disabled:text-[#a5a8b5] disabled:shadow-none"; + "border border-[#5b76fe] bg-[linear-gradient(180deg,#6d87ff_0%,#516bf5_100%)] text-white shadow-[0_16px_30px_rgba(91,118,254,0.26)] transition hover:border-[#2a41b6] hover:bg-[linear-gradient(180deg,#5d78ff_0%,#2a41b6_100%)] disabled:border-[#e0e2e8] disabled:bg-[#eef1f6] disabled:text-[#a5a8b5] disabled:shadow-none"; const SECONDARY_ACTION_BUTTON_CLASS = - "border border-[#c7cad5] bg-white text-[#1c1c1e] shadow-[0_0_0_1px_rgb(224,226,232),0_8px_18px_rgba(28,28,30,0.03)] transition hover:border-[#5b76fe] hover:bg-[#f6f8ff] hover:text-[#2a41b6] disabled:border-[#e0e2e8] disabled:bg-[#f7f8fb] disabled:text-[#a5a8b5] disabled:shadow-none"; + "border border-[#d9e2fb] bg-[#f7f9ff] text-[#3150d3] shadow-[0_0_0_1px_rgba(217,226,251,0.75),0_10px_22px_rgba(91,118,254,0.08)] transition hover:border-[#5b76fe] hover:bg-[#edf2ff] hover:text-[#2a41b6] disabled:border-[#e0e2e8] disabled:bg-[#f7f8fb] disabled:text-[#a5a8b5] disabled:shadow-none"; const COMPACT_FIELD_CLASS = `${SOLID_PANEL_FIELD_CLASS} h-11 rounded-[16px] text-sm`; const COMPACT_LABEL_CLASS = - "font-medium text-[#555a6a] text-[11px] leading-4"; + "font-medium text-[#555a6a] text-[11px] leading-4 tracking-[0.01em]"; const COMPACT_TOGGLE_CARD_CLASS = - "flex items-center justify-between gap-2.5 px-3 py-2.5"; -const SLIDER_TRACK_CLASS = "h-2 bg-[#edf0f5] shadow-inner"; + "flex items-center justify-between gap-2.5 px-3.5 py-3"; +const SLIDER_TRACK_CLASS = "h-2.5 bg-[#e9edf5] shadow-inner"; const SLIDER_RANGE_CLASS = "bg-[#5b76fe]"; const SLIDER_THUMB_CLASS = - "h-4 w-4 border border-[#c7cad5] bg-white shadow-[0_0_0_4px_rgba(91,118,254,0.16)]"; + "h-4 w-4 border border-[#d6d1c4] bg-white shadow-[0_0_0_4px_rgba(91,118,254,0.16)]"; const SIDEBAR_SCROLL_CLASS = "pr-1.5 [scrollbar-width:thin] [scrollbar-color:#d7cfbf_transparent] [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-[#d7cfbf] hover:[&::-webkit-scrollbar-thumb]:bg-[#c8bda9]"; const SIDEBAR_SECTION_CARD_CLASS = - "rounded-[22px] border border-[#ece3d4] bg-[#fffdf8] p-3.5 shadow-[0_10px_24px_rgba(15,23,42,0.05)]"; + "rounded-[30px] border p-3.5 shadow-[0_18px_36px_rgba(15,23,42,0.06)]"; +const SECTION_EYEBROW_CLASS = + "inline-flex items-center gap-1.5 rounded-full border border-white/90 bg-white/72 px-2.5 py-1 font-semibold text-[10px] tracking-[0.14em] text-[#6b7280] uppercase"; +const INNER_PANEL_CLASS = + "rounded-[22px] border border-white/90 bg-white/76 p-3 shadow-[inset_0_1px_0_rgba(255,255,255,0.92)]"; function clampNumber(value: number, min: number, max: number) { return Math.min(max, Math.max(min, value)); @@ -277,10 +284,17 @@ function ParameterSliderRow({ const displayValue = formatValue ? formatValue(value) : String(value); return ( -
+
-
{label}
-
+
+ {label} +
+
{displayValue}
@@ -643,8 +657,10 @@ export function EnhanceProWorkspace({ }; return ( -
-
+
+
+
+
{activePreviewUrl ? (
- {activePreviewLabel} -
+
+
+
+
+ {activePreviewLabel} +
+
+
{activePreviewLabel}
+
+ 双击回正 +
) : ( -
-
- -
-
- 还没有可增强的图片 -
-
- 请先在主画布中选中一张图片,再从底部工具栏进入“图像增强 Pro”, - 或者先在实时画布模式里生成一张结果后再切回来。 +
+
+
+
+
+
+ +
+
+
Enhance Pro Studio
+
+ 还没有可增强的图片 +
+
+ 先在主画布里选中一张图片,或者先在实时画布模式里生成结果, + 再切回这里进行精修、增强和细节重建。 +
+
+
+
+
+
+ Step 01 +
+
+ 选中一张图 +
+
+ 从主画布中选择要增强的图片,系统会自动把它带入当前工作台。 +
+
+
+
+ Step 02 +
+
+ 调参后开始增强 +
+
+ 使用右侧工具卡片快速选择模式、强度和增强范围,生成后可直接发回画布。 +
+
+
)} @@ -719,8 +777,8 @@ export function EnhanceProWorkspace({
) : null} -
-
+
+
{selectedGeneratedImage ? ( @@ -728,10 +786,10 @@ export function EnhanceProWorkspace({ {actionHint}
-
+
-
-
+
+
{isLoading ? (
@@ -777,44 +835,56 @@ export function EnhanceProWorkspace({ ) : null} {!config.enabled && !isLoading ? ( -
+
当前未启用图像增强 Pro。请先在系统设置的“本地AI设置”里完成 Krea 配置。
) : null} {lastErrorMessage ? ( -
+
{lastErrorMessage}
) : null} -
+
{selectedPreset ? ( -
+
{selectedPreset.description || `${selectedPreset.model} · ${getSubjectDetectionLabel(selectedPreset.subjectDetection)}`} @@ -838,7 +908,7 @@ export function EnhanceProWorkspace({ ) : null}
-
+