dsh-server-connector 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/lib/client.js +15 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## 0.2.3 — 2026-11-06
|
|
4
|
+
|
|
5
|
+
### 修复
|
|
6
|
+
|
|
7
|
+
- **深色主题下启用状态的开关显示为一条纯白条**。0.2.2 把滑块写死成白色,而深色主题下
|
|
8
|
+
轨道解析为 `#f9fafb`(近白)——白滑块落在白轨道上,整个控件看起来没有滑块。
|
|
9
|
+
|
|
10
|
+
DSH 原生开关的做法是**轨道与滑块成对反转**:轨道用 `--dsw-alias-label-primary`,
|
|
11
|
+
滑块用 `--dsw-alias-label-primary-inverted`。浅色下是深轨道+白滑块,深色下是白轨道+深滑块,
|
|
12
|
+
两种主题都保证对比度。现已改为这一对 token,并在两种主题下实测确认。
|
|
13
|
+
|
|
14
|
+
- 关闭态轨道改用 `--dsw-alias-border-l4`(深色下自动变为半透明白),滑块用
|
|
15
|
+
`--dsw-alias-label-tertiary`,不再依赖写死的颜色。
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
3
19
|
## 0.2.2 — 2026-11-06
|
|
4
20
|
|
|
5
21
|
### 修复
|
package/lib/client.js
CHANGED
|
@@ -278,18 +278,26 @@ browserGlobal.__ModuleLoader__.load({
|
|
|
278
278
|
'.srv-row{display:flex;align-items:flex-start;gap:4px 12px;flex-wrap:wrap;padding:10px 8px;border-radius:12px;min-width:0}',
|
|
279
279
|
'.srv-row:hover{background:var(--dsw-alias-interactive-bg-hover)}',
|
|
280
280
|
'.srv-row-off{opacity:.55}',
|
|
281
|
-
//
|
|
282
|
-
//
|
|
283
|
-
//
|
|
284
|
-
//
|
|
281
|
+
// Mirrors the Host's own switch (ui-primitives), which inverts with the
|
|
282
|
+
// theme rather than staying monochrome:
|
|
283
|
+
//
|
|
284
|
+
// track thumb
|
|
285
|
+
// light on --dsw-alias-label-primary (#0f1115) --dsw-alias-label-primary-inverted (#fff)
|
|
286
|
+
// dark on --dsw-alias-label-primary (#f9fafb) --dsw-alias-label-primary-inverted (#353638)
|
|
287
|
+
//
|
|
288
|
+
// The thumb MUST use the inverted pair, not a fixed white: a hard-coded
|
|
289
|
+
// `#fff` disappears against the near-white track in dark mode, which reads
|
|
290
|
+
// as one blank bar. `label-primary` / `label-primary-inverted` are the only
|
|
291
|
+
// pair guaranteed to contrast in both themes.
|
|
285
292
|
'.srv-switch{position:relative;flex:0 0 auto;width:36px;height:20px;padding:0;border:none;border-radius:999px;',
|
|
286
|
-
'background:rgba(0,0,0,.12);cursor:pointer;transition:background .15s ease}',
|
|
293
|
+
'background:var(--dsw-alias-border-l4,rgba(0,0,0,.12));cursor:pointer;transition:background .15s ease}',
|
|
287
294
|
'.srv-switch[data-on="true"]{background:var(--dsw-alias-label-primary,#0f1115)}',
|
|
288
295
|
'.srv-switch:disabled{cursor:not-allowed;opacity:.5}',
|
|
289
296
|
'.srv-switch:focus-visible{outline:2px solid var(--dsw-alias-label-primary,#0f1115);outline-offset:2px}',
|
|
290
297
|
'.srv-switch-knob{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;',
|
|
291
|
-
'background
|
|
292
|
-
'.srv-switch[data-on="true"] .srv-switch-knob{transform:translateX(16px)
|
|
298
|
+
'background:var(--dsw-alias-label-tertiary,#adb2b8);transition:transform .15s ease,background .15s ease}',
|
|
299
|
+
'.srv-switch[data-on="true"] .srv-switch-knob{transform:translateX(16px);',
|
|
300
|
+
'background:var(--dsw-alias-label-primary-inverted,#fff)}',
|
|
293
301
|
'.srv-row-main{flex:1 1 240px;min-width:0;display:flex;flex-direction:column;gap:2px}',
|
|
294
302
|
'.srv-row-title{display:flex;align-items:center;gap:8px;min-width:0;font-size:14px;line-height:20px;font-weight:500}',
|
|
295
303
|
'.srv-open{padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer;',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-server-connector",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "DSH plugin: SSH execution for servers configured on this machine, with a built-in high-risk command policy (block / confirm / allow).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|