From 58e354ba1d7a50a7807ce464b77056d3ebb2e0fb Mon Sep 17 00:00:00 2001 From: baiqing Date: Mon, 18 May 2026 12:50:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(settings-ui):=20=E6=9D=83=E9=99=90=E9=A1=B5?= =?UTF-8?q?=E5=BE=BD=E7=AB=A0=E4=B8=8D=E6=8D=A2=E8=A1=8C=20+=20=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=20ASR=20=E5=8C=BA=E5=9D=97=20Win=20=E7=81=B0=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 权限页 (Settings → 快捷键 → 权限): - Pill 组件加 whiteSpace:nowrap + flexShrink:0 → "已安装"徽章在 Win 窄宽下不再被挤成 3 行(每个汉字一行)。 - 行内 message span 加 whiteSpace:nowrap + overflow:hidden + textOverflow:ellipsis + minWidth:0 → 长文本("Windows 低层键盘 hook 已安装")超宽时省略号收尾,徽章保持完整。 - zh-CN 描述大段精简:descAcc / descNoAcc / micDesc / accDesc / hotkeyDesc / networkDesc / windowsImeDesc / windowsIme.* 都改短, 减少 Win 上拥挤感(用户反馈 zh 文案过长)。 高级页 (Settings → 高级 → 本地 ASR): - Windows 上把"本地 ASR 模型(实验性)"标题区 + 警告小字 + Qwen3 行 整组 opacity:0.45 灰显 —— Qwen3 在 Win 是 stub 不支持,那条"实验性" 主线在 Win 没意义;用户视觉关注点应落到下方独立的 Foundry 行(Foundry 保持正常颜色)。Toggle 的 disabled 行为已经在原 onToggle 条件里,本次 纯加视觉灰显。 --- openless-all/app/src/i18n/zh-CN.ts | 20 ++++----- openless-all/app/src/pages/_atoms.tsx | 2 + .../src/pages/settings/AdvancedSection.tsx | 41 +++++++++++-------- .../src/pages/settings/PermissionsSection.tsx | 12 +++++- 4 files changed, 47 insertions(+), 28 deletions(-) diff --git a/openless-all/app/src/i18n/zh-CN.ts b/openless-all/app/src/i18n/zh-CN.ts index dd5c0139..089cbbbe 100644 --- a/openless-all/app/src/i18n/zh-CN.ts +++ b/openless-all/app/src/i18n/zh-CN.ts @@ -668,17 +668,17 @@ export const zhCN = { }, permissions: { title: '权限', - descAcc: 'OpenLess 需要以下系统权限才能正常工作。授权后通常需要完全退出 App 重启一次才生效。', - descNoAcc: 'OpenLess 需要麦克风可用,并依赖全局快捷键监听状态判断 native hook 是否正常工作。', + descAcc: 'OpenLess 需要以下系统权限。授权后通常要完全退出 App 重启一次才生效。', + descNoAcc: '麦克风必需;全局快捷键状态用来检测 native hook 是否运行。', micLabel: '麦克风', micDesc: '用于捕获你的语音输入。', accLabel: '辅助功能', - accDesc: '用于监听全局快捷键并将识别结果写入光标位置。', + accDesc: '监听全局快捷键并把识别结果写入光标。', hotkeyLabel: '全局快捷键', - hotkeyDescWithAdapter: '当前适配器:{{adapter}}。用于判断快捷键监听是否已经安装。', - hotkeyDescPlain: '用于判断快捷键监听是否已经安装。', + hotkeyDescWithAdapter: '适配器:{{adapter}}。', + hotkeyDescPlain: '判断快捷键监听是否已安装。', networkLabel: '网络', - networkDesc: '云端 ASR / LLM 调用所必需。本地模式可关闭。', + networkDesc: '云端 ASR / LLM 必需,本地模式可关。', networkOk: '可用', checking: '检查中…', granted: '已授权', @@ -691,13 +691,13 @@ export const zhCN = { hotkeyStarting: '安装中…', hotkeyFailed: '监听失败', windowsImeLabel: 'Windows 输入法后端', - windowsImeDesc: '用于在语音会话期间临时切换到 OpenLess TSF 输入法,避免剪贴板插入限制。', + windowsImeDesc: '语音输入时临时切到 OpenLess TSF,绕过剪贴板限制。', windowsImeInstalled: '已安装', windowsImeUnavailable: '不可用', windowsIme: { - installed: '已安装。语音输入时会临时切换到 OpenLess 输入法。', - notInstalled: '未安装。OpenLess 正在使用剪贴板 / WM_PASTE 兜底。', - registrationBroken: '注册已损坏。请重新安装 OpenLess 输入法。', + installed: '已安装,按需切到 OpenLess 输入法。', + notInstalled: '未安装,走剪贴板 / WM_PASTE 兜底。', + registrationBroken: '注册损坏,请重装 OpenLess 输入法。', notWindows: '仅 Windows 可用。', }, }, diff --git a/openless-all/app/src/pages/_atoms.tsx b/openless-all/app/src/pages/_atoms.tsx index 7f2de1fc..9f1bc75d 100644 --- a/openless-all/app/src/pages/_atoms.tsx +++ b/openless-all/app/src/pages/_atoms.tsx @@ -90,6 +90,8 @@ export function Pill({ children, tone = 'default', size = 'md', style }: PillPro color: t.color, border: t.bd === 'transparent' ? '0.5px solid transparent' : `0.5px solid ${t.bd}`, fontWeight: 500, + whiteSpace: 'nowrap', + flexShrink: 0, ...sz, ...style, }} diff --git a/openless-all/app/src/pages/settings/AdvancedSection.tsx b/openless-all/app/src/pages/settings/AdvancedSection.tsx index 1eda22d7..096aeb27 100644 --- a/openless-all/app/src/pages/settings/AdvancedSection.tsx +++ b/openless-all/app/src/pages/settings/AdvancedSection.tsx @@ -156,9 +156,13 @@ export function AdvancedSection() { - {/* 标题 + 右上角 inline 警告小字(替换原琥珀大警告条)。 */} + {/* 标题 + 右上角 inline 警告小字(替换原琥珀大警告条)。 + Windows:标题区整体灰显 —— "本地 ASR 模型(实验性)" 在 Win 上几乎只有 + Qwen3 占位、本平台暂不支持;Foundry 走的是另一条独立路径,不属于"实验性" + 框架。灰显视觉让用户知道这条"实验性"主线在 Win 不可用,关注点转到下方 + Foundry 行。 */}
-
+
{t('settings.advanced.localAsrTitle')}
{t('settings.advanced.localAsrDesc')} @@ -173,6 +177,7 @@ export function AdvancedSection() { flexShrink: 0, maxWidth: '52%', paddingTop: 2, + opacity: isWin ? 0.45 : 1, }}> ⚠️ {t('settings.advanced.localAsrWarningShort')}
@@ -188,20 +193,24 @@ export function AdvancedSection() { + 不可点 + desc=notSupportedHere,跟"本平台不可用"视觉一致。跨平台 异常(Windows profile 同步到 local-qwen3)时 active 状态靠下方独立 "禁用本地 ASR" 行兜底,避免 Toggle ON + desc 说不支持的自相矛盾感 - (pr_agent #403 'Stale Windows state' 修法)。 */} - -
- { - if (next) requestEnable('local-qwen3'); - else void performSwitch('volcengine'); - } : undefined} - /> -
-
+ (pr_agent #403 'Stale Windows state' 修法)。 + Windows 整行灰显,跟"本地 ASR 实验性"标题区视觉对齐 —— 用户一眼看出 + 这条线在 Win 上不能用,关注点落到下方 Foundry 行。 */} +
+ +
+ { + if (next) requestEnable('local-qwen3'); + else void performSwitch('volcengine'); + } : undefined} + /> +
+
+
{/* Foundry 行 —— 仅 Windows 露出(macOS 不展示 Windows 端模型内容)。 */} {isWin && ( diff --git a/openless-all/app/src/pages/settings/PermissionsSection.tsx b/openless-all/app/src/pages/settings/PermissionsSection.tsx index d9642372..9be20a16 100644 --- a/openless-all/app/src/pages/settings/PermissionsSection.tsx +++ b/openless-all/app/src/pages/settings/PermissionsSection.tsx @@ -126,7 +126,11 @@ export function PermissionsSection() { >
{hotkey?.message && ( - + {hotkey.message} )} @@ -140,7 +144,11 @@ export function PermissionsSection() { >
{windowsIme && ( - + {t(`settings.permissions.windowsIme.${windowsIme.state}`)} )}