pc: drop shared brand from grouped card label
All checks were successful
Deploy production / deploy (push) Successful in 1m15s
All checks were successful
Deploy production / deploy (push) Successful in 1m15s
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
const qty = $derived(parts.reduce((s, p) => s + (isAddOn(p) ? 0 : units(p)), 0));
|
const qty = $derived(parts.reduce((s, p) => s + (isAddOn(p) ? 0 : units(p)), 0));
|
||||||
const image = $derived(parts.flatMap((p) => p.imageUrls)[0] ?? null);
|
const image = $derived(parts.flatMap((p) => p.imageUrls)[0] ?? null);
|
||||||
const names = $derived([...new Set(parts.map(displayName))]);
|
const names = $derived([...new Set(parts.map(displayName))]);
|
||||||
// Grouped (×N) cards list each item on its own line; a brand shared by all moves to the label.
|
// Grouped (×N) cards list each item on its own line; a brand shared by all is dropped (it's in the thumb).
|
||||||
const brands = $derived([...new Set(parts.map((p) => p.brand ?? ''))]);
|
const brands = $derived([...new Set(parts.map((p) => p.brand ?? ''))]);
|
||||||
const sharedBrand = $derived(
|
const sharedBrand = $derived(
|
||||||
names.length > 1 && brands.length === 1 && brands[0] ? brands[0] : null
|
names.length > 1 && brands.length === 1 && brands[0] ? brands[0] : null
|
||||||
@@ -73,8 +73,7 @@
|
|||||||
>{/if}
|
>{/if}
|
||||||
<span class="min-w-0 flex-1">
|
<span class="min-w-0 flex-1">
|
||||||
<span class="label">
|
<span class="label">
|
||||||
{slotLabel(slot, first.category)}{#if qty > 1}<span class="qty">×{qty}</span
|
{slotLabel(slot, first.category)}{#if qty > 1}<span class="qty">×{qty}</span>{/if}
|
||||||
>{/if}{#if sharedBrand}<span class="brand">· {sharedBrand}</span>{/if}
|
|
||||||
{#if !compact}{#each badges as b (b)}<span class="badge" class:warn={b === 'model TBD'}
|
{#if !compact}{#each badges as b (b)}<span class="badge" class:warn={b === 'model TBD'}
|
||||||
>{b}</span
|
>{b}</span
|
||||||
>{/each}{/if}
|
>{/each}{/if}
|
||||||
@@ -227,10 +226,6 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
.brand {
|
|
||||||
text-transform: none;
|
|
||||||
letter-spacing: 0;
|
|
||||||
}
|
|
||||||
.lines {
|
.lines {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
Reference in New Issue
Block a user