fix: load legacy workflow previews directly
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-05-19 18:30:32 +08:00
parent ffcfd08b70
commit 1f766e745c

View File

@ -135,6 +135,19 @@ function buildWorkflowOptionPreviewUrl(url?: string | null, sourceUrl?: string |
if (isLikelyStoredWorkflowPreview(source, sourceUrl)) {
return source;
}
try {
const target = new URL(source);
const hostname = target.hostname.toLowerCase();
if (
hostname === "s3.jiansun.vip" ||
hostname.endsWith(".jiansun.vip") ||
hostname === "s3.1080p.hk"
) {
return source;
}
} catch {
return source;
}
return buildImageProxyUrl(source, {
width: WORKFLOW_OPTION_PREVIEW_WIDTH,
quality: WORKFLOW_OPTION_PREVIEW_QUALITY,
@ -452,6 +465,7 @@ const StepOptionCard = memo(function StepOptionCard({
loading={shouldLoadFast ? "eager" : "lazy"}
decoding="async"
fetchPriority={shouldLoadFast ? "high" : "low"}
referrerPolicy="no-referrer"
draggable={false}
sizes="(min-width: 1536px) 18vw, (min-width: 1280px) 22vw, (min-width: 1024px) 25vw, (min-width: 640px) 33vw, 50vw"
onError={(event) =>