From 17a6ac60bef7a9a20278703faa9cc625460b315c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E5=8F=8A?= <522caiji@gmail.com> Date: Sat, 29 Aug 2026 16:36:49 +0800 Subject: [PATCH] fix: close Trae callback login and enlarge the paste field Callback success still saw the wizard as busy, so the delayed close was a no-op. Finish login with an unconditional close, and replace the single-line paste box with a fixed-height textarea. --- CHANGELOG.md | 2 ++ frontend/src/components/AddAccountModal.tsx | 15 ++++++++++----- frontend/src/components/account/AccountCard.tsx | 6 +++--- frontend/src/pages/AccountsPage.tsx | 6 +++++- .../{index-BLu1oRxf.js => index-C3mI_kb1.js} | 2 +- .../{index-DaLLqKNi.css => index-CkXdScGJ.css} | 2 +- internal/webui/static/index.html | 4 ++-- 7 files changed, 24 insertions(+), 13 deletions(-) rename internal/webui/static/assets/{index-BLu1oRxf.js => index-C3mI_kb1.js} (96%) rename internal/webui/static/assets/{index-DaLLqKNi.css => index-CkXdScGJ.css} (89%) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9ae0010..d24b757e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,11 +9,13 @@ Write each change in both `### English` and `### 中文` under `## Unreleased`. - Make the Overview traffic chart taller so the area/line plot is readable - Give the Overview traffic chart a full-width row so the series can use the console width +- Close the add-account dialog after a Trae callback succeeds, and give the pasted callback URL a fixed-height field ### 中文 - 加高概览流量图,面积折线更容易看清 - 概览流量图单独占一行,折线铺满控制台宽度 +- Trae 提交回调成功后关闭添加账号弹窗,并把粘贴框改成固定高度的多行输入 ## 0.2.18 - 2026-08-29 diff --git a/frontend/src/components/AddAccountModal.tsx b/frontend/src/components/AddAccountModal.tsx index 1138f2e6..0a596574 100644 --- a/frontend/src/components/AddAccountModal.tsx +++ b/frontend/src/components/AddAccountModal.tsx @@ -233,6 +233,11 @@ export function AddAccountModal({ isOpen, onClose, onAdded }: Props) { onClose() } + function finishAndClose() { + reset() + onClose() + } + function goLogin(next: TabKey) { if (busy || !typesReady) return setTab(next) @@ -277,7 +282,7 @@ export function AddAccountModal({ isOpen, onClose, onAdded }: Props) { setPhase('done') setMessage(t('wizardAccountReady')) onAdded() - window.setTimeout(close, 900) + window.setTimeout(finishAndClose, 900) } catch (error) { setPhase('idle') setMessage(error instanceof Error ? error.message : String(error)) @@ -298,7 +303,7 @@ export function AddAccountModal({ isOpen, onClose, onAdded }: Props) { setPhase('done') setMessage(t('wizardAccountReady')) onAdded() - window.setTimeout(close, 900) + window.setTimeout(finishAndClose, 900) } catch (error) { setPhase('polling') setMessage(error instanceof Error ? error.message : String(error)) @@ -317,7 +322,7 @@ export function AddAccountModal({ isOpen, onClose, onAdded }: Props) { setPhase('done') setMessage(t('patDone')) onAdded() - window.setTimeout(close, 700) + window.setTimeout(finishAndClose, 700) } catch (error) { setPhase('idle') setMessage(error instanceof Error ? error.message : String(error)) @@ -363,7 +368,7 @@ export function AddAccountModal({ isOpen, onClose, onAdded }: Props) { setPhase('done') setMessage(t('accountImported')) onAdded() - window.setTimeout(close, 700) + window.setTimeout(finishAndClose, 700) } catch (error) { setPhase('idle') setMessage(error instanceof Error ? error.message : String(error)) @@ -615,7 +620,7 @@ export function AddAccountModal({ isOpen, onClose, onAdded }: Props) {

{t('wizardCallbackLead')}