feat: manage subject view thumbnails

This commit is contained in:
2026-05-18 06:38:01 +08:00
parent 18fd8c9508
commit 58c3e5c231

View File

@@ -1808,7 +1808,7 @@ function SourceReferenceBuildPanel({
>
<img src={subjectAssetUrl(job, asset)} alt={asset.label || asset.view} className="h-full w-full object-contain" />
</a>
<div className="absolute bottom-1 right-1 flex flex-col gap-1 opacity-0 transition group-hover:opacity-100 group-focus-within:opacity-100">
<div className="absolute right-1 top-1 flex flex-col gap-0.5 opacity-0 transition group-hover:opacity-100 group-focus-within:opacity-100">
<button
type="button"
onClick={(event) => {
@@ -1817,11 +1817,11 @@ function SourceReferenceBuildPanel({
void regenerateSubjectAsset(asset)
}}
disabled={!!subjectAssetBusy}
className="inline-flex h-5 w-5 items-center justify-center rounded-full border border-cyan-100/35 bg-black/78 text-cyan-100 transition hover:border-cyan-100/70 hover:bg-cyan-500/25 focus:outline-none focus:ring-1 focus:ring-cyan-100/70 disabled:cursor-not-allowed disabled:opacity-60"
className="inline-flex h-4 w-4 items-center justify-center rounded-full border border-cyan-100/35 bg-black/78 text-cyan-100 transition hover:border-cyan-100/70 hover:bg-cyan-500/25 focus:outline-none focus:ring-1 focus:ring-cyan-100/70 disabled:cursor-not-allowed disabled:opacity-60"
aria-label={`重新生成${asset.label || asset.view}`}
title="重新生成这一张"
>
{busyMode === "regen" ? <Loader2 className="h-3 w-3 animate-spin" /> : <RefreshCw className="h-3 w-3" />}
{busyMode === "regen" ? <Loader2 className="h-2.5 w-2.5 animate-spin" /> : <RefreshCw className="h-2.5 w-2.5" />}
</button>
<button
type="button"
@@ -1831,11 +1831,11 @@ function SourceReferenceBuildPanel({
void deleteActorAsset(asset)
}}
disabled={!!subjectAssetBusy}
className="inline-flex h-5 w-5 items-center justify-center rounded-full border border-rose-100/35 bg-black/78 text-rose-100 transition hover:border-rose-100/70 hover:bg-rose-500/25 focus:outline-none focus:ring-1 focus:ring-rose-100/70 disabled:cursor-not-allowed disabled:opacity-60"
className="inline-flex h-4 w-4 items-center justify-center rounded-full border border-rose-100/35 bg-black/78 text-rose-100 transition hover:border-rose-100/70 hover:bg-rose-500/25 focus:outline-none focus:ring-1 focus:ring-rose-100/70 disabled:cursor-not-allowed disabled:opacity-60"
aria-label={`删除${asset.label || asset.view}`}
title="删除这一张"
>
{busyMode === "delete" ? <Loader2 className="h-3 w-3 animate-spin" /> : <Trash2 className="h-3 w-3" />}
{busyMode === "delete" ? <Loader2 className="h-2.5 w-2.5 animate-spin" /> : <Trash2 className="h-2.5 w-2.5" />}
</button>
</div>
</div>