From c43b2f1d5d9fada88baaeb8494823dd81a496c8a Mon Sep 17 00:00:00 2001 From: Aska Date: Mon, 7 Sep 2026 18:28:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(channels):=20=E5=85=B6=E5=AE=83=E9=80=82?= =?UTF-8?q?=E9=85=8D=E5=99=A8=E4=B8=93=E5=B1=9E=E9=80=9A=E7=94=A8=E5=A3=B3?= =?UTF-8?q?(design/17=20=C2=A72)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 GenericAdapterPanel.tsx: 非KOOK平台专属壳(平台标签+能力徽标+平台专属功能区诚实占位+ 主动推送能力提示),读 record.accounts[].capabilities,未实装区标「待实现」不伪造数据 - 新增 channelCapabilities.ts: 能力标签元数据+辅助(friends/user_chats/channels/guilds/ message_test 与 Markdown/Image/Voice/Reaction/TypingHint/Proactive 中文映射;未知回退原值) - AdapterDetailPage.tsx: platform==='kook' 渲染 KookPanel, 否则渲染 GenericAdapterPanel - 前向兼容: 后端后续为其它平台补 capabilities 声明即点亮; 零新依赖; 移动端flex-wrap/overflow - 验收: npm run build(tsc+vite) 99模块全绿; 文件均<500行 --- .../modules/channels/AdapterDetailPage.tsx | 9 +- .../modules/channels/GenericAdapterPanel.tsx | 110 ++++++++++++++++++ .../modules/channels/channelCapabilities.ts | 50 ++++++++ 3 files changed, 167 insertions(+), 2 deletions(-) create mode 100644 frontend/web/src/admin/modules/channels/GenericAdapterPanel.tsx create mode 100644 frontend/web/src/admin/modules/channels/channelCapabilities.ts diff --git a/frontend/web/src/admin/modules/channels/AdapterDetailPage.tsx b/frontend/web/src/admin/modules/channels/AdapterDetailPage.tsx index 325c64c..571fb60 100644 --- a/frontend/web/src/admin/modules/channels/AdapterDetailPage.tsx +++ b/frontend/web/src/admin/modules/channels/AdapterDetailPage.tsx @@ -7,6 +7,7 @@ import { PLATFORM_LABEL } from "../channelFields"; import { ChannelLogList } from "./channelLogList"; import { ChannelIdentityTest } from "./channelIdentityTest"; import { KookPanel } from "./KookPanel"; +import { GenericAdapterPanel } from "./GenericAdapterPanel"; import { platformOf } from "./channelUtils"; import { useChannelActions } from "./useChannelActions"; @@ -35,7 +36,7 @@ export function AdapterDetailPage({ adapter, onBack }: { adapter: string; onBack subtitle={ platform === "kook" ? "该配置专属页 · 连接状态 + KOOK 平台能力(好友/频道/私信/测试)+ 实时日志" - : "该配置专属页 · 实时日志 + 功能操作(完整配置字段见 P2)" + : "该配置专属页 · 实时日志 + 功能操作 + 平台能力壳(专属功能后续接入)" } actions={