dsh-plugin-tether 0.1.22 → 0.1.23
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 +13 -0
- package/index.js +18 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
本文件记录面向用户的变化。每个版本的这一节会原样作为该版本 Release 的说明。
|
|
4
4
|
|
|
5
|
+
## 0.1.23
|
|
6
|
+
|
|
7
|
+
### 修复
|
|
8
|
+
|
|
9
|
+
- **登录账号后,侧栏里「连接手机」四个字竖成一列、后面顶着一个灰圆**([#17](https://github.com/zexadev/dsh-tether/issues/17))。0.1.22 起这个按钮改抄侧栏底部那一行的样式,抄文字样式时取的是那一行里的第一个文字块:没登录时它正好是文字,登录之后那一行最前面多了头像,抄来的就成了头像的样式 —— 一个 24 像素宽的圆形色块,四个汉字塞进去只能一字一行。现在改抄那一行里最末尾的纯文字块,并且那一行每次换形态(登录、退出、侧栏收放)都重新挑一次。dsh 0.2.1-rc 的浏览器界面登录后同样会这样,一并修了。按钮本身一直能点,配对不受影响。
|
|
10
|
+
- **侧栏收成竖条时,「连接手机」的文字还挤在图标旁边**。dsh 自己那一行在竖条态只画图标、不画文字,我们没跟着收。现在参照的那一行不显示文字时,按钮也只留图标;按钮的无障碍名称一直都在,读屏不受影响。
|
|
11
|
+
|
|
12
|
+
### English
|
|
13
|
+
|
|
14
|
+
Signed in, the Connect a phone label in the sidebar stacked one character per line with a grey circle behind it ([#17](https://github.com/zexadev/dsh-tether/issues/17)). Since 0.1.22 the button copies the styling of the row at the bottom of the sidebar, and it picked the first text block in that row to copy from. Signed out that block is the label; signed in the row gains an avatar in front, so the button copied the avatar's styling instead — a round 24-pixel swatch, which a four-character label can only enter one character at a time. The button now copies the last plain-text block in that row, and picks it again every time the row changes shape (signing in or out, collapsing or expanding the sidebar). The browser interface of dsh 0.2.1-rc did the same thing once signed in, and is fixed as well. The button itself always worked, and pairing was never affected.
|
|
15
|
+
|
|
16
|
+
With the sidebar collapsed to a strip, the Connect a phone label was still crammed next to the icon. The dsh row above it draws only its icon in that state, and the button did not follow. The button now drops its label whenever the row it copies has none; its accessible name stays in place, so screen readers are unaffected.
|
|
17
|
+
|
|
5
18
|
## 0.1.22
|
|
6
19
|
|
|
7
20
|
### 修复
|
package/index.js
CHANGED
|
@@ -772,6 +772,20 @@ const tetherScript = `
|
|
|
772
772
|
return width >= 12 && width <= 24 ? width : 16
|
|
773
773
|
}
|
|
774
774
|
|
|
775
|
+
// 参照行里装文字的那个 span。登录后账号行是「头像 span + 文字 span」两个,头像那个
|
|
776
|
+
// 24×24、圆、带 skeleton 底色,抄到它中文就竖成一字一行;头像恒在文字前面,所以取
|
|
777
|
+
// 末位。判据是「里面没有元素、不带 data-avatar-status」,不认类名 —— 类名带内容哈希。
|
|
778
|
+
// 侧栏收起时那一行只有图标、没有文字 span,返回 null。
|
|
779
|
+
function referenceLabelOf(trigger) {
|
|
780
|
+
var spans = trigger.querySelectorAll('span')
|
|
781
|
+
var picked = null
|
|
782
|
+
for (var i = 0; i < spans.length; i++) {
|
|
783
|
+
var span = spans[i]
|
|
784
|
+
if (span.children.length === 0 && !span.hasAttribute('data-avatar-status')) picked = span
|
|
785
|
+
}
|
|
786
|
+
return picked
|
|
787
|
+
}
|
|
788
|
+
|
|
775
789
|
// dsh 自己那套小图标的画法:16 视图框、1.3px 描边,字形落在 1.5~14.5 的方框里
|
|
776
790
|
function phoneIcon(size) {
|
|
777
791
|
return '<svg width="' + size + '" height="' + size + '" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" aria-hidden="true">'
|
|
@@ -804,13 +818,16 @@ const tetherScript = `
|
|
|
804
818
|
ensureFallbackStyle()
|
|
805
819
|
} else {
|
|
806
820
|
var labelSpan = button.querySelector('[data-dsh-tether="hosts-label"]')
|
|
807
|
-
var referenceLabel = reference.trigger.querySelector('span')
|
|
808
821
|
// 类名带内容哈希,照抄参照行当前的,外观自然跟随 dsh 自己的构建。侧栏收起/
|
|
809
822
|
// 展开、登录状态变化时它会换类名,也会换图标尺寸,跟着同步
|
|
810
823
|
var sync = function () {
|
|
811
824
|
row.className = reference.row.className
|
|
812
825
|
button.className = reference.trigger.className
|
|
813
826
|
if (reference.browser) return
|
|
827
|
+
// 参照行换形态时文字 span 会换一个节点(登录后前面多出头像),每次重挑
|
|
828
|
+
var referenceLabel = referenceLabelOf(reference.trigger)
|
|
829
|
+
// 侧栏收成竖条时参照行干脆不渲染文字,我们的文字也跟着收掉
|
|
830
|
+
labelSpan.style.display = referenceLabel ? '' : 'none'
|
|
814
831
|
if (referenceLabel) labelSpan.className = referenceLabel.className
|
|
815
832
|
// 账号行的形态写在自己的 data-* 上(没登录 32px 矮一截,收起时 36×36 居中),
|
|
816
833
|
// 光抄类名只拿到组件的默认形态,会比隔壁高一截。属性名按前缀抄,不写死是哪几个
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-tether",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"description": "Mobile client for the DeepSeek Harness — use the dsh on your dev machine from your Android or iOS phone, remotely across networks, peer-to-peer over iroh with no server to set up (falls back to a relay that only sees ciphertext)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"@deepseek-ai/dsh-user-approval": { "optional": true }
|
|
57
57
|
},
|
|
58
58
|
"optionalDependencies": {
|
|
59
|
-
"dsh-tether-host-android-arm64": "0.1.
|
|
60
|
-
"dsh-tether-host-darwin-arm64": "0.1.
|
|
61
|
-
"dsh-tether-host-darwin-x64": "0.1.
|
|
62
|
-
"dsh-tether-host-linux-arm64": "0.1.
|
|
63
|
-
"dsh-tether-host-linux-x64": "0.1.
|
|
64
|
-
"dsh-tether-host-win32-x64": "0.1.
|
|
59
|
+
"dsh-tether-host-android-arm64": "0.1.23",
|
|
60
|
+
"dsh-tether-host-darwin-arm64": "0.1.23",
|
|
61
|
+
"dsh-tether-host-darwin-x64": "0.1.23",
|
|
62
|
+
"dsh-tether-host-linux-arm64": "0.1.23",
|
|
63
|
+
"dsh-tether-host-linux-x64": "0.1.23",
|
|
64
|
+
"dsh-tether-host-win32-x64": "0.1.23"
|
|
65
65
|
}
|
|
66
66
|
}
|