style: force dark mode for image editor top navbar
This commit is contained in:
parent
c5ea1ee3d6
commit
13bf0afb74
@ -1205,11 +1205,6 @@ export function ImageAnnotator({ imageUrl, onConfirm, onCancel, initialResizeMod
|
|||||||
onConfirm(dataUrl);
|
onConfirm(dataUrl);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 决定显示哪个 LOGO(根据主题)
|
|
||||||
const displayLogo = resolvedTheme === "dark" && siteLogoDark
|
|
||||||
? siteLogoDark
|
|
||||||
: siteLogo;
|
|
||||||
|
|
||||||
// 弹窗内容
|
// 弹窗内容
|
||||||
const modalContent = (
|
const modalContent = (
|
||||||
<div
|
<div
|
||||||
@ -1221,24 +1216,24 @@ export function ImageAnnotator({ imageUrl, onConfirm, onCancel, initialResizeMod
|
|||||||
className="flex flex-col overflow-hidden w-full h-full"
|
className="flex flex-col overflow-hidden w-full h-full"
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
{/* 顶部标题栏 */}
|
{/* 顶部标题栏 - 始终深色模式 */}
|
||||||
<div className="flex items-center justify-between border-b px-4 py-3">
|
<div className="flex items-center justify-between border-b border-zinc-700 px-4 py-3 bg-zinc-900 text-white">
|
||||||
<Link
|
<Link
|
||||||
href="/"
|
href="/"
|
||||||
className="flex items-center gap-2 hover:opacity-80 transition-opacity"
|
className="flex items-center gap-2 hover:opacity-80 transition-opacity"
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
{displayLogo ? (
|
{siteLogoDark || siteLogo ? (
|
||||||
<>
|
<>
|
||||||
<img
|
<img
|
||||||
src={displayLogo}
|
src={siteLogoDark || siteLogo || undefined}
|
||||||
alt={siteName}
|
alt={siteName}
|
||||||
className="h-6 w-auto"
|
className="h-6 w-auto"
|
||||||
/>
|
/>
|
||||||
<span className="text-base font-medium">{siteName}</span>
|
<span className="text-base font-medium text-white">{siteName}</span>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<span className="text-base font-medium">{siteName}</span>
|
<span className="text-base font-medium text-white">{siteName}</span>
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
@ -1248,6 +1243,7 @@ export function ImageAnnotator({ imageUrl, onConfirm, onCancel, initialResizeMod
|
|||||||
onClick={handleRemoveBackground}
|
onClick={handleRemoveBackground}
|
||||||
disabled={isRemovingBg || isEnhancing || isExtending || isResizeMode || showAngleEditDialog || showSceneFusion || !image}
|
disabled={isRemovingBg || isEnhancing || isExtending || isResizeMode || showAngleEditDialog || showSceneFusion || !image}
|
||||||
title="移除背景(抠图)"
|
title="移除背景(抠图)"
|
||||||
|
className="text-zinc-300 hover:text-white hover:bg-zinc-800"
|
||||||
>
|
>
|
||||||
<Scissors className={`mr-1 h-4 w-4 ${isRemovingBg ? "animate-spin" : ""}`} />
|
<Scissors className={`mr-1 h-4 w-4 ${isRemovingBg ? "animate-spin" : ""}`} />
|
||||||
{isRemovingBg ? "处理中..." : "抠图"}
|
{isRemovingBg ? "处理中..." : "抠图"}
|
||||||
@ -1258,6 +1254,7 @@ export function ImageAnnotator({ imageUrl, onConfirm, onCancel, initialResizeMod
|
|||||||
onClick={handleEnhance}
|
onClick={handleEnhance}
|
||||||
disabled={isEnhancing || isRemovingBg || isExtending || isResizeMode || showAngleEditDialog || showSceneFusion || !image}
|
disabled={isEnhancing || isRemovingBg || isExtending || isResizeMode || showAngleEditDialog || showSceneFusion || !image}
|
||||||
title="图片变清晰"
|
title="图片变清晰"
|
||||||
|
className="text-zinc-300 hover:text-white hover:bg-zinc-800"
|
||||||
>
|
>
|
||||||
<Sparkles className={`mr-1 h-4 w-4 ${isEnhancing ? "animate-spin" : ""}`} />
|
<Sparkles className={`mr-1 h-4 w-4 ${isEnhancing ? "animate-spin" : ""}`} />
|
||||||
{isEnhancing ? "处理中..." : "变清晰"}
|
{isEnhancing ? "处理中..." : "变清晰"}
|
||||||
@ -1268,6 +1265,7 @@ export function ImageAnnotator({ imageUrl, onConfirm, onCancel, initialResizeMod
|
|||||||
onClick={handleExtend}
|
onClick={handleExtend}
|
||||||
disabled={isExtending || isRemovingBg || isEnhancing || isResizeMode || showAngleEditDialog || showSceneFusion || !image}
|
disabled={isExtending || isRemovingBg || isEnhancing || isResizeMode || showAngleEditDialog || showSceneFusion || !image}
|
||||||
title="图像拓展"
|
title="图像拓展"
|
||||||
|
className="text-zinc-300 hover:text-white hover:bg-zinc-800"
|
||||||
>
|
>
|
||||||
<Expand className={`mr-1 h-4 w-4 ${isExtending ? "animate-spin" : ""}`} />
|
<Expand className={`mr-1 h-4 w-4 ${isExtending ? "animate-spin" : ""}`} />
|
||||||
{isExtending ? "处理中..." : "图像拓展"}
|
{isExtending ? "处理中..." : "图像拓展"}
|
||||||
@ -1277,6 +1275,7 @@ export function ImageAnnotator({ imageUrl, onConfirm, onCancel, initialResizeMod
|
|||||||
size="sm"
|
size="sm"
|
||||||
onClick={handleResize}
|
onClick={handleResize}
|
||||||
disabled={isResizeMode || isRemovingBg || isEnhancing || isExtending || showAngleEditDialog || showSceneFusion || !image}
|
disabled={isResizeMode || isRemovingBg || isEnhancing || isExtending || showAngleEditDialog || showSceneFusion || !image}
|
||||||
|
className="text-zinc-300 hover:text-white hover:bg-zinc-800"
|
||||||
title="尺寸调整"
|
title="尺寸调整"
|
||||||
>
|
>
|
||||||
<Maximize2 className="mr-1 h-4 w-4" />
|
<Maximize2 className="mr-1 h-4 w-4" />
|
||||||
@ -1288,6 +1287,7 @@ export function ImageAnnotator({ imageUrl, onConfirm, onCancel, initialResizeMod
|
|||||||
onClick={handleAngleEdit}
|
onClick={handleAngleEdit}
|
||||||
disabled={showAngleEditDialog || isRemovingBg || isEnhancing || isExtending || isResizeMode || showSceneFusion || !image}
|
disabled={showAngleEditDialog || isRemovingBg || isEnhancing || isExtending || isResizeMode || showSceneFusion || !image}
|
||||||
title="角度调整"
|
title="角度调整"
|
||||||
|
className="text-zinc-300 hover:text-white hover:bg-zinc-800"
|
||||||
>
|
>
|
||||||
<Move3D className="mr-1 h-4 w-4" />
|
<Move3D className="mr-1 h-4 w-4" />
|
||||||
角度调整
|
角度调整
|
||||||
@ -1305,23 +1305,24 @@ export function ImageAnnotator({ imageUrl, onConfirm, onCancel, initialResizeMod
|
|||||||
}}
|
}}
|
||||||
disabled={showAngleEditDialog || isRemovingBg || isEnhancing || isExtending || isResizeMode}
|
disabled={showAngleEditDialog || isRemovingBg || isEnhancing || isExtending || isResizeMode}
|
||||||
title="场景裂变"
|
title="场景裂变"
|
||||||
|
className={showSceneFusion ? "bg-primary text-white" : "text-zinc-300 hover:text-white hover:bg-zinc-800"}
|
||||||
>
|
>
|
||||||
<Layers className="mr-1 h-4 w-4" />
|
<Layers className="mr-1 h-4 w-4" />
|
||||||
场景裂变
|
场景裂变
|
||||||
</Button>
|
</Button>
|
||||||
{!showSceneFusion && (
|
{!showSceneFusion && (
|
||||||
<>
|
<>
|
||||||
<Button variant="ghost" size="sm" onClick={handleUndo} disabled={actions.length === 0}>
|
<Button variant="ghost" size="sm" onClick={handleUndo} disabled={actions.length === 0} className="text-zinc-300 hover:text-white hover:bg-zinc-800">
|
||||||
<Undo className="mr-1 h-4 w-4" />
|
<Undo className="mr-1 h-4 w-4" />
|
||||||
撤销
|
撤销
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="ghost" size="sm" onClick={handleClear} disabled={actions.length === 0}>
|
<Button variant="ghost" size="sm" onClick={handleClear} disabled={actions.length === 0} className="text-zinc-300 hover:text-white hover:bg-zinc-800">
|
||||||
<Trash2 className="mr-1 h-4 w-4" />
|
<Trash2 className="mr-1 h-4 w-4" />
|
||||||
清空
|
清空
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<Button variant="ghost" size="sm" onClick={onCancel}>
|
<Button variant="ghost" size="sm" onClick={onCancel} className="text-zinc-300 hover:text-white hover:bg-zinc-800">
|
||||||
<X className="mr-1 h-4 w-4" />
|
<X className="mr-1 h-4 w-4" />
|
||||||
取消
|
取消
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user