v2.7.0: 顶栏新增文档入口,/docs 页提供 MCP 与 Console API(/api/v1)说明(认证、MCP 客户端配置与工具清单、REST 端点与 curl 示例)

This commit is contained in:
bigcode
2026-10-01 02:33:08 +08:00
parent c4b5e65159
commit fa0730c6dd
6 changed files with 216 additions and 1 deletions
+10
View File
@@ -11,6 +11,7 @@ import {
LogoutOutlined,
SettingOutlined,
HistoryOutlined,
BookOutlined,
} from "@ant-design/icons";
import { health, logout, me } from "./api.ts";
import { SettingsModal } from "./components/SettingsModal.tsx";
@@ -36,6 +37,7 @@ const PAGE_META: Record<string, { title: string; subtitle: string }> = {
"/mailboxes": { title: "邮箱", subtitle: "收件地址、保留策略与邮箱级 Webhook" },
"/inboxs": { title: "收件箱", subtitle: "已接收邮件(默认保留 1 天,可点保留永不过期),支持按域名筛选" },
"/logs": { title: "日志", subtitle: "账号 / 域名 / 邮箱 / Webhook 的操作记录(最多保留 10000 条)" },
"/docs": { title: "文档", subtitle: "MCP 与 Console API(/api/v1)使用说明" },
};
/** # 成员变量: 主题切换按钮的太阳/月亮 SVG 图标 **/
@@ -104,6 +106,14 @@ export function App() {
<div className="subtitle">{meta.subtitle}</div>
</div>
<div style={{ display: "flex", alignItems: "center", gap: 14 }}>
{/* 文档入口:MCP / API 说明页,位于主题切换左侧 */}
<Button
type="text"
aria-label="打开文档"
title="API 与 MCP 文档"
icon={<BookOutlined />}
onClick={() => navigate("/docs")}
/>
{/* 主题切换:亮↔暗,位于头像左侧 */}
<Button
type="text"