diff --git a/packages/client/ui-settings-account/README.i18n.yaml b/packages/client/ui-settings-account/README.i18n.yaml index a6b62d6056..6ecf40df07 100644 --- a/packages/client/ui-settings-account/README.i18n.yaml +++ b/packages/client/ui-settings-account/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write packages/client/ui-settings-account/README.md -README.md: be38bcd68ab7affe4aa840499ef79009ba25b779 -README.zh.md: 9429d21cbd988a538c18320acbbfcb65dd6acfc0 +README.md: 5155c5cfa04f40e396ec90784a28ba73e009964c +README.zh.md: 51bba9a6d68f62acdfde26e56b8ee8d844aac6c9 diff --git a/packages/client/ui-settings-account/README.md b/packages/client/ui-settings-account/README.md index be38bcd68a..5155c5cfa0 100644 --- a/packages/client/ui-settings-account/README.md +++ b/packages/client/ui-settings-account/README.md @@ -28,7 +28,7 @@ The section registers through settings.section and uses the account Remote names Balances use Platform Web currency formatting: two decimal places and digit grouping, positive amounts truncated to cents, positive sub-cent amounts shown as <0.01, and negative amounts rounded with a minimum displayed magnitude of 0.01. Raw Host balance strings remain unchanged. -Desktop usage and top-up actions open an isolated native Platform view below a 48px return bar. Back destroys the view and preserves the Account settings page. Loading failures retain the return action and show a centered localized error with Retry. Retry reloads the same destination; renderer commands never receive the account token. +Desktop usage and top-up actions open an isolated native Platform view below a 48px return bar. On Windows Electron the return bar and the native view start below the 40px Desktop caption strip, so the Application and Edit menu text cannot cover the Back to DeepSeek Harness label. Back destroys the view and preserves the Account settings page. Loading failures retain the return action and show a centered localized error with Retry. Retry reloads the same destination; renderer commands never receive the account token. The account menu's Feedback entry opens the Feishu questionnaire in the system browser. It supplies the available build version, UI locale and physical screen resolution as prefill_* parameters, with hide_*=1 for every context field; the account UID, tokens and contact details are excluded. Configure contactFormUrl on the ui-settings-account plugin to select another HTTPS form. contactSource defaults to empty until the questionnaire supports a Harness source option; OS and device fields remain unfilled, matching the Web implementation. diff --git a/packages/client/ui-settings-account/README.zh.md b/packages/client/ui-settings-account/README.zh.md index 9429d21cbd..51bba9a6d6 100644 --- a/packages/client/ui-settings-account/README.zh.md +++ b/packages/client/ui-settings-account/README.zh.md @@ -28,7 +28,7 @@ Desktop 设置中的账号页面显示 DeepSeek 登录状态,并提供浏览 余额沿用 Platform Web 的金额格式:两位小数和千分位分组,正金额截断至分,小于一分的正金额显示为 <0.01,负金额按舍入规则处理且显示绝对值至少为 0.01。Host 返回的原始余额字符串保持不变。 -Desktop 的用量和充值操作在 48px 返回栏下方打开隔离的原生 Platform 视图。返回操作销毁视图并保留 Account 设置页。加载失败时保留返回操作,居中显示本地化错误提示和“重试”按钮。重试重新加载同一目标页面;渲染进程命令不接收账号 token。 +Desktop 的用量和充值操作在 48px 返回栏下方打开隔离的原生 Platform 视图。在 Windows Electron 中,返回栏与原生视图都从 40px 的 Desktop 顶栏下方开始,Application 和 Edit 菜单文字不会盖住“返回 DeepSeek Harness”。返回操作销毁视图并保留 Account 设置页。加载失败时保留返回操作,居中显示本地化错误提示和“重试”按钮。重试重新加载同一目标页面;渲染进程命令不接收账号 token。 账号菜单的“意见反馈”入口在系统浏览器中打开飞书问卷。链接通过 prefill_* 参数填写已有的构建版本、界面语言和屏幕物理分辨率,并为所有上下文字段设置 hide_*=1;不传账号 UID、token 或联系方式。可在 ui-settings-account 插件配置 contactFormUrl,切换到另一个 HTTPS 问卷。问卷支持 Harness 来源选项前,contactSource 默认为空;OS 和设备字段沿用 Web 实现,保持未填写。 diff --git a/packages/client/ui-settings-account/src/client/PlatformOverlay.module.css b/packages/client/ui-settings-account/src/client/PlatformOverlay.module.css index 62084cf12f..39f0da5deb 100644 --- a/packages/client/ui-settings-account/src/client/PlatformOverlay.module.css +++ b/packages/client/ui-settings-account/src/client/PlatformOverlay.module.css @@ -7,6 +7,12 @@ background: var(--dsw-alias-bg-base); } +/* Windows Electron: the Desktop caption menu owns the window's top strip, so + the return bar and the native Platform view start below it. */ +:global([data-windows-titlebar]) .overlay { + padding-top: var(--dsh-windows-titlebar-height); +} + .header { box-sizing: border-box; height: 48px; diff --git a/packages/client/ui-settings-account/tests/platform-overlay-caption.client.spec.ts b/packages/client/ui-settings-account/tests/platform-overlay-caption.client.spec.ts new file mode 100644 index 0000000000..46ec11f9ea --- /dev/null +++ b/packages/client/ui-settings-account/tests/platform-overlay-caption.client.spec.ts @@ -0,0 +1,26 @@ +/** + * The Windows caption clearance as CSS text. jsdom has no layout, so the + * Account specs pin the return bar's DOM but cannot show where it lands; this + * reads the declaration that keeps the Desktop-owned Application and Edit menu + * from covering the return bar. + */ +import { readFileSync } from 'node:fs' +import { fileURLToPath } from 'node:url' +import { expect, it } from 'vitest' + +const css = readFileSync(fileURLToPath(new URL('../src/client/PlatformOverlay.module.css', import.meta.url)), 'utf8') + +function declarations(selector: string): string[] { + const rule = new RegExp(`${selector.replace(/[.[\]():*+^$\\]/g, '\\$&')}\\s*\\{([^{}]*)\\}`).exec(css.replace(/\/\*[\s\S]*?\*\//g, ' ')) + if (rule === null) throw new Error(`no \`${selector}\` rule`) + return (rule[1] ?? '').split(';').map(part => part.trim()).filter(Boolean) +} + +it('starts the return bar below the Desktop caption strip on Windows', () => { + // The strip and its clearance token both come from the Desktop preload's + // caption marker; without the offset the 48px return bar renders inside the + // strip that the fixed caption menu host also occupies. + expect(declarations(':global([data-windows-titlebar]) .overlay')).toEqual(expect.arrayContaining([ + 'padding-top: var(--dsh-windows-titlebar-height)', + ])) +})