fix: load legacy workflow previews directly
This commit is contained in:
parent
ffcfd08b70
commit
1f766e745c
@ -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) =>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user