dsh-multipane 1.0.18 → 1.0.19

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/README.md CHANGED
@@ -246,6 +246,10 @@ C:\Users\weiai\.dsh\plugin-src\_probe\sync-client.ps1 -Push # 台式机 ->
246
246
 
247
247
  ## 更新记录
248
248
 
249
+ ### 1.0.19(2026-11-10)
250
+ - **打开设置页就自动检查一次**(静默,不弹窗):一进去就能看到「有新版本 X」或「已是最新(X,12:30 检查)」,
251
+ 不用先点按钮、也就不会有「点了没反应」的错觉。手动点「检查更新」时才会弹窗。
252
+
249
253
  ### 1.0.18(2026-11-10)
250
254
  - 更新弹窗里多一行「检查时间」,一眼看出这个版本号是什么时候问的市场,方便判断是不是缓存滞后。
251
255
 
package/lib/client.js CHANGED
@@ -17,7 +17,7 @@ window.__ModuleLoader__.load({
17
17
  */
18
18
  const PLUGIN_LABEL = "多栏视图";
19
19
  /* 与 package.json 的 version 必须一致(发版时两处同改;check-names.cjs 会校验)。 */
20
- const PLUGIN_VERSION = "1.0.18";
20
+ const PLUGIN_VERSION = "1.0.19";
21
21
  const NPM_LATEST_URL = "https://registry.npmjs.org/dsh-multipane/latest";
22
22
  /* 插件市场的公开更新 API v1(dshmarket 提供,见其 UPDATE-API-V1.md)。
23
23
  它自己负责装包/校验版本/回滚,我们只负责触发和显示结果——
@@ -6433,7 +6433,8 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
6433
6433
  checkedAt: ""
6434
6434
  });
6435
6435
  const closeModal = () => setUpdate((prev) => ({ ...prev, modal: false }));
6436
- const checkUpdate = async () => {
6436
+ const checkUpdate = async (silent) => {
6437
+ const quiet = silent === true;
6437
6438
  setUpdate({
6438
6439
  phase: "checking",
6439
6440
  text: "正在检查…",
@@ -6465,7 +6466,7 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
6465
6466
  text: `发现新版本 ${latest}`,
6466
6467
  canUpdate: true,
6467
6468
  opId: "",
6468
- modal: true,
6469
+ modal: quiet !== true,
6469
6470
  installed,
6470
6471
  latest,
6471
6472
  forceHint: "",
@@ -6484,7 +6485,8 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
6484
6485
  installed,
6485
6486
  latest,
6486
6487
  forceHint: "插件市场对刚发布的版本有观察期(通常十几分钟到几小时,防供应链投毒),这段时间装会被市场拒绝。过一会儿点「重新检查」,放行后再更新即可。",
6487
- progress: null
6488
+ progress: null,
6489
+ checkedAt: new Date().toLocaleTimeString("zh-CN", { hour: "2-digit", minute: "2-digit" })
6488
6490
  });
6489
6491
  } else {
6490
6492
  setUpdate({
@@ -6512,7 +6514,7 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
6512
6514
  text: newer ? `发现新版本 ${latest}` : `已是最新版本(${PLUGIN_VERSION})`,
6513
6515
  canUpdate: false,
6514
6516
  opId: "",
6515
- modal: newer,
6517
+ modal: newer && quiet !== true,
6516
6518
  installed: PLUGIN_VERSION,
6517
6519
  latest,
6518
6520
  forceHint: newer ? "本机没有可用的插件市场(dshmarket),无法在这里自动安装。到「插件」页填 " + PKG_NAME + "@" + latest + " 安装。" : "",
@@ -6522,6 +6524,14 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
6522
6524
  setUpdate({ phase: "error", text: `检查失败:${String((err && err.message) || err)}`, canUpdate: false, opId: "" });
6523
6525
  }
6524
6526
  };
6527
+ /* 一进设置页就静默查一次(不弹窗):省得每次都要手动点,也避免「点了没反应」的错觉。
6528
+ 必须放在 checkUpdate 之后 —— const 不提升,提前引用会踩 TDZ。 */
6529
+ const autoChecked = react.useRef(false);
6530
+ react.useEffect(() => {
6531
+ if (autoChecked.current === true) return;
6532
+ autoChecked.current = true;
6533
+ checkUpdate(true);
6534
+ }, []);
6525
6535
  const runUpdate = async (force) => {
6526
6536
  setUpdate((prev) => ({ ...prev, phase: "updating", text: "正在更新…", canUpdate: false, progress: 0 }));
6527
6537
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-multipane",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "Hermes-style tabbed workspace for the DSH main area: drag sessions in, split into up to four columns, close tabs.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",