fix: render auto workflow options without preview images
This commit is contained in:
parent
1487531b8c
commit
033b3c298d
@ -440,8 +440,8 @@ const StepOptionCard = memo(function StepOptionCard({
|
||||
setPreviewFailed(false);
|
||||
}, [previewUrl]);
|
||||
const shouldLoadFast = selected || index < WORKFLOW_OPTION_PREVIEW_EAGER_COUNT;
|
||||
const hasPreview = Boolean(previewUrl && !previewFailed);
|
||||
const isAutoConfiguredOption = /根据风格已配置/.test(option.buttonName);
|
||||
const hasPreview = Boolean(previewUrl && !previewFailed && !isAutoConfiguredOption);
|
||||
|
||||
return (
|
||||
<button
|
||||
@ -492,12 +492,31 @@ const StepOptionCard = memo(function StepOptionCard({
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent" />
|
||||
</>
|
||||
) : (
|
||||
<div className="flex h-full w-full items-center justify-center bg-[radial-gradient(circle_at_30%_20%,rgba(255,255,255,0.10),transparent_38%),linear-gradient(135deg,#151515,#090909)] px-6">
|
||||
<div
|
||||
className="flex h-full w-full items-center justify-center px-6"
|
||||
style={{
|
||||
background: isAutoConfiguredOption
|
||||
? "radial-gradient(circle at 32% 18%, rgba(52, 211, 153, 0.20), transparent 34%), linear-gradient(135deg, #0b1713 0%, #101312 48%, #050606 100%)"
|
||||
: "radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.10), transparent 38%), linear-gradient(135deg, #151515, #090909)",
|
||||
}}
|
||||
>
|
||||
<div className="text-center">
|
||||
<div className="mx-auto flex h-11 w-11 items-center justify-center rounded-full border border-white/10 bg-white/[0.04]">
|
||||
<Sparkles className="h-5 w-5 text-white/35" />
|
||||
<div
|
||||
className={cn(
|
||||
"mx-auto flex h-11 w-11 items-center justify-center rounded-full border bg-white/[0.04]",
|
||||
isAutoConfiguredOption
|
||||
? "border-emerald-300/24 text-emerald-200"
|
||||
: "border-white/10 text-white/35"
|
||||
)}
|
||||
>
|
||||
<Sparkles className="h-5 w-5" />
|
||||
</div>
|
||||
<div className="mt-3 text-[11px] font-medium text-white/42">
|
||||
<div
|
||||
className={cn(
|
||||
"mt-3 text-[11px] font-medium",
|
||||
isAutoConfiguredOption ? "text-emerald-100/78" : "text-white/42"
|
||||
)}
|
||||
>
|
||||
{isAutoConfiguredOption ? "自动配置" : "暂无预览图"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user