From 6a26a4dba8e07f3e7c85b90e3481f4266374ab46 Mon Sep 17 00:00:00 2001 From: sophie Date: Fri, 17 Jul 2026 13:19:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(admin):=20=E4=BC=98=E5=8C=96=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../features/auth/composables/useLoginAuth.ts | 12 ++++++++++ .../features/chat/components/ChatSidebar.vue | 24 +++++++++---------- frontend/src/locales/en/auth.json | 1 + frontend/src/locales/th/auth.json | 1 + frontend/src/locales/zh-CN/auth.json | 1 + frontend/src/locales/zh-TW/auth.json | 1 + 6 files changed, 28 insertions(+), 12 deletions(-) diff --git a/frontend/src/features/auth/composables/useLoginAuth.ts b/frontend/src/features/auth/composables/useLoginAuth.ts index 8e533de5..4dd3009a 100644 --- a/frontend/src/features/auth/composables/useLoginAuth.ts +++ b/frontend/src/features/auth/composables/useLoginAuth.ts @@ -239,8 +239,20 @@ export function useLoginAuth(deps: LoginDeps, options: LoginAuthOptions) { } }; + /** + * 发起企业微信登录(OAuth 跳转)。 + * 核心逻辑:功能未就绪时提示用户;就绪后按 Casdoor/直连企微获取授权 URL 并跳转。 + * @returns Promise + */ const handleWecomLogin = async () => { if (!config.auth?.wecom?.enabled) return; + // TODO: 企微登录开发完成后改为 true + const wecomLoginReady = false; + if (!wecomLoginReady) { + msg.info(t('login.wecomComingSoon')); + return; + } + const wecomCfg = config.auth.wecom as { loginViaCasdoor?: boolean; callbackPath?: string; authorizeApi?: string }; const viaCasdoor = Boolean(wecomCfg?.loginViaCasdoor); try { diff --git a/frontend/src/features/chat/components/ChatSidebar.vue b/frontend/src/features/chat/components/ChatSidebar.vue index 05f79650..ec1cbe7b 100644 --- a/frontend/src/features/chat/components/ChatSidebar.vue +++ b/frontend/src/features/chat/components/ChatSidebar.vue @@ -2,7 +2,8 @@ * features/chat/components/ChatSidebar.vue * 用途:桌面端聊天侧栏,承载 Agent 信息、会话历史、Agent 切换面板与底部用户菜单。 * 依赖:lucide-vue-next、LocaleToggleButton、AgentCategoryList、chat.types。 - * 逻辑:由聊天页面传入当前 Agent、历史记录与用户可用 Agent;通过事件把新会话、切换 Agent、反馈等操作回传给页面。 + * 逻辑:由聊天页面传入当前 Agent、历史记录与用户可用 Agent;通过事件把新会话、切换 Agent、反馈、进入管理控制台等操作回传给页面。 + * 管理员通过底部右侧工具图标进入管理控制台;用户下拉菜单仅保留退出登录。 */