dsh-pocket 1.0.17 → 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/client/client.js CHANGED
@@ -1453,10 +1453,10 @@ function PocketSettingsTab({ rpcCall }) {
1453
1453
  "\u5F00\u53D1\u8005\uFF1A\u7A0B\u5E8F\u5458\u5C11\u5317\u6668"
1454
1454
  )
1455
1455
  ),
1456
- // 重启后提示(进程在后台运行,停止方法)
1456
+ // 重启后提示(进程在后台运行,停止方法)——左侧蓝色色条
1457
1457
  restartNotice ? (0, import_react2.createElement)(
1458
1458
  "div",
1459
- { style: { ...styles.block, border: "1px solid var(--dsw-alias-brand-primary,#4f6ef7)", borderRadius: 8, background: "var(--dsw-alias-bg-layer-2,#f3f4f6)", padding: "10px 12px" } },
1459
+ { style: { ...styles.block, borderLeft: "4px solid var(--dsw-alias-brand-primary,#4f6ef7)", borderRadius: 8, background: "var(--dsw-alias-bg-layer-2,#f3f4f6)", padding: "10px 12px" } },
1460
1460
  (0, import_react2.createElement)(
1461
1461
  "div",
1462
1462
  { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8 } },
@@ -1465,10 +1465,10 @@ function PocketSettingsTab({ rpcCall }) {
1465
1465
  ),
1466
1466
  (0, import_react2.createElement)("div", { style: styles.muted, marginTop: 4, wordBreak: "break-all" }, "\u8FDB\u7A0B\u5728\u540E\u53F0\u8FD0\u884C\uFF08\u4E0D\u6302\u7EC8\u7AEF\uFF09\u3002\u5982\u9700\u505C\u6B62\uFF1Alsof -ti :3080 | xargs kill -9")
1467
1467
  ) : null,
1468
- // 更新提示
1468
+ // 更新提示——左侧黄色色条(提示有新版本)
1469
1469
  updateInfo ? (0, import_react2.createElement)(
1470
1470
  "div",
1471
- { style: { ...styles.block, border: "1px solid var(--dsw-alias-state-warn-primary,#b45309)" }, borderRadius: 8, background: "var(--dsw-alias-bg-layer-2,#f3f4f6)", padding: "10px 12px" },
1471
+ { style: { ...styles.block, borderLeft: "4px solid var(--dsw-alias-state-warn-primary,#b45309)", borderRadius: 8, background: "var(--dsw-alias-bg-layer-2,#f3f4f6)", padding: "10px 12px" } },
1472
1472
  (0, import_react2.createElement)(
1473
1473
  "div",
1474
1474
  { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8 } },
@@ -1482,7 +1482,7 @@ function PocketSettingsTab({ rpcCall }) {
1482
1482
  (0, import_react2.createElement)(
1483
1483
  "div",
1484
1484
  { style: styles.muted, marginTop: 4 },
1485
- updateInfo.result === "ok" ? "\u2705 \u5DF2\u66F4\u65B0\uFF0C\u91CD\u542F dsh web \u751F\u6548 | updated \u2014 restart dsh web" : updateInfo.result === "fail" ? `\u274C \u66F4\u65B0\u5931\u8D25\uFF1A${updateInfo.output || "\u672A\u77E5"}\uFF08\u4E5F\u53EF\u624B\u52A8\u6267\u884C dsh plugin --profile web update dsh-pocket --latest -w\uFF09` : `\u5F53\u524D v${updateInfo.current} \u2192 \u6700\u65B0 v${updateInfo.latest}`
1485
+ updateInfo.result === "ok" ? "\u2705 \u5DF2\u66F4\u65B0\uFF0C\u91CD\u542F dsh web \u751F\u6548 | updated \u2014 restart dsh web" : updateInfo.result === "fail" ? `\u274C \u5931\u8D25\uFF1A${updateInfo.output || "\u672A\u77E5"}\uFF08\u624B\u52A8\u66F4\u65B0\uFF1Adsh plugin --profile web update dsh-pocket --latest -w\uFF09` : `\u5F53\u524D v${updateInfo.current} \u2192 \u6700\u65B0 v${updateInfo.latest}`
1486
1486
  )
1487
1487
  ) : null,
1488
1488
  // 局域网
package/client/index.jsx CHANGED
@@ -211,8 +211,8 @@ function PocketSettingsTab({ rpcCall }) {
211
211
  '开发者:程序员少北晨'),
212
212
  ),
213
213
 
