Fix firmware HTML preview centering and fill.

Scale the 320x240 iframe from the card container so covers stay centered and fully visible.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-19 22:14:20 +08:00
parent e8d86ec477
commit 2d97d5990f
2 changed files with 46 additions and 9 deletions

View File

@@ -31,7 +31,7 @@ export function FirmwareCard({
: "border-[var(--line)] bg-[rgba(0,0,0,0.22)] hover:-translate-y-0.5 hover:border-[rgba(240,197,10,0.35)] hover:bg-[rgba(240,197,10,0.04)]"
)}
>
<div className="relative aspect-[16/10] w-full overflow-hidden border-b border-[var(--line)]">
<div className="relative aspect-[4/3] w-full overflow-hidden border-b border-[var(--line)]">
<FirmwarePreview fw={fw} />
<div className="pointer-events-none absolute bottom-2 left-2 flex gap-1">
{hasPreview && (