portrait-only: drop landscape rotate prompt + lock to portrait
- 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:
+3
-6
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user