fix(mgmt/web): the running-game cover slot says "game" when there is no art

Rendered the Dashboard stories headlessly and looked at them, which is how this
turned up: with no cover the slot was an empty grey rectangle, reading as
something that failed to load rather than something absent.

Plenty of rows will never have art — an operator-typed command has no catalog
entry behind it, a custom entry may carry none, and nothing does until
`/library` has loaded. The slot keeps its fixed size so rows stay aligned when
only some titles have covers; it just holds a gamepad glyph instead of nothing.
This commit is contained in:
2026-07-27 00:47:05 +02:00
parent f57fc85d34
commit 39a9f09f04
+8 -2
View File
@@ -56,14 +56,20 @@ const GameRow: FC<{
const waiting = game.state === "grace";
return (
<div className="flex items-center gap-3">
<div className="h-16 w-11 shrink-0 overflow-hidden rounded bg-muted">
{art && (
{/* Fixed slot so rows line up whether or not a title has a cover. Plenty won't: an
operator-typed command has no catalog entry behind it, a custom entry may carry no
art, and nothing does until `/library` has loaded — an empty box reads as broken, so
the placeholder says "game" instead of nothing. */}
<div className="flex h-16 w-11 shrink-0 items-center justify-center overflow-hidden rounded bg-muted">
{art ? (
<img
src={art}
alt=""
loading="lazy"
className="size-full object-cover"
/>
) : (
<Gamepad2 className="size-5 text-muted-foreground/60" />
)}
</div>
<div className="min-w-0 flex-1">