From 0d2dce6b739c4ae55067aa65dcc599163c053621 Mon Sep 17 00:00:00 2001 From: Sisyphus Date: Tue, 14 Jul 2026 11:56:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(admin):=20MCP=20=E5=AF=B9=E6=8E=A5=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E9=98=B2=E8=AF=AF=E5=85=B3=20=E2=80=94=20=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E9=81=AE=E7=BD=A9=E7=82=B9=E5=87=BB=20+=20=E5=8A=A0?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=8C=89=E9=92=AE=20+=20ESC=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 填表期间误点遮罩会丢失已填内容(apiKey/appSecret 等),改为只能用右上角 × 或 ESC 键关闭。 --- apps/web/src/components/AdminPage.tsx | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/AdminPage.tsx b/apps/web/src/components/AdminPage.tsx index dce0c3c..dc67cdf 100644 --- a/apps/web/src/components/AdminPage.tsx +++ b/apps/web/src/components/AdminPage.tsx @@ -1002,6 +1002,16 @@ function ConfigTab({ showToast }: { showToast: (m: string) => void }) { const [testingId, setTestingId] = useState(null) const [connectingId, setConnectingId] = useState(null) + // ESC 关闭对接弹窗(填表期间误点遮罩不再触发关闭,避免丢已填内容) + useEffect(() => { + if (!showIntegrationForm) return + const onKey = (e: KeyboardEvent) => { + if (e.key === 'Escape') { setShowIntegrationForm(false); setEditingIntegration(null) } + } + window.addEventListener('keydown', onKey) + return () => window.removeEventListener('keydown', onKey) + }, [showIntegrationForm]) + const DEVBOX_ADMIN_APPLY_URL = 'http://100.111.84.16:3000/openapi/app' const loadConfigs = useCallback(async () => { @@ -1328,10 +1338,19 @@ function ConfigTab({ showToast }: { showToast: (m: string) => void }) { )} {showIntegrationForm && ( -
{ setShowIntegrationForm(false); setEditingIntegration(null) }}> -
e.stopPropagation()}> +
+
-

{editingIntegration ? '编辑对接' : '新增对接'}

+
+

{editingIntegration ? '编辑对接' : '新增对接'}

+ +

APIKey 需先在 devbox B2B 运营后台 → 集成管理 → 应用列表