Game profile: granular IGDB platforms and free-game badge
Build & Push / Lint & Build (push) Successful in 1m16s
Build & Push / Build & Push Image (push) Successful in 28s
Build & Push / Trigger Deploy (push) Successful in 2s

- List IGDB platform names verbatim (Windows, MacOS) instead of
  coarse buckets; fall back to Steam OS flags and hardware
  distributors only when IGDB has none
- Show a Free badge instead of prices when best price is zero
This commit is contained in:
fristy committed 2026-09-11 06:51:41 +03:00
1 parent d778a18a49
commit 7d6d31265b
5 files changed
+74 -54

No files matched your search

+39 -32
View File
@@ -161,6 +161,7 @@ export function GameProfileModal({
const name = profile?.name ?? fallbackName;
const best = profile?.itad?.prices ?? null;
const low = profile?.itad?.historyLow ?? null;
const isFree = !!best && best.price === 0;
const hero = useMemo(() => {
if (bannerPick) {
return bannerPick;
@@ -539,38 +540,44 @@ export function GameProfileModal({
<p className="font-mono text-xs uppercase tracking-wider text-zinc-500">
{dict.prices}
</p>
<div className="mt-1.5 grid gap-2 sm:grid-cols-2">
{best ? (
<a
href={best.url || undefined}
target="_blank"
rel="noopener noreferrer"
className="rounded-xl border border-mint/20 bg-mint/5 p-3 transition-colors hover:border-mint/40"
>
<p className="font-mono text-xs text-mint">
{dict.bestPrice} · {best.shop}
</p>
<p className="mt-1 text-lg font-bold">
{formatPrice(best, tag)}{" "}
{discountPercent(best) ? (
<span className="ml-1 rounded bg-mint/15 px-1.5 py-0.5 align-middle font-mono text-xs text-mint">
-%{discountPercent(best)}
</span>
) : null}
</p>
</a>
) : null}
{low ? (
<div className="rounded-xl border border-white/5 bg-white/[0.03] p-3">
<p className="font-mono text-xs text-zinc-500">
{dict.historyLow} · {low.shop}
</p>
<p className="mt-1 text-lg font-bold text-zinc-200">
{formatPrice(low, tag)}
</p>
</div>
) : null}
</div>
{isFree ? (
<p className="mt-1.5 inline-block rounded-full border border-mint/20 bg-mint/5 px-4 py-1.5 text-xs font-semibold text-mint">
{dict.free}
</p>
) : (
<div className="mt-1.5 grid gap-2 sm:grid-cols-2">
{best ? (
<a
href={best.url || undefined}
target="_blank"
rel="noopener noreferrer"
className="rounded-xl border border-mint/20 bg-mint/5 p-3 transition-colors hover:border-mint/40"
>
<p className="font-mono text-xs text-mint">
{dict.bestPrice} · {best.shop}
</p>
<p className="mt-1 text-lg font-bold">
{formatPrice(best, tag)}{" "}
{discountPercent(best) ? (
<span className="ml-1 rounded bg-mint/15 px-1.5 py-0.5 align-middle font-mono text-xs text-mint">
-%{discountPercent(best)}
</span>
) : null}
</p>
</a>
) : null}
{low ? (
<div className="rounded-xl border border-white/5 bg-white/[0.03] p-3">
<p className="font-mono text-xs text-zinc-500">
{dict.historyLow} · {low.shop}
</p>
<p className="mt-1 text-lg font-bold text-zinc-200">
{formatPrice(low, tag)}
</p>
</div>
) : null}
</div>
)}
</div>
) : null}