@@ -85,7 +85,7 @@ export function FeedDetail({ feedId, xsecToken, onClose, onUserClick }: Props) {
{/* Video */}
{detail.videoUrl && (
)}
@@ -108,10 +108,10 @@ export function FeedDetail({ feedId, xsecToken, onClose, onUserClick }: Props) {
{/* Stats */}
@@ -161,7 +161,7 @@ export function FeedDetail({ feedId, xsecToken, onClose, onUserClick }: Props) {
{detail.comments.length > 0 && (
diff --git a/web/src/components/feed/FeedGrid.tsx b/web/src/components/feed/FeedGrid.tsx
index 62f329c..fb23eee 100644
--- a/web/src/components/feed/FeedGrid.tsx
+++ b/web/src/components/feed/FeedGrid.tsx
@@ -9,7 +9,7 @@ interface Props {
emptyText?: string;
}
-export function FeedGrid({ feeds, loading, onSelect, emptyText = 'No feeds found' }: Props) {
+export function FeedGrid({ feeds, loading, onSelect, emptyText = '暂无内容' }: Props) {
if (loading) {
return (
diff --git a/web/src/components/feed/UserCard.tsx b/web/src/components/feed/UserCard.tsx
index c2936b9..a087317 100644
--- a/web/src/components/feed/UserCard.tsx
+++ b/web/src/components/feed/UserCard.tsx
@@ -56,10 +56,10 @@ export function UserCard({ userId, xsecToken, onFeedSelect }: Props) {
{/* Stats */}
{[
- { label: 'Follows', value: profile.follows },
- { label: 'Fans', value: profile.fans },
- { label: 'Interactions', value: profile.interaction },
- { label: 'Notes', value: profile.feedCount },
+ { label: '关注', value: profile.follows },
+ { label: '粉丝', value: profile.fans },
+ { label: '获赞与收藏', value: profile.interaction },
+ { label: '笔记', value: profile.feedCount },
].map((s) => (
{formatNumber(s.value)}
@@ -72,7 +72,7 @@ export function UserCard({ userId, xsecToken, onFeedSelect }: Props) {
{profile.feeds.length > 0 && (
- Recent Notes ({profile.feeds.length})
+ 最近笔记 ({profile.feeds.length})
diff --git a/web/src/components/layout/Header.tsx b/web/src/components/layout/Header.tsx
index 4a30ec1..19399dc 100644
--- a/web/src/components/layout/Header.tsx
+++ b/web/src/components/layout/Header.tsx
@@ -20,17 +20,17 @@ export function Header() {
- Token 未配置 — 点击前往 Settings
+ Token 未配置 — 点击前往设置
)}
{health && (
- {health.healthy ? 'Healthy' : 'Unhealthy'}
+ {health.healthy ? '正常' : '异常'}
)}
- {!health && Connecting...}
+ {!health && 连接中...}
);
diff --git a/web/src/components/ui/JsonViewer.tsx b/web/src/components/ui/JsonViewer.tsx
index a56c345..c91a515 100644
--- a/web/src/components/ui/JsonViewer.tsx
+++ b/web/src/components/ui/JsonViewer.tsx
@@ -17,13 +17,13 @@ export function JsonViewer({ data, collapsed = false, maxHeight = '400px' }: Pro
onClick={() => setIsCollapsed(!isCollapsed)}
className="text-xs text-dark-muted hover:text-dark-text"
>
- {isCollapsed ? 'Expand' : 'Collapse'}
+ {isCollapsed ? '展开' : '收起'}
{!isCollapsed && (
diff --git a/web/src/lib/constants.ts b/web/src/lib/constants.ts
index 9c3e250..34a7028 100644
--- a/web/src/lib/constants.ts
+++ b/web/src/lib/constants.ts
@@ -1,25 +1,25 @@
export const NAV_ITEMS = [
- { path: '/', label: 'Dashboard', icon: 'dashboard' },
- { path: '/login', label: 'Login', icon: 'login' },
- { path: '/browser', label: 'Browser', icon: 'browser' },
- { path: '/publish', label: 'Publish', icon: 'publish' },
- { path: '/interactions', label: 'Interactions', icon: 'interactions' },
- { path: '/api-tester', label: 'API Tester', icon: 'api' },
- { path: '/settings', label: 'Settings', icon: 'settings' },
+ { path: '/', label: '仪表盘', icon: 'dashboard' },
+ { path: '/login', label: '登录', icon: 'login' },
+ { path: '/browser', label: '内容浏览', icon: 'browser' },
+ { path: '/publish', label: '发布', icon: 'publish' },
+ { path: '/interactions', label: '互动', icon: 'interactions' },
+ { path: '/api-tester', label: 'API 测试', icon: 'api' },
+ { path: '/settings', label: '设置', icon: 'settings' },
] as const;
export const API_ENDPOINTS = [
- { key: 'login_status', method: 'GET', path: '/api/xhs/login/status', label: 'Check Login Status', category: 'Login' },
- { key: 'login_qrcode', method: 'GET', path: '/api/xhs/login/qrcode', label: 'Get Login QR Code', category: 'Login' },
- { key: 'login_delete', method: 'DELETE', path: '/api/xhs/login/cookies', label: 'Delete Cookies (Logout)', category: 'Login' },
- { key: 'feeds', method: 'GET', path: '/api/xhs/feeds', label: 'List Feeds', category: 'Content' },
- { key: 'search', method: 'POST', path: '/api/xhs/search', label: 'Search', category: 'Content', body: { keyword: '', filters: { sort: 'general', type: 'all', time: 'all' } } },
- { key: 'feed_detail', method: 'POST', path: '/api/xhs/feeds/detail', label: 'Feed Detail', category: 'Content', body: { feed_id: '', xsec_token: '', load_all_comments: false } },
- { key: 'user_profile', method: 'POST', path: '/api/xhs/user/profile', label: 'User Profile', category: 'Content', body: { user_id: '', xsec_token: '' } },
- { key: 'publish_image', method: 'POST', path: '/api/xhs/publish/image', label: 'Publish Image Note', category: 'Publish', body: { title: '', content: '', images: [], tags: [], is_original: false, visibility: 'public' } },
- { key: 'publish_video', method: 'POST', path: '/api/xhs/publish/video', label: 'Publish Video Note', category: 'Publish', body: { title: '', content: '', video: '', tags: [], visibility: 'public' } },
- { key: 'comment', method: 'POST', path: '/api/xhs/comment', label: 'Post Comment', category: 'Interaction', body: { feed_id: '', xsec_token: '', content: '' } },
- { key: 'comment_reply', method: 'POST', path: '/api/xhs/comment/reply', label: 'Reply Comment', category: 'Interaction', body: { feed_id: '', xsec_token: '', content: '', comment_id: '', user_id: '' } },
- { key: 'like', method: 'POST', path: '/api/xhs/like', label: 'Like/Unlike', category: 'Interaction', body: { feed_id: '', xsec_token: '', unlike: false } },
- { key: 'favorite', method: 'POST', path: '/api/xhs/favorite', label: 'Favorite/Unfavorite', category: 'Interaction', body: { feed_id: '', xsec_token: '', unfavorite: false } },
+ { key: 'login_status', method: 'GET', path: '/api/xhs/login/status', label: '检查登录状态', category: '登录' },
+ { key: 'login_qrcode', method: 'GET', path: '/api/xhs/login/qrcode', label: '获取登录二维码', category: '登录' },
+ { key: 'login_delete', method: 'DELETE', path: '/api/xhs/login/cookies', label: '删除 Cookie(登出)', category: '登录' },
+ { key: 'feeds', method: 'GET', path: '/api/xhs/feeds', label: '获取推荐列表', category: '内容' },
+ { key: 'search', method: 'POST', path: '/api/xhs/search', label: '搜索', category: '内容', body: { keyword: '', filters: { sort: 'general', type: 'all', time: 'all' } } },
+ { key: 'feed_detail', method: 'POST', path: '/api/xhs/feeds/detail', label: '笔记详情', category: '内容', body: { feed_id: '', xsec_token: '', load_all_comments: false } },
+ { key: 'user_profile', method: 'POST', path: '/api/xhs/user/profile', label: '用户主页', category: '内容', body: { user_id: '', xsec_token: '' } },
+ { key: 'publish_image', method: 'POST', path: '/api/xhs/publish/image', label: '发布图文笔记', category: '发布', body: { title: '', content: '', images: [], tags: [], is_original: false, visibility: 'public' } },
+ { key: 'publish_video', method: 'POST', path: '/api/xhs/publish/video', label: '发布视频笔记', category: '发布', body: { title: '', content: '', video: '', tags: [], visibility: 'public' } },
+ { key: 'comment', method: 'POST', path: '/api/xhs/comment', label: '发表评论', category: '互动', body: { feed_id: '', xsec_token: '', content: '' } },
+ { key: 'comment_reply', method: 'POST', path: '/api/xhs/comment/reply', label: '回复评论', category: '互动', body: { feed_id: '', xsec_token: '', content: '', comment_id: '', user_id: '' } },
+ { key: 'like', method: 'POST', path: '/api/xhs/like', label: '点赞/取消', category: '互动', body: { feed_id: '', xsec_token: '', unlike: false } },
+ { key: 'favorite', method: 'POST', path: '/api/xhs/favorite', label: '收藏/取消', category: '互动', body: { feed_id: '', xsec_token: '', unfavorite: false } },
] as const;
diff --git a/web/src/pages/ApiTesterPage.tsx b/web/src/pages/ApiTesterPage.tsx
index d361736..849e765 100644
--- a/web/src/pages/ApiTesterPage.tsx
+++ b/web/src/pages/ApiTesterPage.tsx
@@ -52,12 +52,12 @@ export function ApiTesterPage() {
return (
-
API Tester
+
API 测试
setMode(k as 'rest' | 'mcp')}
@@ -87,11 +87,11 @@ export function ApiTesterPage() {
{response !== null && (
-
Response
+
响应
{responseStatus && (
- {responseStatus}
+ {responseStatus === 'success' ? '成功' : '失败'}
)}
{duration !== null && (
@@ -108,11 +108,11 @@ export function ApiTesterPage() {
-
History
-
+ 历史记录
+
{history.length === 0 ? (
- No requests yet
+ 暂无请求
) : (
{history.map((entry) => (
@@ -136,7 +136,7 @@ export function ApiTesterPage() {
- {entry.status}
+ {entry.status === 'success' ? '成功' : '失败'}
{entry.time}
{entry.duration}ms
@@ -227,10 +227,10 @@ function RestPanel({
return (
<>
- REST Request
+ REST 请求
{endpoint.method !== 'GET' && (
-
+
)}
-
-
+
+
@@ -375,20 +375,20 @@ function McpPanel({
<>
{/* Connection */}
- MCP Connection
+ MCP 连接
- {connState}
+ {connState === 'connected' ? '已连接' : connState === 'connecting' ? '连接中' : '未连接'}
{connState === 'disconnected' && (
)}
{connState === 'connected' && (
<>
-
{tools.length} tools available
-
+
{tools.length} 个工具可用
+
>
)}
{connState === 'connecting' &&
}
@@ -398,10 +398,10 @@ function McpPanel({
{/* Tool Call */}
{connState === 'connected' && tools.length > 0 && (
- MCP Tool Call
+ MCP 工具调用