- 新增访问统计:visitstats 服务与查询、visit_capture 中间件、爬虫/来源识别、管理端 analytics 页面 - 新增侧边栏:sidebar 服务与 handler、管理端 sidebar 配置页、前端侧边栏组件 - 新增 widget 嵌入代码生成(widgetCode)与 widgetApi - 遥测逻辑迁移至 handler 层,删除 service/telemetry - env 示例补充 Docker 部署可信代理 IP 说明
18 lines
559 B
TypeScript
18 lines
559 B
TypeScript
import { cookies } from "next/headers";
|
|
import { authCookieHeader } from "@/lib/cookies";
|
|
import { fetchStatsOverview, type VisitOverview } from "@/lib/api";
|
|
import OverviewClient from "./OverviewClient";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export default async function AnalyticsOverviewPage() {
|
|
const cookie = authCookieHeader(await cookies());
|
|
let initial: VisitOverview | null = null;
|
|
try {
|
|
initial = await fetchStatsOverview(cookie || undefined, "7d");
|
|
} catch {
|
|
initial = null;
|
|
}
|
|
return <OverviewClient initial={initial} />;
|
|
}
|