From f438438e6f8ee5f9ad90595df056d3586958384b Mon Sep 17 00:00:00 2001
From: jubaoliang
-> 二维码有效期至 **2026-08-03**,过期后请联系管理员更新。
+> 二维码有效期至 **2026-08-08**,过期后请联系管理员更新。
### 📄 许可证
diff --git a/dashboard/src/api/modules/connectors.ts b/dashboard/src/api/modules/connectors.ts
index 18fb30a4..b03acd1e 100644
--- a/dashboard/src/api/modules/connectors.ts
+++ b/dashboard/src/api/modules/connectors.ts
@@ -226,10 +226,13 @@ export const connectorsApi = {
cli_config_key?: string;
domains?: string[];
}) =>
- requestLoading…
"; + 'Loading…
'; } catch { // Cross-origin / closed — ignore. } @@ -458,8 +458,7 @@ function ConnectorConfigDrawer({ ); } else { message.error( - result.error ?? - t("connectors.cliInstallFailed", "主机 CLI 安装失败"), + result.error ?? t("connectors.cliInstallFailed", "主机 CLI 安装失败"), ); } } catch (e) { @@ -515,7 +514,8 @@ function ConnectorConfigDrawer({ started = await connectorsApi.feishuUserAuthStart({ app_id, app_secret, - cli_config_key: String(values.cli_config_key ?? "").trim() || undefined, + cli_config_key: + String(values.cli_config_key ?? "").trim() || undefined, }); } form.setFieldsValue({ cli_config_key: started.cli_config_key }); @@ -532,11 +532,7 @@ function ConnectorConfigDrawer({ popup?.close(); console.error(e); message.error( - apiErrorMessage( - e, - t("connectors.feishuUserAuthFailed", "授权失败"), - t, - ), + apiErrorMessage(e, t("connectors.feishuUserAuthFailed", "授权失败"), t), ); } finally { setFeishuUserAuthBusy(false); @@ -586,12 +582,11 @@ function ConnectorConfigDrawer({ setFeishuUserReady(true); setFeishuAuthNeedsReauth(false); setFeishuUserAuth(null); - const persisted = - Boolean(instance?.instance_id) && hasStoredCredentials; + const persisted = Boolean(instance?.instance_id) && hasStoredCredentials; if (done.warning || done.search_docs_scope === false) { message.warning( - done.warning - || t( + done.warning || + t( "connectors.feishuUserAuthWarning", "已登录,但文档搜索权限可能未开通,请检查开放平台权限后重新授权", ), @@ -600,20 +595,13 @@ function ConnectorConfigDrawer({ message.success( persisted ? t("connectors.feishuUserAuthSuccessSaved", "授权完成") - : t( - "connectors.feishuUserAuthSuccess", - "授权完成,请保存连接器", - ), + : t("connectors.feishuUserAuthSuccess", "授权完成,请保存连接器"), ); } } catch (e) { console.error(e); message.error( - apiErrorMessage( - e, - t("connectors.feishuUserAuthFailed", "授权失败"), - t, - ), + apiErrorMessage(e, t("connectors.feishuUserAuthFailed", "授权失败"), t), ); } finally { setFeishuUserAuthBusy(false); @@ -732,11 +720,13 @@ function ConnectorConfigDrawer({ const feishuAppIdChanged = entry.kind === "feishu-cli" && Boolean(preview.app_id) && - String(values.app_id ?? "").trim() !== String(preview.app_id ?? "").trim(); + String(values.app_id ?? "").trim() !== + String(preview.app_id ?? "").trim(); const wecomBotIdChanged = entry.kind === "wecom-cli" && Boolean(preview.bot_id) && - String(values.bot_id ?? "").trim() !== String(preview.bot_id ?? "").trim(); + String(values.bot_id ?? "").trim() !== + String(preview.bot_id ?? "").trim(); const identityChanged = feishuAppIdChanged || wecomBotIdChanged; if (identityChanged && !freshSecret) { message.warning( @@ -941,7 +931,11 @@ function ConnectorConfigDrawer({ )} {!isAdmin && cliInfo?.installed && ( - } disabled> + } + disabled + > {t("connectors.cliReady", "CLI 已就绪")} )} @@ -1104,7 +1098,10 @@ function ConnectorConfigDrawer({ layout="vertical" onValuesChange={(_, all) => { if (!restoringDraftRef.current && draftScope) { - saveFormDraft(draftScope, all as unknown as Record