Skip to content

Commit 50218f3

Browse files
committed
manually include ptm7950
1 parent baac948 commit 50218f3

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/routes/(info)/lttstore/products/[handle]/VariantDisplay.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
stock: StockCounts,
1111
meta: ProductsTableRow
1212
} = $props();
13+
let lowerProductTitle = $derived(product.title.toLowerCase());
1314
</script>
1415

1516
<h2>Options / Variants</h2>
@@ -33,7 +34,11 @@
3334
) ??
3435
// If only one (or first) color/design option and it wasnt featured, just use the first image
3536
(
36-
(lowerOptionName.includes("color") || lowerOptionName.includes("design")) &&
37+
(
38+
lowerOptionName.includes("color") ||
39+
lowerOptionName.includes("design") ||
40+
lowerProductTitle.includes("ptm7950")
41+
) &&
3742
(
3843
option.values.length === 1 ||
3944
(vi === 0 && otherOptionVariants.length > 0)
@@ -50,7 +55,7 @@
5055
{#if !noImages.includes(option.name) || value.includes("oz") || value.includes("mm") || value.includes("-pack")}
5156
{#if image}
5257
{@const preview = (dev ? 'https://whenplane.com' : '') +
53-
`/cdn-cgi/image/fit=scale-down,height=384,metadata=copyright,q=80,sqc=65,format=auto,${image.src.includes("jpg") && !product.title.toLowerCase().includes("desk") ? "segment=foreground," : ""}onerror=redirect/` +
58+
`/cdn-cgi/image/fit=scale-down,height=384,metadata=copyright,q=80,sqc=65,format=auto,${image.src.includes("jpg") && !lowerProductTitle.includes("desk") ? "segment=foreground," : ""}onerror=redirect/` +
5459
`https://img-proxy.whenplane.com/d-img/${product.handle}-${image.id}-${await sha256(image.src).then(r => r.substring(0, 5))}`}
5560
{#key product}
5661
<a href={image.src} class="no-underline! text-center h-full flex justify-center items-center">

0 commit comments

Comments
 (0)