DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
fix(dsh-tauri-ui): 中栏恢复别名底色与左上圆角,右栏不再整块露侧栏底色
hairyf0305504fb2dd
diff --git a/packages/dsh-tauri-ui/src/client/styles/global.cssr.test.ts b/packages/dsh-tauri-ui/src/client/styles/global.cssr.test.tsindex 4dce4cc2..c9481a6a 100644--- a/packages/dsh-tauri-ui/src/client/styles/global.cssr.test.ts+++ b/packages/dsh-tauri-ui/src/client/styles/global.cssr.test.ts@@ -25,3 +25,26 @@ describe('sidebar rail logo', () => {expect(show, '恢复规则必须排在隐藏规则之后').toBeGreaterThan(hide)})})++/**+ * 中栏表面契约。+ *+ * 官方桌面端(Windows 标题栏形态)把中栏画成「别名底色 + 左上 16px 圆角」,触发条件是+ * 宿主在文档根打的 `data-windows-titlebar`(`dsh-client-ui-layout` 的+ * `[data-windows-titlebar] .centerCol`)。桌面壳的标题栏在 iframe 之外,该属性在本仓+ * 永不存在——中栏一旦保持透明,整块右栏(插件页一并)就会露出布局帧的侧栏底色,+ * 圆角也无从渲染。这里按生成 CSS 断言等价声明存在,且不再依赖无人写入的标记选择器。+ */+describe('center column surface', () => {+ const css = globalStyle.render()++ it('中栏按类名后缀以别名底色绘制并带左上 16px 圆角', () => {+ expect(css).toMatch(+ /\[class\$="centerCol"\]\s*\{[^}]*background:\s*var\(--dsw-alias-bg-base\);[^}]*border-radius:\s*16px 0 0 0;[^}]*corner-shape:\s*round;[^}]*\}/,+ )+ })++ it('中栏规则不再依赖运行时无人写入的 data-dsh-center-col 标记', () => {+ expect(css).not.toContain('data-dsh-center-col')+ })+})diff --git a/packages/dsh-tauri-ui/src/client/styles/global.cssr.ts b/packages/dsh-tauri-ui/src/client/styles/global.cssr.tsindex 42cded71..0ac841de 100644--- a/packages/dsh-tauri-ui/src/client/styles/global.cssr.ts+++ b/packages/dsh-tauri-ui/src/client/styles/global.cssr.ts@@ -99,7 +99,12 @@ export default c([c('[class$="sidebarCol"]', {borderRight: 'none !important',}),- c('[data-dsh-center-col]', {+ // 官方的中栏是「别名底色 + 左上 16px 圆角」,声明挂在文档根属性 `[data-windows-titlebar]`+ // 上(dsh-client-ui-layout),该属性由官方桌面宿主写入;本仓壳层不写,中栏透明就会整块+ // 露出布局帧的侧栏底色(插件页一并变灰)。故按类名后缀补等价声明。+ // 不加 `!important`:官方 `[data-platform=darwin] .centerCol` 等更高特异性的声明须继续压过本条。+ c('[class$="centerCol"]', {+ background: 'var(--dsw-alias-bg-base)',borderRadius: '16px 0 0 0',cornerShape: 'round',}),