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
+24
View File
@@ -0,0 +1,24 @@
// Render public/icon.svg to a 512x512 store PNG (full square — stores apply
// their own corner mask). Uses Chrome for correct Persian text shaping.
const { chromium } = require("playwright");
const fs = require("fs");
const path = require("path");
const OUT = path.join(__dirname, "shots");
fs.mkdirSync(OUT, { recursive: true });
let svg = fs.readFileSync(path.join(__dirname, "..", "public", "icon.svg"), "utf8");
// Full-bleed square (remove the rounded corners so there's no transparency).
const square = svg.replace('rx="112"', 'rx="0"').replace("<svg ", '<svg width="512" height="512" ');
const html = `<!doctype html><html><head><meta charset="utf-8"></head><body style="margin:0;padding:0">${square}</body></html>`;
(async () => {
const browser = await chromium.launch({ channel: "chrome" });
const ctx = await browser.newContext({ viewport: { width: 512, height: 512 }, deviceScaleFactor: 1 });
const page = await ctx.newPage();
await page.setContent(html, { waitUntil: "networkidle" });
await page.waitForTimeout(600);
await page.screenshot({ path: path.join(OUT, "icon-512.png"), clip: { x: 0, y: 0, width: 512, height: 512 } });
await browser.close();
console.log("icon-512 done");
})().catch((e) => { console.error("FATAL", e); process.exit(1); });