diff --git a/packages/web/src/App.svelte b/packages/web/src/App.svelte index 427beab..a9f6d21 100644 --- a/packages/web/src/App.svelte +++ b/packages/web/src/App.svelte @@ -468,6 +468,13 @@ const wideQuery = typeof matchMedia === "undefined" ? null : matchMedia("(min-width: 901px)"); let wideScreen = $state(wideQuery?.matches ?? true); wideQuery?.addEventListener("change", (e) => (wideScreen = e.matches)); + /** A wide, short screen — a laptop in landscape — stands the hand beside + * the board unless the player has said otherwise: a tall maze under a + * bottom hand leaves a postage stamp, and a first turn deserves better. */ + const shortWideQuery = typeof matchMedia === "undefined" ? null : matchMedia("(min-width: 1180px) and (max-height: 820px)"); + let shortWide = $state(shortWideQuery?.matches ?? false); + shortWideQuery?.addEventListener("change", (e) => (shortWide = e.matches)); + const handLeftOn = $derived(prefs.handLeftChosen ? prefs.handLeft : shortWide); const castPanelOn = $derived(wideScreen && !local.active && (selectedCard != null || (youMustRespond && !!view?.stack))); @@ -497,7 +504,7 @@ * width, capped so the full hand still fits without a scrollbar. */ let handEl = $state(null); function fitHandCards(el: HTMLDivElement) { - if (!prefs.handLeft) { el.style.removeProperty("--card-zoom"); return; } + if (!handLeftOn) { el.style.removeProperty("--card-zoom"); return; } // Card.svelte is the source of truth for the card's box: 8.2rem wide, // 11.4rem tall. 5rem covers the masthead and the column's padding. const rem = 16; @@ -518,7 +525,7 @@ }); $effect(() => { void view?.yourHand.length; - void prefs.handLeft; + void handLeftOn; const el = handEl; if (el) requestAnimationFrame(() => fitHandCards(el)); }); @@ -1665,7 +1672,7 @@ {:else if net.roomId} {#if net.audience > 0} 👁 {net.audience} @@ -1902,9 +1909,9 @@ Instant replay: notable chronicle lines offer a 👁 that relives the turn