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
+5
-14
@@ -2,19 +2,7 @@
|
||||
<html lang="th">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script>
|
||||
/* ใส่คลาส fx-motion ก่อนวาดเฟรมแรก เพื่อไม่ให้เนื้อหากะพริบ
|
||||
(JS ปิด หรือผู้ใช้ตั้ง reduced-motion → ไม่ใส่คลาส → เนื้อหาเห็นปกติทันที) */
|
||||
(function () {
|
||||
try {
|
||||
if (!window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
||||
document.documentElement.classList.add("fx-motion");
|
||||
}
|
||||
} catch (e) {
|
||||
/* ถ้า matchMedia ใช้ไม่ได้ ก็ไม่ต้องมีอนิเมชัน */
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script src="ui/boot-motion.js"></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
||||
<title>โปรเจคอดิเรกของเรา</title>
|
||||
<meta
|
||||
@@ -28,7 +16,7 @@
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
||||
<meta name="apple-mobile-web-app-title" content="โปรเจคอดิเรก" />
|
||||
<meta name="application-name" content="โปรเจคอดิเรก" />
|
||||
<meta name="app-version" content="2026.11.24.5" />
|
||||
<meta name="app-version" content="2026.11.24.6" />
|
||||
<link rel="manifest" href="manifest.json" />
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="icons/icon-192.png" />
|
||||
<link rel="icon" type="image/png" sizes="64x64" href="icons/favicon-64.png" />
|
||||
@@ -72,11 +60,14 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="wrap" id="install-tip" hidden></div>
|
||||
|
||||
<main id="main" class="site-main" tabindex="-1"></main>
|
||||
|
||||
<footer class="site-footer">
|
||||
<div class="wrap site-footer__inner">
|
||||
<p class="site-footer__copyright">© hobbypj 2026</p>
|
||||
<p class="site-footer__links"><a href="#/privacy">ความเป็นส่วนตัว</a></p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
Reference in new issue
Block a user