feat: 站点访问统计与可配置侧边栏组件

- 新增访问统计:visitstats 服务与查询、visit_capture 中间件、爬虫/来源识别、管理端 analytics 页面
- 新增侧边栏:sidebar 服务与 handler、管理端 sidebar 配置页、前端侧边栏组件
- 新增 widget 嵌入代码生成(widgetCode)与 widgetApi
- 遥测逻辑迁移至 handler 层,删除 service/telemetry
- env 示例补充 Docker 部署可信代理 IP 说明
This commit is contained in:
2026-09-24 18:53:45 +08:00
parent 3e55b5d230
commit 7b327bc8cc
60 changed files with 6539 additions and 572 deletions

View File

@@ -0,0 +1,17 @@
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} />;
}