feat(privacy): privacy page, security headers, Chrome fallback for Samsung installs
The 'privacy' refusal on the S23 is Google Play Protect blocking the WebAPK that Samsung Internet mints (old targetSdkVersion) — a browser-side bug that also hits other PWAs; Chrome on the same device installs fine. So: - ui/install-tip.js: detect Samsung Internet on Android and offer the same URL in Chrome (intent:// link, copy-link fallback, dismissable, remembered) - ui/views/privacy.js + #/privacy route + footer link: Thai privacy policy (what is stored locally, no cookies/analytics/third-party scripts, how to delete) - server/publish.mjs: CSP (script-src 'self', style-src 'self' 'unsafe-inline'), Referrer-Policy, Permissions-Policy, X-Content-Type-Options on every response - ui/boot-motion.js: the head inline script moved out so CSP can forbid inline JS - ui/data.js: admin publish token now lives in sessionStorage (was localStorage) - theme.css: .notice / .legal components (44px targets), DESIGN.md + README + AGENTS Verified: installabilityErrors [], fonts load under CSP, all requests same-origin, notice renders under the header at 360px with 44px buttons and stays dismissed, privacy page renders 5 sections. VERSION 2026.11.24.6.
This commit is contained in:
1 parent
ddec75b99e
commit
2edbc39805
12 files changed
+346
-20
No files matched your search
@@ -53,6 +53,8 @@
|
||||
- **คำว่า `hobbyproject` ในฮีโร่**: แบ่งสีตามตัวอักษร — `hobbyp` + `j` ใช้ `--brand-900` (#3D241A, 12.21:1) และ `ro` + `ect` ใช้ `--brand-500` (#C4703C, 3.12:1 บนพื้นฮีโร่เข้มสุด) จึงต้องมีขนาด ≥24px ตัวหนาขึ้นไป (ตอนนี้ clamp 24–32px) ถ้าลดต่ำกว่านั้นต้องเปลี่ยนไปใช้ `--brand-600` (#A85A2C, 4.30:1) เพื่อให้ผ่าน 4.5:1 ของตัวอักษรปกติ
|
||||
- **ฮีโร่**: พื้นไล่เฉดอุ่นอ่อน + การ์ดลอย 3 ใบ **สุ่มจากโปรเจคทั้งหมดใหม่ทุกครั้งที่โหลดหน้า** (Fisher–Yates, ไม่ซ้ำ) แสดงเฉพาะ ≥1080px — **กดได้จริง** ลิงก์ไป `project_url` เดียวกับการ์ดในกริด (`target="_blank"` + `rel="noopener noreferrer"`) จึงต้องไม่ใส่ `aria-hidden` และต้องโฟกัสด้วยคีย์บอร์ดได้
|
||||
- **หลังบ้าน**: พาเนล + การ์ดรายการ, ปุ่มเลื่อนขึ้น/ลง/ลบ, แถบบันทึกแบบ sticky ด้านล่าง, `<dialog>` ยืนยันการลบ/ทิ้งการแก้ไข
|
||||
- **แถบคำแนะนำ (`.notice`)**: พื้น `--brand-50`, ขอบซ้าย 4px `--brand-600`, อยู่ใต้ header ก่อนเนื้อหา, ปุ่มทุกตัวสูง ≥44px, ปิดแล้วจำใน `localStorage` (`hobbypj.install.tip.dismissed.v1`)
|
||||
- **หน้าข้อความกฎหมาย (`.legal`)**: ความกว้างสูงสุด 72ch, หัวข้อ `--brand-800`, ใช้ได้กับหน้า `#/privacy`
|
||||
|
||||
## 6. สิ่งที่ห้าม
|
||||
|
||||
|
||||
Reference in new issue
Block a user