dsh-remote-mobile 1.4.1 → 1.4.2

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 CHANGED
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.4.2] - 2026-08-26
9
+
10
+ ### Features (新功能)
11
+ - **新版本更新提醒**:设置面板打开时从 npm registry 拉取 `dsh-remote-mobile` 最新版本号,与当前安装版本做语义化版本比较;**仅当检测到新版本**时,在标题版本号旁显示一个小巧的红色提醒「🚀 发现新版本 vX.Y.Z」,点击直达 npm 对应发布页。拉取失败(离线 / 网络异常)或已是最新版本时完全不显示,不干扰界面,也无需前端轮询。
12
+
13
+ ### Docs (文档)
14
+ - **README「这是什么」章节补充手机端样式适配说明**:说明插件针对 DSH 界面做的移动端样式适配(侧边栏抽屉折叠与可拖拽展开把手、设置弹窗居中微缩、对话正文高密度排版等)。
15
+
16
+ ---
17
+
8
18
  ## [1.4.1] - 2026-08-26
9
19
 
10
20
  ### Features (新功能)
package/README.md CHANGED
@@ -37,6 +37,8 @@
37
37
 
38
38
  DSH 核心服务出于安全考虑默认仅监听本地回环地址(`127.0.0.1`),手机、平板或其他电脑无法从外部访问 Web 控制台。本项目通过**访问控制中间件**与**请求隔离技术**,安全地开放了 **Tailscale 虚拟私网** 以及 **本地局域网 (Wi-Fi/LAN)** 访问能力,并提供传输加密、扫码配对、长期密码认证与防暴力破解审计体系。
39
39
 
40
+ 手机端访问时,插件还针对 DSH 界面做了**移动端样式适配**:侧边栏抽屉折叠与可拖拽展开把手、设置弹窗居中微缩、对话正文高密度排版等,让手机上的使用体验更贴近桌面端。
41
+
40
42
  ---
41
43
 
42
44
  <span id="advantages"></span>
package/README_EN.md CHANGED
@@ -37,6 +37,8 @@ English Documentation · [简体中文](./README.md)
37
37
 
38
38
  By default, DSH strictly listens only to the local loopback address (`127.0.0.1`), preventing mobile devices, tablets, or external computers from accessing the Web console. This plugin uses **access control middleware** and **request isolation** to securely open up **Tailscale Private Network** and **Local Area Network (LAN / Wi-Fi)** access, complete with RSA transmission encryption, QR code pairing, persistent password auth, and automated brute-force defense.
39
39
 
40
+ When accessed from a phone, the plugin also adapts the DSH interface for **mobile styles**: a collapsible sidebar drawer with a draggable floating toggle, a centered/scaled settings dialog, and dense conversation typography — so the mobile experience feels closer to the desktop.
41
+
40
42
  ---
41
43
 
42
44
  <span id="advantages"></span>
package/lib/client.js CHANGED
@@ -3464,8 +3464,8 @@ function StylesCard({ lang, showToast }) {
3464
3464
  }
3465
3465
 
3466
3466
  // src/client/version.js
3467
- var PLUGIN_VERSION = "v1.4.1";
3468
- var BUILD_TIME = "2026-08-26 23:00:00";
3467
+ var PLUGIN_VERSION = "v1.4.2";
3468
+ var BUILD_TIME = "2026-08-26 23:31:01";
3469
3469
 
3470
3470
  // src/client/components/MainSection.jsx
3471
3471
  var import_jsx_runtime9 = require("react/jsx-runtime");
