portrait-only: drop landscape rotate prompt + lock to portrait
CI/CD / CI - API (dotnet build + engine sim) (push) Successful in 38s
CI/CD / CI - Web (tsc + next build) (push) Successful in 1m6s
CI/CD / Deploy - local stack (db + server + web) (push) Successful in 1m24s

- Remove RotatePrompt (the "rotate to landscape" overlay) — the app is portrait
  now, so it only blocked the UI.
- page.tsx: best-effort orientation lock switched landscape → portrait.
- Add Playwright-based store-screenshot + icon scripts (scripts/shots.js,
  game.js, icon.js); generated images are gitignored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-12 13:33:01 +03:30
parent 7f08249fa7
commit 66c83991d4
8 changed files with 190 additions and 64 deletions
+3 -6
View File
@@ -22,7 +22,6 @@ import { ResumeGameBar } from "@/components/online/ResumeGameBar";
import { CelebrationOverlay } from "@/components/online/CelebrationOverlay";
import { ErrorBoundary } from "@/components/ErrorBoundary";
import { PublicProfileModal } from "@/components/online/PublicProfileModal";
import { RotatePrompt } from "@/components/online/RotatePrompt";
import { CapacitorBack } from "@/components/CapacitorBack";
import { useSessionStore } from "@/lib/session-store";
import { useGameStore } from "@/lib/game-store";
@@ -192,12 +191,11 @@ export default function Page() {
};
}, [init]);
// Landscape-first app (UNO-style): best-effort lock the whole app to landscape
// on Android / installed PWA. iOS & desktop reject it harmlessly; the
// RotatePrompt covers the portrait case there.
// Portrait-first app: best-effort lock the whole app to portrait on Android /
// installed PWA. iOS & desktop reject it harmlessly.
useEffect(() => {
const o = (screen as unknown as { orientation?: { lock?: (m: string) => Promise<void> } }).orientation;
o?.lock?.("landscape").catch(() => {});
o?.lock?.("portrait").catch(() => {});
}, []);
return (
@@ -211,7 +209,6 @@ export default function Page() {
<ResumeGameBar />
<CelebrationOverlay />
<PublicProfileModal />
<RotatePrompt />
</ErrorBoundary>
<CapacitorBack />
{loading && null}