sync from mock: motion, privacy-first search stats, auto-update UX
- frontend/src/lib/ui/motion.ts + components/MotionBoot.tsx: page-enter and scroll reveal per pathname change (ported from mock motion.js); IntersectionObserver plus sweep fallback for jump-scroll/hidden tabs, maps never transformed - frontend/src/lib/ui/analytics.ts: cookie-less local-first search analytics (localStorage at_stats_v1, DNT/GPC + opt-out, term sanitiser, 900ms debounce, caps 300 terms / 200 views / 120 days); optional Umami endpoint via AT_ANALYTICS - /stats page (StatsView + styles/pages/stats.css): KPIs, 14-day chart, top terms, top route/stop pages, no-result terms, JSON export, clear, opt-out - hooks: stops search apply(), stop detail route filter - remove footer visitor counter (lib/ui/visitors.ts, .mu-visitor/.mu-vreset, i18n keys) - remove floating install-app button; PwaBoot keeps SW + guarded version toast (sessionStorage guard, silent reload when tab hidden) - i18n th/en: nav.stats, update.applying, stats.* (public + src/data locales) - version.json + sw VERSION -> 2026.10.24.3; docs/UI-PORT.md section for this round
This commit is contained in:
1 parent
c0b70ff845
commit
4b5a4d33d3
22 files changed
+1473
-453
No files matched your search
@@ -18,6 +18,7 @@ const APP_VERSION = readAppVersion();
|
||||
import IconSprite from "@/components/IconSprite";
|
||||
import PwaBoot from "@/components/PwaBoot";
|
||||
import SiteBoot from "@/components/SiteBoot";
|
||||
import MotionBoot from "@/components/MotionBoot";
|
||||
import SiteFooter from "@/components/SiteFooter";
|
||||
import SiteHeader from "@/components/SiteHeader";
|
||||
|
||||
@@ -144,6 +145,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
||||
<div id="view">{children}</div>
|
||||
<SiteFooter />
|
||||
<SiteBoot />
|
||||
<MotionBoot />
|
||||
<PwaBoot />
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import StatsView from "@/components/views/StatsView";
|
||||
|
||||
export const metadata = {
|
||||
title: "สถิติการค้นหา",
|
||||
description:
|
||||
"สถิติการค้นหาและหน้าเว็บที่ถูกเปิด — เก็บในเบราว์เซอร์นี้เท่านั้น ไม่มีคุกกี้ ไม่ระบุตัวตน",
|
||||
alternates: { canonical: "/stats" },
|
||||
robots: { index: false, follow: true },
|
||||
};
|
||||
|
||||
export default function Page() {
|
||||
return <StatsView />;
|
||||
}
|
||||
Reference in new issue
Block a user