Size HTML firmware previews by board (480x320 for 3.5).

EOF

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-23 18:45:24 +08:00
parent 2dd97f95ad
commit cf617592d4
4 changed files with 26 additions and 9 deletions

View File

@@ -60,3 +60,9 @@ export function resolveBoardId(boardField: string | null | undefined): string {
export function getBoard(id: string): BoardDefinition | undefined {
return BOARDS.find((b) => b.id === id);
}
/** Logical UI resolution used by HTML firmware previews (matches UX/UY). */
export function boardPreviewSize(boardId: string): { w: number; h: number } {
if (boardId === "esp32-3248s035") return { w: 480, h: 320 };
return { w: 320, h: 240 };
}