@@ -3508,6 +3508,8 @@ function TailscaleMobileSection(props) {
3508
3508
  const [isSaving, setIsSaving] = (0, import_react9.useState)(false);
3509
3509
  const [showVersionTip, setShowVersionTip] = (0, import_react9.useState)(false);
3510
3510
  const [currentLang, setCurrentLang] = (0, import_react9.useState)(resolveLocale(ctx, status));
3511
+ const [npmLatestVersion, setNpmLatestVersion] = (0, import_react9.useState)("");
3512
+ const [hasUpdate, setHasUpdate] = (0, import_react9.useState)(false);
3511
3513
  const [conflictBannerDismissed, setConflictBannerDismissed] = (0, import_react9.useState)(false);
3512
3514
  const qrTabTouchedRef = (0, import_react9.useRef)(false);
3513
3515
  const updateQrTab = (0, import_react9.useCallback)((tab) => {
@@ -3581,6 +3583,34 @@ function TailscaleMobileSection(props) {
3581
3583
  }).catch(() => {
3582
3584
  });
3583
3585
  }, [refreshStatusOnly]);
3586
+ (0, import_react9.useEffect)(() => {
3587
+ let cancelled = false;
3588
+ fetch("https://registry.npmjs.org/dsh-remote-mobile/latest", { cache: "no-store" }).then((res) => res.ok ? res.json() : Promise.reject(new Error("npm registry error"))).then((data) => {
3589
+ if (cancelled) return;
3590
+ const v = data && data.version ? String(data.version) : "";
3591
+ if (!v) return;
3592
+ setNpmLatestVersion(v);
3593
+ const installed = String(PLUGIN_VERSION).replace(/^v/i, "");
3594
+ setHasUpdate(compareVersions(v, installed) > 0);
3595
+ }).catch(() => {
3596
+ if (cancelled) return;
3597
+ setHasUpdate(false);
3598
+ });
3599
+ return () => {
3600
+ cancelled = true;
3601
+ };
3602
+ }, []);
3603
+ const compareVersions = (a, b) => {
3604
+ const pa = a.split(".").map((n) => parseInt(n, 10) || 0);
3605
+ const pb = b.split(".").map((n) => parseInt(n, 10) || 0);
3606
+ for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
3607
+ const da = pa[i] || 0;
3608
+ const db = pb[i] || 0;
3609
+ if (da > db) return 1;
3610
+ if (da < db) return -1;
3611
+ }
3612
+ return 0;
3613
+ };
3584
3614
  (0, import_react9.useEffect)(() => {
3585
3615
  refreshStatusAndCode();
3586
3616
  const localeUnsubs = [];
@@ -4015,7 +4045,34 @@ function TailscaleMobileSection(props) {
4015
4045
  ) : null
4016
4046
  ]
4017
4047
  }
4018
- )
4048
+ ),
4049
+ hasUpdate && npmLatestVersion ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
4050
+ "a",
4051
+ {
4052
+ href: `https://www.npmjs.com/package/dsh-remote-mobile/v/${npmLatestVersion}`,
4053
+ target: "_blank",
4054
+ rel: "noopener noreferrer",
4055
+ style: {
4056
+ display: "inline-flex",
4057
+ alignItems: "center",
4058
+ gap: "4px",
4059
+ padding: "2px 8px",
4060
+ borderRadius: "10px",
4061
+ background: "rgba(203, 36, 49, 0.12)",
4062
+ border: "1px solid rgba(203, 36, 49, 0.3)",
4063
+ color: "var(--dsw-alias-brand-primary, #f87171)",
4064
+ fontSize: "11px",
4065
+ fontWeight: "600",
4066
+ textDecoration: "none",
4067
+ cursor: "pointer",
4068
+ whiteSpace: "nowrap"
4069
+ },
4070
+ children: [
4071
+ "\u{1F680} ",
4072
+ currentLang === "en" ? `Update available: v${npmLatestVersion}` : `\u53D1\u73B0\u65B0\u7248\u672C v${npmLatestVersion}`
4073
+ ]
4074
+ }
4075
+ ) : null
4019
4076
  ]
4020
4077
  }
4021
4078
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-remote-mobile",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "DeepSeek Harness 远程与移动端安全网关插件:零修改 DSH 底层代码安全开放局域网与 Tailscale 连接 | DeepSeek Harness (DSH) Remote & Mobile Security Guard: safely opens Tailscale/LAN with zero core modifications, QR scan auth, RSA encryption & brute-force defense.",
5
5
  "keywords": [
6
6
  "dsh",