feat: V10 store page

This commit is contained in:
Brennan Wilkes (Text Groove) 2026-01-30 17:05:57 -08:00
parent 2902151c46
commit 6be8e87733

View file

@ -334,9 +334,8 @@ export async function renderStore($app, storeLabelRaw) {
} }
function formatDollars(p) { function formatDollars(p) {
return `$${p}`; if (!Number.isFinite(p)) return "";
// if (!Number.isFinite(p)) return ""; return `$${Math.round(p)}`;
// return `$${Math.round(p)}`;
} }
let selectedMaxPrice = clampAndRound( let selectedMaxPrice = clampAndRound(
@ -377,12 +376,11 @@ export async function renderStore($app, storeLabelRaw) {
updateMaxPriceLabel(); updateMaxPriceLabel();
} }
// ---- Round listing display price to nearest $1 ---- // ---- Listing display price: keep cents (no rounding) ----
function roundedListingPriceStr(it) { function listingPriceStr(it) {
const p = it && Number.isFinite(it._storePrice) ? it._storePrice : null; const p = it && Number.isFinite(it._storePrice) ? it._storePrice : null;
if (p === null) return it.cheapestPriceStr ? it.cheapestPriceStr : "(no price)"; if (p === null) return it.cheapestPriceStr ? it.cheapestPriceStr : "(no price)";
const dollars = Math.round(p); return `$${p.toFixed(2)}`;
return `$${dollars}`;
} }
function priceBadgeHtml(it) { function priceBadgeHtml(it) {
@ -404,7 +402,7 @@ export async function renderStore($app, storeLabelRaw) {
} }
function renderCard(it) { function renderCard(it) {
const price = roundedListingPriceStr(it); const price = listingPriceStr(it);
const href = String(it.sampleUrl || "").trim(); const href = String(it.sampleUrl || "").trim();
const specialBadge = it._lastStock const specialBadge = it._lastStock