diff --git a/frontend/public/manifest.webmanifest b/frontend/public/manifest.webmanifest
new file mode 100644
index 0000000..15442ac
--- /dev/null
+++ b/frontend/public/manifest.webmanifest
@@ -0,0 +1,32 @@
+{
+ "name": "直播监控中心",
+ "short_name": "LiveRadar",
+ "description": "抖音 + YouTube 直播监控 · Shorts / TikTok 分发",
+ "start_url": "/",
+ "scope": "/",
+ "display": "standalone",
+ "orientation": "any",
+ "background_color": "#071018",
+ "theme_color": "#071018",
+ "lang": "zh-CN",
+ "icons": [
+ {
+ "src": "/icon-192.png",
+ "sizes": "192x192",
+ "type": "image/png",
+ "purpose": "any"
+ },
+ {
+ "src": "/icon-512.png",
+ "sizes": "512x512",
+ "type": "image/png",
+ "purpose": "any"
+ },
+ {
+ "src": "/icon-512.png",
+ "sizes": "512x512",
+ "type": "image/png",
+ "purpose": "maskable"
+ }
+ ]
+}
diff --git a/frontend/public/sw.js b/frontend/public/sw.js
new file mode 100644
index 0000000..1e16a40
--- /dev/null
+++ b/frontend/public/sw.js
@@ -0,0 +1,46 @@
+/* Minimal service worker — enables installability; network-first for app/API. */
+const CACHE = "dylive-shell-v1";
+const PRECACHE = ["/", "/manifest.webmanifest", "/icon-192.png", "/icon-512.png", "/apple-touch-icon.png"];
+
+self.addEventListener("install", (event) => {
+ event.waitUntil(
+ caches.open(CACHE).then((cache) => cache.addAll(PRECACHE)).then(() => self.skipWaiting()),
+ );
+});
+
+self.addEventListener("activate", (event) => {
+ event.waitUntil(
+ caches.keys().then((keys) =>
+ Promise.all(keys.filter((k) => k !== CACHE).map((k) => caches.delete(k))),
+ ).then(() => self.clients.claim()),
+ );
+});
+
+self.addEventListener("fetch", (event) => {
+ const req = event.request;
+ if (req.method !== "GET") return;
+ const url = new URL(req.url);
+ if (url.origin !== self.location.origin) return;
+ // Never cache API / auth / SSE
+ if (url.pathname.startsWith("/api/") || url.pathname.includes("event")) return;
+
+ event.respondWith(
+ fetch(req)
+ .then((res) => {
+ const copy = res.clone();
+ if (res.ok && (url.pathname.startsWith("/_next/static/") || PRECACHE.includes(url.pathname))) {
+ caches.open(CACHE).then((cache) => cache.put(req, copy)).catch(() => {});
+ }
+ return res;
+ })
+ .catch(async () => {
+ const hit = await caches.match(req);
+ if (hit) return hit;
+ if (req.mode === "navigate") {
+ const home = await caches.match("/");
+ if (home) return home;
+ }
+ throw new Error("offline");
+ }),
+ );
+});
diff --git a/frontend/src/app/anchors/page.tsx b/frontend/src/app/anchors/page.tsx
index cfaef60..be35bc9 100644
--- a/frontend/src/app/anchors/page.tsx
+++ b/frontend/src/app/anchors/page.tsx
@@ -307,7 +307,7 @@ export default function AnchorsPage() {
{profile.schedule.slot_counts?.length === 6 ? (
-
+
{profile.schedule.slot_counts.map((n, i) => {
const max = Math.max(1, ...profile.schedule!.slot_counts!);
return (
diff --git a/frontend/src/app/blacklist/page.tsx b/frontend/src/app/blacklist/page.tsx
index d7b91e4..7c6f4a5 100644
--- a/frontend/src/app/blacklist/page.tsx
+++ b/frontend/src/app/blacklist/page.tsx
@@ -130,8 +130,8 @@ export default function BlacklistPage() {
) : items.length === 0 ? (
) : (
-
-
+
+
| 内容 |
diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css
index ed774b4..cacdf4b 100644
--- a/frontend/src/app/globals.css
+++ b/frontend/src/app/globals.css
@@ -16,6 +16,8 @@
html,
body {
min-height: 100%;
+ min-height: 100dvh;
+ overflow-x: clip;
}
body {
@@ -28,12 +30,84 @@ body {
radial-gradient(700px 400px at 50% 100%, rgba(56, 189, 248, 0.06), transparent 60%),
linear-gradient(160deg, #071018 0%, #0f1c2e 45%, #0a1422 100%);
background-attachment: fixed;
+ -webkit-tap-highlight-color: transparent;
+ text-size-adjust: 100%;
+}
+
+@media (max-width: 767px) {
+ body {
+ background-attachment: scroll;
+ }
+ .ambient-orb {
+ opacity: 0.22;
+ filter: blur(48px);
+ animation: none;
+ }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .ambient-orb,
+ .animate-fade-up,
+ .animate-fade-in,
+ .stagger > *,
+ .page-enter {
+ animation: none !important;
+ }
}
* {
box-sizing: border-box;
}
+img,
+video,
+canvas,
+svg {
+ max-width: 100%;
+ height: auto;
+}
+
+/* Edge-to-edge horizontal scroll for wide tables on phones */
+.table-scroll {
+ margin-left: -0.75rem;
+ margin-right: -0.75rem;
+ padding-left: 0.75rem;
+ padding-right: 0.75rem;
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
+ overscroll-behavior-x: contain;
+}
+
+@media (min-width: 640px) {
+ .table-scroll {
+ margin-left: 0;
+ margin-right: 0;
+ padding-left: 0;
+ padding-right: 0;
+ }
+}
+
+.touch-target {
+ min-height: 2.75rem;
+ min-width: 2.75rem;
+}
+
+input,
+select,
+textarea,
+button {
+ font-size: 16px; /* avoid iOS zoom on focus */
+}
+
+@media (min-width: 640px) {
+ input,
+ select,
+ textarea,
+ button {
+ font-size: inherit;
+ }
+}
+
::selection {
background: rgba(255, 45, 85, 0.35);
color: #fff;
diff --git a/frontend/src/app/groups/page.tsx b/frontend/src/app/groups/page.tsx
index 6077dde..9f772e5 100644
--- a/frontend/src/app/groups/page.tsx
+++ b/frontend/src/app/groups/page.tsx
@@ -496,7 +496,7 @@ export default function GroupsPage() {
频道排行
-
+
@@ -546,7 +546,7 @@ export default function GroupsPage() {
全部 →
-
+
diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx
index c6fedcb..d6bf6cd 100644
--- a/frontend/src/app/layout.tsx
+++ b/frontend/src/app/layout.tsx
@@ -1,9 +1,20 @@
+import type { Metadata, Viewport } from "next";
import "./globals.css";
import { Providers } from "@/components/Providers";
-export const metadata = {
- title: "抖音直播间监控",
- description: "开播/停播/时长/截图监控与可视化分析",
+export const metadata: Metadata = {
+ title: "直播监控中心",
+ description: "抖音 + YouTube 开播/停播/时长/截图监控与 Shorts、TikTok 分发",
+ applicationName: "LiveRadar",
+ manifest: "/manifest.webmanifest",
+ appleWebApp: {
+ capable: true,
+ statusBarStyle: "black-translucent",
+ title: "LiveRadar",
+ },
+ formatDetection: {
+ telephone: false,
+ },
icons: {
icon: [
{ url: "/favicon.ico" },
@@ -14,6 +25,18 @@ export const metadata = {
},
};
+export const viewport: Viewport = {
+ width: "device-width",
+ initialScale: 1,
+ maximumScale: 5,
+ viewportFit: "cover",
+ themeColor: [
+ { media: "(prefers-color-scheme: dark)", color: "#071018" },
+ { media: "(prefers-color-scheme: light)", color: "#071018" },
+ ],
+ colorScheme: "dark",
+};
+
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
@@ -24,8 +47,9 @@ export default function RootLayout({ children }: { children: React.ReactNode })
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;700&family=Space+Grotesk:wght@500;700&display=swap"
rel="stylesheet"
/>
+
-
+
{children}
diff --git a/frontend/src/app/login/page.tsx b/frontend/src/app/login/page.tsx
index 0415ff0..cac23b1 100644
--- a/frontend/src/app/login/page.tsx
+++ b/frontend/src/app/login/page.tsx
@@ -45,10 +45,10 @@ function LoginForm() {
}
return (
-
+
-
+
Live Radar
diff --git a/frontend/src/app/rooms/page.tsx b/frontend/src/app/rooms/page.tsx
index 1ebf81d..3dda3b8 100644
--- a/frontend/src/app/rooms/page.tsx
+++ b/frontend/src/app/rooms/page.tsx
@@ -468,8 +468,8 @@ export default function RoomsPage() {
{error ?
{error}
: null}
{msg ?
{msg}
: null}
-
-
+
+
diff --git a/frontend/src/app/sessions/page.tsx b/frontend/src/app/sessions/page.tsx
index a0b8cd2..6a1d112 100644
--- a/frontend/src/app/sessions/page.tsx
+++ b/frontend/src/app/sessions/page.tsx
@@ -310,7 +310,7 @@ export default function SessionsPage() {
{tab === "list" ? (
<>
-
+
diff --git a/frontend/src/app/settings/page.tsx b/frontend/src/app/settings/page.tsx
index 792899c..9919e69 100644
--- a/frontend/src/app/settings/page.tsx
+++ b/frontend/src/app/settings/page.tsx
@@ -1125,7 +1125,7 @@ function OpsPanel() {
{pbHealth?.drift ? (
-
+
diff --git a/frontend/src/app/shorts/page.tsx b/frontend/src/app/shorts/page.tsx
index 487f756..a49433a 100644
--- a/frontend/src/app/shorts/page.tsx
+++ b/frontend/src/app/shorts/page.tsx
@@ -722,7 +722,7 @@ export default function ShortsPage() {
频道开播排行
-
+
@@ -773,7 +773,7 @@ export default function ShortsPage() {
全部 →
-
+
@@ -1459,11 +1459,11 @@ export default function ShortsPage() {
) : null}
-
+
{loading && jobs.length === 0 ? (
) : (
-
+
diff --git a/frontend/src/app/slots/page.tsx b/frontend/src/app/slots/page.tsx
index bcfee2b..72e31eb 100644
--- a/frontend/src/app/slots/page.tsx
+++ b/frontend/src/app/slots/page.tsx
@@ -378,7 +378,7 @@ export default function SlotsPage() {
{rangeMode === "7d" ? (
日 × 时段热力(开播次数)
-
+
diff --git a/frontend/src/app/tiktok/page.tsx b/frontend/src/app/tiktok/page.tsx
index 3842721..fee2a67 100644
--- a/frontend/src/app/tiktok/page.tsx
+++ b/frontend/src/app/tiktok/page.tsx
@@ -507,7 +507,7 @@ export default function TikTokPage() {
onConfirm={(channelPk) => uploadUx.confirmUpload(channelPk)}
busy={uploadUx.busy}
/>
-
+
{/* Header */}
@@ -1140,7 +1140,7 @@ export default function TikTokPage() {
任务流水(今日 {jobTotal})
-
+
diff --git a/frontend/src/app/youtube/page.tsx b/frontend/src/app/youtube/page.tsx
index 199f4e8..8b31cc7 100644
--- a/frontend/src/app/youtube/page.tsx
+++ b/frontend/src/app/youtube/page.tsx
@@ -305,7 +305,7 @@ export default function YouTubePage() {
| |