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 image = $derived(parts.flatMap((p) => p.imageUrls)[0] ?? null);
|
||||
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 sharedBrand = $derived(
|
||||
names.length > 1 && brands.length === 1 && brands[0] ? brands[0] : null
|
||||
@@ -73,8 +73,7 @@
|
||||
>{/if}
|
||||
<span class="min-w-0 flex-1">
|
||||
<span class="label">
|
||||
{slotLabel(slot, first.category)}{#if qty > 1}<span class="qty">×{qty}</span
|
||||
>{/if}{#if sharedBrand}<span class="brand">· {sharedBrand}</span>{/if}
|
||||
{slotLabel(slot, first.category)}{#if qty > 1}<span class="qty">×{qty}</span>{/if}
|
||||
{#if !compact}{#each badges as b (b)}<span class="badge" class:warn={b === 'model TBD'}
|
||||
>{b}</span
|
||||
>{/each}{/if}
|
||||
@@ -227,10 +226,6 @@
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.brand {
|
||||
text-transform: none;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
.lines {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user