auto-save 2026-05-13 14:32 (~3)
This commit is contained in:
@@ -654,24 +654,30 @@ export function FrameLightbox({ jobId, frames, activeIndex, selected, onClose, o
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 裁切按钮 — 只在有 region 时可用 */}
|
||||
{hasRegion ? (
|
||||
<button
|
||||
onClick={() => handleCutout(e.id)}
|
||||
disabled={isCutting}
|
||||
title={hasCutout ? "重新裁切原图区域" : "从原图裁切该 region 区域(保留原表情/形体)"}
|
||||
className={`shrink-0 text-[10px] px-1.5 py-0.5 rounded inline-flex items-center gap-1 transition disabled:opacity-50 disabled:cursor-not-allowed ${
|
||||
hasCutout
|
||||
? "bg-emerald-500/20 text-emerald-200 hover:bg-emerald-500/30"
|
||||
: "bg-cyan-500/30 text-white/90 hover:bg-cyan-500/50"
|
||||
}`}
|
||||
>
|
||||
{isCutting ? <Loader2 className="h-2.5 w-2.5 animate-spin" /> : <Sparkle className="h-2.5 w-2.5" />}
|
||||
{isCutting ? "裁切中" : hasCutout ? "重裁" : "裁切"}
|
||||
</button>
|
||||
) : (
|
||||
<span className="shrink-0 text-[9.5px] text-white/35 self-center" title="该元素仅文字描述 · 在原图上画框才能裁切">仅文字</span>
|
||||
)}
|
||||
{/* 裁切 / 抠图按钮(有 region 走 PIL crop,无 region 走模型抠图) */}
|
||||
<button
|
||||
onClick={() => handleCutout(e.id)}
|
||||
disabled={isCutting}
|
||||
title={
|
||||
hasRegion
|
||||
? hasCutout ? "重新裁切原图区域" : "从原图裁切该区域(保留原表情/形体 · 瞬时)"
|
||||
: hasCutout ? "重新抠图" : "调 nano-banana 抠白底图(5-15s · 模型重画可能有差异)"
|
||||
}
|
||||
className={`shrink-0 text-[10px] px-1.5 py-0.5 rounded inline-flex items-center gap-1 transition disabled:opacity-50 disabled:cursor-not-allowed ${
|
||||
hasCutout
|
||||
? "bg-emerald-500/20 text-emerald-200 hover:bg-emerald-500/30"
|
||||
: hasRegion
|
||||
? "bg-cyan-500/30 text-white/90 hover:bg-cyan-500/50"
|
||||
: "bg-violet-500/30 text-white/90 hover:bg-violet-500/50"
|
||||
}`}
|
||||
>
|
||||
{isCutting ? <Loader2 className="h-2.5 w-2.5 animate-spin" /> : <Sparkle className="h-2.5 w-2.5" />}
|
||||
{isCutting
|
||||
? (hasRegion ? "裁切中" : "抠图中")
|
||||
: hasCutout
|
||||
? "重抠"
|
||||
: (hasRegion ? "裁切" : "抠图")}
|
||||
</button>
|
||||
|
||||
{/* 删除 */}
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user