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
@@ -472,3 +472,91 @@ select {
|
||||
transition-duration: 0.001ms !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------- notice (คำแนะนำ) */
|
||||
.notice {
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
margin-block: var(--space-4);
|
||||
padding: var(--space-4);
|
||||
border: 1px solid var(--border-strong);
|
||||
border-inline-start: 4px solid var(--brand-600);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--brand-50);
|
||||
color: var(--foreground);
|
||||
font-size: 14.5px;
|
||||
}
|
||||
.notice__body {
|
||||
display: grid;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
.notice__title {
|
||||
margin: 0;
|
||||
font-weight: 700;
|
||||
color: var(--brand-800);
|
||||
}
|
||||
.notice__text {
|
||||
margin: 0;
|
||||
max-width: 62ch;
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
.notice__actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-2);
|
||||
margin-top: var(--space-2);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------- หน้า legal/ข้อมูล */
|
||||
.crumbs {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-bottom: var(--space-4);
|
||||
color: var(--muted-foreground);
|
||||
font-size: 13.5px;
|
||||
}
|
||||
.crumbs a {
|
||||
color: var(--brand-700);
|
||||
}
|
||||
.legal__body {
|
||||
display: grid;
|
||||
gap: var(--space-3);
|
||||
max-width: 72ch;
|
||||
line-height: 1.75;
|
||||
}
|
||||
.legal__meta {
|
||||
margin: 0;
|
||||
color: var(--muted-foreground);
|
||||
font-size: 13.5px;
|
||||
}
|
||||
.legal__body h2 {
|
||||
margin: var(--space-4) 0 0;
|
||||
font-size: 1.05rem;
|
||||
color: var(--brand-800);
|
||||
}
|
||||
.legal__body ul {
|
||||
margin: 0;
|
||||
padding-inline-start: 1.2em;
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
}
|
||||
.legal__body p {
|
||||
margin: 0;
|
||||
}
|
||||
.legal__back {
|
||||
margin-top: var(--space-4);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------- footer link */
|
||||
.site-footer__inner {
|
||||
gap: var(--space-4);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.site-footer__links a {
|
||||
color: var(--brand-700);
|
||||
}
|
||||
|
||||
/* ปุ่มในแถบคำแนะนำต้องกดง่ายบนมือถือ (≥44px) */
|
||||
.notice__actions .btn {
|
||||
min-height: 44px;
|
||||
}
|
||||
Reference in new issue
Block a user