Landscape: whole-app landscape-first + Home 2-column landscape layout
CI/CD / CI - API (dotnet build + engine sim) (push) Successful in 47s
CI/CD / CI - Web (tsc + next build) (push) Successful in 1m7s
CI/CD / Deploy - local stack (db + server + web) (push) Successful in 1m0s

- Move orientation lock + RotatePrompt to app root → whole app is landscape-
  first now (UNO-style), not just the game. Generalized rotate copy.
- Home: portrait unchanged; in landscape it becomes a 2-column app layout
  (col A = branding + play actions, col B = tiles + footer) that fits the
  short height with no scroll (landscape: Tailwind variants, overflow-hidden).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-11 00:33:21 +03:30
parent e8b3172197
commit 3e37085d18
4 changed files with 35 additions and 28 deletions
-18
View File
@@ -5,7 +5,6 @@ import { useEffect, useRef, useState } from "react";
import { GameTable } from "@/components/GameTable";
import { PostMatchRewardsModal } from "@/components/online/PostMatchRewardsModal";
import { MatchIntroOverlay } from "@/components/online/MatchIntroOverlay";
import { RotatePrompt } from "@/components/online/RotatePrompt";
import { useGameStore } from "@/lib/game-store";
import { useSessionStore } from "@/lib/session-store";
import { useUIStore } from "@/lib/ui-store";
@@ -59,20 +58,6 @@ export function GameScreen() {
};
}, []);
// Landscape-first table: best-effort lock to landscape on Android/PWA (iOS &
// desktop reject it — harmless). Restored to portrait/auto when leaving.
useEffect(() => {
const o = (screen as unknown as { orientation?: { lock?: (m: string) => Promise<void>; unlock?: () => void } }).orientation;
o?.lock?.("landscape").catch(() => {});
return () => {
try {
o?.unlock?.();
} catch {
/* unsupported — ignore */
}
};
}, []);
const notifyAchievements = (r: RewardResult) => {
for (const a of r.newAchievements)
pushNotification({
@@ -157,9 +142,6 @@ export function GameScreen() {
onForfeit={canForfeit ? () => useGameStore.getState().forfeit() : undefined}
/>
{/* Landscape-first: nudge to rotate when held in portrait on a phone */}
<RotatePrompt />
{/* UNO-style "players joining the table" intro (online matches, once) */}
<AnimatePresence>
{introPending && mode === "online" && (