dsh-plugin-tether 0.1.11 → 0.1.12

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/index.js +24 -5
  3. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  本文件记录面向用户的变化。每个版本的这一节会原样作为该版本 Release 的说明。
4
4
 
5
+ ## 0.1.12
6
+
7
+ ### 修复
8
+
9
+ - **Termux:`tether-host` 启动时打一段 `android context was not initialized` 的 panic 栈**([#5](https://github.com/zexadev/dsh-tether/issues/5))。iroh 默认解析器在 android 上经 JNI 读系统 DNS,Termux 没有 JVM;iroh 内部接住 panic 后回退 Google DNS,进程照常工作,但栈已经打出来了。现在 android 目标直接用等价的解析器,不再走 JNI。
10
+ - **侧栏底部「连接手机」按钮与 dsh-cost-meter 互挤,被压成只剩图标的竖条**([#7](https://github.com/zexadev/dsh-tether/issues/7))。两者共用 `sidebar.footer.action` 插槽,横排下互挤。现改为纵向堆叠、各占一行,展开态与折叠成图标条两种状态都与「设置」按钮几何一致。
11
+ - **手机每次打开 App,dsh web UI 都当作全新访问;配合 Prefab Anchored Standard 一类一进会话就写入历史的预设,每开一次多一条会话**([#7](https://github.com/zexadev/dsh-tether/issues/7))。手机侧本地代理端口此前每次连接随机,web UI 按源保存的「当前会话」等状态永远读不到。现在端口按主机派生固定,同一台电脑每次同源;不同电脑不同源,状态互不串。
12
+
5
13
  ## 0.1.11
6
14
 
7
15
  ### 新增
package/index.js CHANGED
@@ -347,6 +347,16 @@ function apply(ctx, config = {}) {
347
347
  */
348
348
  function injectNarrowScreenCss(html) {
349
349
  const css = `
350
+ /* 侧栏底部的 sidebar.footer.action 是横排 flex 行,官方设想里放并排的小动作。
351
+ 「连接手机」照抄「设置」的类,是占满一行的触发行;别的插件(dsh-cost-meter)
352
+ 又往同一行放 width:100% 的面板,横排下两者互挤:本按钮被压到只剩图标,
353
+ rail 态更被顶出 56px 的侧栏。改成纵向堆叠,各占一行;独占时与横排等价。
354
+ rail 态容器宽随内容,居中才与「设置」图标对齐。 */
355
+ [class*="footArea"] > [class*="footerActions"] {
356
+ flex-direction: column !important;
357
+ align-items: stretch !important;
358
+ }
359
+ [class*="collapsed"] [class*="footArea"] > [class*="footerActions"] { align-items: center !important; }
350
360
  @media (max-width: 640px) {
351
361
  /* hero 背后的装饰性发光椭圆比视口宽,会让整页能被横向拖动 */
352
362
  html, body { overflow-x: hidden; }
@@ -652,7 +662,13 @@ function injectNarrowScreenCss(html) {
652
662
  if (!slot || slot.querySelector('[data-dsh-tether="hosts-trigger"]')) return
653
663
  var settings = document.querySelector('[data-slot="settings.trigger"]')
654
664
  var reference = settings && settings.closest ? settings.closest('button') : null
655
- if (!reference) return
665
+ if (!reference || !reference.parentElement) return
666
+ // 「设置」是 triggerRow(定高的横排容器)套 trigger(flex:1 1 0%)两层。只抄
667
+ // 里层放进纵向堆叠的插槽,basis 0% 会变成高度,按钮塌成一行字;两层都抄,
668
+ // 几何才在宽态 / rail 态都与「设置」一致。
669
+ var row = document.createElement('div')
670
+ row.setAttribute('data-dsh-tether', 'hosts-row')
671
+ row.className = reference.parentElement.className
656
672
  var button = document.createElement('button')
657
673
  button.type = 'button'
658
674
  button.setAttribute('data-dsh-tether', 'hosts-trigger')
@@ -665,10 +681,13 @@ function injectNarrowScreenCss(html) {
665
681
  if (framed) window.parent.postMessage({ type: 'dsh-tether:open-hosts' }, '*')
666
682
  else showPairing()
667
683
  })
668
- slot.append(button)
669
- // 侧栏展开/收起时「设置」按钮会换类名(rail 与否),跟着同步
670
- new MutationObserver(function () { button.className = reference.className })
671
- .observe(reference, { attributes: true, attributeFilter: ['class'] })
684
+ row.append(button)
685
+ slot.append(row)
686
+ // 侧栏展开/收起时「设置」两层都会换类名(rail 与否),跟着同步
687
+ new MutationObserver(function () {
688
+ button.className = reference.className
689
+ row.className = reference.parentElement.className
690
+ }).observe(reference.parentElement, { attributes: true, attributeFilter: ['class'], subtree: true })
672
691
  }
673
692
  mountHostsTrigger()
674
693
  new MutationObserver(mountHostsTrigger).observe(document.documentElement, { childList: true, subtree: true })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-tether",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
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 with no server in between (iroh)",
5
5
  "keywords": [
6
6
  "dsh",
@@ -50,11 +50,11 @@
50
50
  "@deepseek-ai/dsh-user-approval": { "optional": true }
51
51
  },
52
52
  "optionalDependencies": {
53
- "dsh-tether-host-android-arm64": "0.1.11",
54
- "dsh-tether-host-darwin-arm64": "0.1.11",
55
- "dsh-tether-host-darwin-x64": "0.1.11",
56
- "dsh-tether-host-linux-arm64": "0.1.11",
57
- "dsh-tether-host-linux-x64": "0.1.11",
58
- "dsh-tether-host-win32-x64": "0.1.11"
53
+ "dsh-tether-host-android-arm64": "0.1.12",
54
+ "dsh-tether-host-darwin-arm64": "0.1.12",
55
+ "dsh-tether-host-darwin-x64": "0.1.12",
56
+ "dsh-tether-host-linux-arm64": "0.1.12",
57
+ "dsh-tether-host-linux-x64": "0.1.12",
58
+ "dsh-tether-host-win32-x64": "0.1.12"
59
59
  }
60
60
  }