@moonsand/dsh-ui-optimize 0.12.1 → 0.12.3

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 (2) hide show
  1. package/client.js +34 -14
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -137,9 +137,8 @@ window.__ModuleLoader__.load({
137
137
  'updates.section.blocked': 'Not loadable on this DSH',
138
138
  'updates.section.blockedHint': 'The running DSH version cannot load these releases. Upgrade DSH first, or wait for the plugin to publish a compatible one.',
139
139
  'updates.compatTag': 'Needs {version}',
140
- 'updates.applyStarted': 'Installing {n} more that were loaded — DSH restarts when that finishes, so this page drops for a moment.',
140
+ 'updates.applyStarted': '{n} loaded plugin(s) are queued: DSH stops once, installs the whole batch, then starts once — not one restart per plugin. The page reconnects on its own.',
141
141
  'updates.applyFailed': 'Could not start the background install. Try again in a moment.',
142
- 'updates.pendingStarting': 'Stopping DSH, installing, then starting again — the page reconnects on its own.',
143
142
  'updates.waitingRestart': 'waiting for restart',
144
143
  'updates.compatTagUnknown': 'Not loadable on this DSH',
145
144
  'updates.queued': 'Queued',
@@ -255,9 +254,8 @@ window.__ModuleLoader__.load({
255
254
  'updates.section.blocked': '与当前 DSH 不兼容',
256
255
  'updates.section.blockedHint': '当前运行的 DSH 版本加载不了这些版本。先升级 DSH,或等插件发布兼容版本。',
257
256
  'updates.compatTag': '需要 {version}',
258
- 'updates.applyStarted': '另外 {n} 个正在运行的插件已开始安装——装完会自动重启 DSH,页面会短暂断开,稍后刷新即可。',
257
+ 'updates.applyStarted': '{n} 个插件正在运行的,会一起停机安装:DSH 先退出、这批一次装完、再启动一次(不是每个插件重启一遍)。装完页面会自动重连。',
259
258
  'updates.applyFailed': '后台安装没能启动,稍后再试一次。',
260
- 'updates.pendingStarting': '正在停掉 DSH 安装新版本,随后自动启动——页面会自己重连。',
261
259
  'updates.waitingRestart': '等待重启',
262
260
  'updates.compatTagUnknown': '与当前 DSH 不兼容',
263
261
  'updates.queued': '排队中',
@@ -1740,13 +1738,26 @@ button.muik-shelf-row:focus-visible{outline:2px solid var(--dsw-alias-brand-prim
1740
1738
  * 0.2.2-rc.3), so `row.parentElement` is a one-child wrapper, not the
1741
1739
  * list. Walk up through single-child wrappers to find the real list:
1742
1740
  * hiding that list's other children is what folds the menu. */
1741
+ /* The list is a real <nav>; anchors beat guessing wrapper depth.
1742
+ * Rows now live inside `panelEntry` divs that also hold an unpin
1743
+ * button, so counting children never finds the list. */
1744
+ const navElement = typeof row.closest === 'function' ? row.closest('nav') : null
1743
1745
  let entry = row
1744
- for (let depth = 0; depth < 5; depth += 1) {
1745
- const parent = entry.parentElement
1746
- if (!parent || parent.children.length !== 1) break
1747
- entry = parent
1746
+ if (navElement) {
1747
+ for (const child of Array.from(navElement.children)) {
1748
+ if (child !== row && child.contains(row)) {
1749
+ entry = child
1750
+ break
1751
+ }
1752
+ }
1753
+ } else {
1754
+ for (let depth = 0; depth < 5; depth += 1) {
1755
+ const parent = entry.parentElement
1756
+ if (!parent || parent.children.length !== 1) break
1757
+ entry = parent
1758
+ }
1748
1759
  }
1749
- const list = entry.parentElement
1760
+ const list = navElement || entry.parentElement
1750
1761
  const nav = list || row.parentElement
1751
1762
  const root = nav ? nav.parentElement : null
1752
1763
  if (!root) return undefined
@@ -2386,11 +2397,16 @@ button.muik-shelf-row:focus-visible{outline:2px solid var(--dsw-alias-brand-prim
2386
2397
  const installed = (listed.value || []).filter(function (item) {
2387
2398
  return item && item.installed === true
2388
2399
  })
2389
- /* `updatable` is the Host's own verdict: a registry dependency saved
2390
- * under its own name with a semver version. Links and local paths are
2391
- * excluded for us — updating those would overwrite the checkout. */
2400
+ /* The Host's own verdict on whether this bundle can be replaced from a
2401
+ * registry. Newer hosts (0.2.2-rc.5+) dropped the boolean `updatable`
2402
+ * for `update: 'registry' | 'git'`; keep both so the list does not go
2403
+ * empty on either side. Links and local paths stay excluded — updating
2404
+ * those would overwrite the checkout. */
2392
2405
  const candidates = installed.filter(function (item) {
2393
- return item.updatable === true && typeof item.version === 'string' && item.version !== ''
2406
+ if (!item || typeof item.version !== 'string' || item.version === '') return false
2407
+ if (item.update === 'registry') return true
2408
+ if (item.update === 'git') return false
2409
+ return item.updatable === true
2394
2410
  })
2395
2411
  const found = []
2396
2412
  const stats = { tried: 0, failed: 0 }
@@ -3168,8 +3184,12 @@ button.muik-shelf-row:focus-visible{outline:2px solid var(--dsw-alias-brand-prim
3168
3184
  /* The host answers 202 before pnpm starts, so show the batch as in
3169
3185
  * flight right away — otherwise the click looks like a no-op until
3170
3186
  * the page reloads under the new DSH process. */
3187
+ /* No per-row sentence here: the batch is one restart for all of
3188
+ * them, so repeating "stopping DSH..." on every card reads like
3189
+ * each plugin reboots the host on its own. The line under the
3190
+ * batch says it once. */
3171
3191
  pendingRows.forEach(function (row) {
3172
- patch(row.name, { state: 'applied', percent: null, detail: translate('updates.pendingStarting') })
3192
+ patch(row.name, { state: 'applied', percent: null, detail: '' })
3173
3193
  })
3174
3194
  } catch (err) {
3175
3195
  applyFailed = true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moonsand/dsh-ui-optimize",
3
- "version": "0.12.1",
3
+ "version": "0.12.3",
4
4
  "type": "module",
5
5
  "description": "Switches that tune how DeepSeek Harness looks and behaves across the whole interface, not just a few screens — each works on its own and more arrive as the shell grows: an eight-theme minimalist gallery, sidebar panel folding, and reload/restart buttons at the sidebar foot. · 调 DeepSeek Harness 整体观感与操作的开关集合,管的是整套界面而不只是某几块;每个开关独立生效,随宿主能力增长继续增加:8 套极简主题画廊、侧栏面板收纳,以及侧栏底部的刷新界面与重启应用按钮。",
6
6
  "license": "MIT",