214
- // 重启后提示(进程在后台运行,停止方法)
215
- restartNotice ? h('div', { style: { ...styles.block, border: '1px solid var(--dsw-alias-brand-primary,#4f6ef7)', borderRadius: 8, background: 'var(--dsw-alias-bg-layer-2,#f3f4f6)', padding: '10px 12px' } },
214
+ // 重启后提示(进程在后台运行,停止方法)——左侧蓝色色条
215
+ restartNotice ? h('div', { style: { ...styles.block, borderLeft: '4px solid var(--dsw-alias-brand-primary,#4f6ef7)', borderRadius: 8, background: 'var(--dsw-alias-bg-layer-2,#f3f4f6)', padding: '10px 12px' } },
216
216
  h('div', { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8 } },
217
217
  h('div', { style: { fontWeight: 600, fontSize: 13 } }, '🔄 已重启 | Restarted'),
218
218
  h('button', { style: styles.btn, onClick: () => setRestartNotice(false) }, '知道了 | OK'),
@@ -220,8 +220,8 @@ function PocketSettingsTab({ rpcCall }) {
220
220
  h('div', { style: styles.muted, marginTop: 4, wordBreak: 'break-all' }, '进程在后台运行(不挂终端)。如需停止:lsof -ti :3080 | xargs kill -9'),
221
221
  ) : null,
222
222
 
223
- // 更新提示
224
- updateInfo ? h('div', { style: { ...styles.block, border: '1px solid var(--dsw-alias-state-warn-primary,#b45309)' }, borderRadius: 8, background: 'var(--dsw-alias-bg-layer-2,#f3f4f6)', padding: '10px 12px' },
223
+ // 更新提示——左侧黄色色条(提示有新版本)
224
+ updateInfo ? h('div', { style: { ...styles.block, borderLeft: '4px solid var(--dsw-alias-state-warn-primary,#b45309)', borderRadius: 8, background: 'var(--dsw-alias-bg-layer-2,#f3f4f6)', padding: '10px 12px' } },
225
225
  h('div', { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8 } },
226
226
  h('div', { style: { fontWeight: 600, fontSize: 13 } },
227
227
  updateInfo.updated
@@ -233,7 +233,7 @@ function PocketSettingsTab({ rpcCall }) {
233
233
  ),
234
234
  h('div', { style: styles.muted, marginTop: 4 },
235
235
  updateInfo.result === 'ok' ? '✅ 已更新,重启 dsh web 生效 | updated — restart dsh web'
236
- : updateInfo.result === 'fail' ? `❌ 更新失败:${updateInfo.output || '未知'}(也可手动执行 dsh plugin --profile web update dsh-pocket --latest -w)`
236
+ : updateInfo.result === 'fail' ? `❌ 失败:${updateInfo.output || '未知'}(手动更新:dsh plugin --profile web update dsh-pocket --latest -w)`
237
237
  : `当前 v${updateInfo.current} → 最新 v${updateInfo.latest}`),
238
238
  ) : null,
239
239
 
package/lib/index.js CHANGED
@@ -60,7 +60,7 @@ function writeRestartNotice() {
60
60
  /** 自重启(先落 notice,让重启后的页面提示停止方法)。 */
61
61
  function pocketRestart() {
62
62
  writeRestartNotice().catch(() => {});
63
- return restartHost({ internals });
63
+ return restartHost(); // 不传 internals:模块级函数里没有该变量(曾导致 ReferenceError)
64
64
  }
65
65
 
66
66
  /** 执行更新:dsh plugin --profile <p> update dsh-pocket --latest -w(超时保护)。 */
package/lib/push.mjs CHANGED
@@ -135,7 +135,14 @@ export async function createPushService({
135
135
  subs.delete(endpoint);
136
136
  await persist();
137
137
  } else {
138
- log.warn?.('dsh-pocket: push send failed (endpoint %s…) | 推送失败: %s', String(endpoint).slice(0, 48), err?.message ?? err);
138
+ // 完整记录状态码与响应体,方便判断是 FCM 拒绝(401/403)还是网络/代理问题
139
+ log.warn?.(
140
+ 'dsh-pocket: push send failed | 推送失败: %s (status=%s, body=%s, endpoint=%s…)',
141
+ err?.message ?? String(err),
142
+ code ?? '?',
143
+ String(err?.body ?? '').slice(0, 200),
144
+ String(endpoint).slice(0, 48),
145
+ );
139
146
  }
140
147
  }
141
148
  }
package/package.json CHANGED
@@ -77,5 +77,5 @@
77
77
  "access": "public",
78
78
  "registry": "https://registry.npmjs.org/"
79
79
  },
80
- "version": "1.0.17"
80
+ "version": "1.0.19"
81
81
  }