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 运营后台 → 集成管理 → 应用列表