From e4ceb626ab7aa462010393c80039da52bb266906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A7=E9=A9=8A?= Date: Sun, 6 Sep 2026 13:51:28 +0800 Subject: [PATCH] add voice --- apps/web/src/App.tsx | 10 +++++----- apps/web/src/locales/en.ts | 6 +++--- apps/web/src/locales/zh-TW.ts | 4 ++-- apps/web/src/refinements.css | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index bb0f860..fda053b 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -329,7 +329,6 @@ export function App(){
event.stopPropagation()}> {accountOpen&&
- @@ -854,11 +853,12 @@ function FeedbackDialog({close}:{close:()=>void}){ function LoginScreen({authenticated}:{authenticated:()=>void}){ useLocale(); const[token,setToken]=useState("");const[busy,setBusy]=useState(false);const[error,setError]=useState(""); - return
{e.preventDefault();if(!token)return;setBusy(true);setError("");try{await api("/api/session",{method:"POST",body:JSON.stringify({token})});authenticated()}catch(err){setError(err instanceof Error?localizeError(err.message):t("loginFailed"))}finally{setBusy(false)}}}> -
- - + return
+
+ +
+ {e.preventDefault();if(!token)return;setBusy(true);setError("");try{await api("/api/session",{method:"POST",body:JSON.stringify({token})});authenticated()}catch(err){setError(err instanceof Error?localizeError(err.message):t("loginFailed"))}finally{setBusy(false)}}}>

{t("loginTitle")}

{t("loginDescription")}

{error&&
{error}
}
; } diff --git a/apps/web/src/locales/en.ts b/apps/web/src/locales/en.ts index c2f7292..de34e25 100644 --- a/apps/web/src/locales/en.ts +++ b/apps/web/src/locales/en.ts @@ -415,12 +415,12 @@ export const en: { [K in keyof typeof zhTW]: string } = { schedHours: "hours", schedDays: "days", computerLoginHint: "Sign in inside this bot’s own browser. The session stays on its computer — don’t type passwords in chat.", - language: "Language", - languageZh: "中文", + language: "Interface language", + languageZh: "繁體中文", languageEn: "English", languageHint: "Interface language. Chat history and agent replies are not translated.", helpLanguageTitle: "Language", - helpLanguage: "Switch Chinese and English from the workspace menu or Settings.", + helpLanguage: "Switch between Traditional Chinese and English in Settings, accessible from the workspace menu.", clipboardSynced: "Clipboard synced", clipboardSyncBlocked: "The browser blocked sync. Use the copy button.", clipboardPasted: "Pasted", diff --git a/apps/web/src/locales/zh-TW.ts b/apps/web/src/locales/zh-TW.ts index 6d28196..a6060f7 100644 --- a/apps/web/src/locales/zh-TW.ts +++ b/apps/web/src/locales/zh-TW.ts @@ -126,9 +126,9 @@ export const zhTW = { schedEveryWeek: "每週一", schedEveryMonth: "每月", schedInterval: "間隔", schedAdvanced: "進階 cron", schedMinutes: "分鐘", schedHours: "小時", schedDays: "天", computerLoginHint: "在這台機器人自己的瀏覽器登入。Session 留在它的電腦,不要把密碼打在聊天裡。", - language: "語言", languageZh: "中文", languageEn: "English", + language: "介面語言", languageZh: "繁體中文", languageEn: "English", languageHint: "介面語言。對話內容與 Agent 回覆不會自動翻譯。", - helpLanguageTitle: "語言", helpLanguage: "工作區選單或設定裡可切換中文與英文。", + helpLanguageTitle: "語言", helpLanguage: "在左下角工作區選單的設定裡,可切換繁體中文與英文。", clipboardSynced: "剪貼簿已同步", clipboardSyncBlocked: "瀏覽器未允許同步,請按複製按鈕", clipboardPasted: "已貼上文字", clipboardPasteFailed: "貼上失敗,請確認已接管電腦後重試", clipboardCopiedSelection: "已複製選取文字", clipboardCopyFailed: "複製未同步;請按複製按鈕,或在遠端使用 Ctrl+Shift+C", diff --git a/apps/web/src/refinements.css b/apps/web/src/refinements.css index 1d83a73..7b44673 100644 --- a/apps/web/src/refinements.css +++ b/apps/web/src/refinements.css @@ -587,7 +587,7 @@ .memory-clear-confirm{display:flex;align-items:center;gap:8px;margin-right:auto;color:var(--muted);font-size:13px} -.login-screen{display:grid;min-height:100%;place-items:center;padding:20px;background:radial-gradient(circle at 50% 20%,#18201e 0,#080809 55%)} +.login-screen{position:relative;display:grid;min-height:100%;place-items:center;padding:88px 20px;background:radial-gradient(circle at 50% 20%,#18201e 0,#080809 55%)} .login-dialog{display:grid;justify-items:stretch} @@ -599,7 +599,7 @@ .login-error{color:var(--danger-soft);font-size:13px} -.login-lang{display:flex;justify-content:center;gap:6px;margin-bottom:4px} +.login-lang{position:absolute;top:24px;right:24px;display:flex;align-items:center;gap:6px} .login-lang button{height:32px;padding:0 12px;border:1px solid var(--border);border-radius:9px;background:transparent;color:var(--muted);cursor:pointer}