@objectivex666/dsh-settings-search 1.7.0 → 1.7.1

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.en.md CHANGED
@@ -21,6 +21,7 @@
21
21
  - 🧭 **Click-to-jump** — selecting a result clicks the matching left-nav entry to open its section; for tab options it also opens the tab and flashes the target row. A manual-path hint appears if automatic navigation is not possible.
22
22
  - 🌱 **Progressive indexing** — self-drawing settings rows are harvested from the rendered DOM (via their `[data-slot]` anchors) the first time their page is visited, then stay searchable.
23
23
  - 🛠 **Built-in settings page (v1.4.0)** — a "Settings Search" page in the left navigation shows the current version and checks npm for a newer release on demand; when one exists it hands you a copy-ready `dsh plugin update` command.
24
+ - 🧭 **View release notes (v1.7.1)** — the "Settings Search" page has a "View changelog" button next to "Check for updates"; it fetches the GitHub release notes and shows them inline, opening the release page if fetching fails.
24
25
  - 🌐 **i18n** — built-in Chinese/English dictionaries that follow the DSH localization system and are easy to extend.
25
26
  - 🎨 **Theme-aware** — styled entirely with CSS variables, automatically following the DSH theme (light/dark).
26
27
  - ⚡ **Reactive** — subscribes to settings entries being added, removed, or changed, and refreshes results automatically.
@@ -97,6 +98,13 @@ npm test # validates the host half, the dsh.client manifest, and the client bu
97
98
  > sync with the shipping package kept drifting silently, it was removed in
98
99
  > v1.4.1; retrieve it from git history (tag `v1.4.0`) if you need a reference.
99
100
 
101
+ ## Feedback & contributions
102
+
103
+ Issues are welcome — please report bugs, suggest features, or ask questions in
104
+ [GitHub Issues](https://github.com/objectivex666/dsh-settings-search/issues).
105
+ Pull requests are equally welcome via
106
+ [GitHub Pull Requests](https://github.com/objectivex666/dsh-settings-search/pulls).
107
+
100
108
  ## Changelog & releases
101
109
 
102
110
  Every version bump keeps git tags and GitHub Releases in sync, with a bilingual body that lists both new features and fixes:
package/README.md CHANGED
@@ -21,6 +21,7 @@
21
21
  - 🧭 **点击即达**:选中结果后自动点击对应的左侧导航项打开所在分区;若是页内标签页会继续点开对应标签,并高亮闪烁目标选项行。无法自动跳转时显示手动路径提示。
22
22
  - 🌱 **渐进索引**:自绘界面的设置行会在其所在页面首次被访问时从渲染 DOM 中收割标题并加入索引(此后始终可搜)。
23
23
  - 🛠 **自带设置页(v1.4.0)**:左侧导航新增「设置搜索」页——展示当前版本,一键检查 npm 注册表上的最新版本;有更新时直接给出复制就用的 `dsh plugin update` 命令。
24
+ - 🧭 **更新说明查看(v1.7.1)**:在「设置搜索」页「检查更新」旁新增「查看更新说明」按钮,可拉取 GitHub Release 更新内容并就地展示;拉取失败时自动跳转 Release 页面。
24
25
  - 🌐 **多语言支持**:内置中英文国际化,可跟随 DSH 本地化系统扩展。
25
26
  - 🎨 **主题适配**:完全使用 CSS 变量,自动跟随 DSH 主题(亮/暗)。
26
27
  - ⚡ **动态响应**:实时订阅设置项的新增/删除/变更,搜索结果自动刷新。
@@ -98,6 +99,12 @@ npm test # 校验 host 半、dsh.client 清单、client bundle handoff
98
99
  > `cordis_define` 动态插件源)。因与正式包代码长期双份维护漂移,已于 v1.4.1
99
100
  > 移除;如需动态用法可从 git 历史(tag `v1.4.0`)取回参考。
100
101
 
102
+ ## 反馈与贡献
103
+
104
+ 欢迎提交 **Issue** 反馈 Bug、功能建议或使用疑问:
105
+ [GitHub Issues](https://github.com/objectivex666/dsh-settings-search/issues),
106
+ 也欢迎直接发起 [Pull Request](https://github.com/objectivex666/dsh-settings-search/pulls)。
107
+
101
108
  ## 更新日志与发布
102
109
 
103
110
  每次版本更新需同时更新 GitHub Release 与 git tag,正文为双语,并写明「新功能」与「修复」:
package/lib/client.js CHANGED
@@ -30,7 +30,7 @@ window.__ModuleLoader__.load({
30
30
 
31
31
  const NS = 'settings-search-v5'
32
32
  /** Single source of truth is package.json — scripts/check.mjs asserts this matches. */
33
- const PKG_VERSION = '1.7.0'
33
+ const PKG_VERSION = '1.7.1'
34
34
  const NPM_NAME = '@objectivex666/dsh-settings-search'
35
35
  const zh = {
36
36
  title: '设置',
@@ -57,6 +57,8 @@ window.__ModuleLoader__.load({
57
57
  updCLI: 'DSH CLI',
58
58
  updNpx: 'npx',
59
59
  updRelease: '查看 release notes',
60
+ updReleaseNotes: '查看更新说明',
61
+ updFetchingNotes: '正在获取…',
60
62
  updRestart: '更新完成后重启 DSH,新版本才会生效。',
61
63
  aiSearch: 'AI 联想搜索',
62
64
  aiDesc: '没有直接匹配时,用你配置的模型(OpenAI 兼容或 Anthropic)理解目标并推荐设置项。',
@@ -110,6 +112,8 @@ window.__ModuleLoader__.load({
110
112
  updCLI: 'DSH CLI',
111
113
  updNpx: 'npx',
112
114
  updRelease: 'View release notes',
115
+ updReleaseNotes: 'View changelog',
116
+ updFetchingNotes: 'Fetching…',
113
117
  updRestart: 'Restart DSH after updating for the new version to take effect.',
114
118
  aiSearch: 'AI-assisted search',
115
119
  aiDesc: 'When no direct match exists, your own model (OpenAI-compatible or Anthropic) understands your goal and suggests settings.',
@@ -509,6 +513,7 @@ window.__ModuleLoader__.load({
509
513
  .sss-vr-update-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 1px; }
510
514
  .sss-vr-link { appearance: none; font: inherit; cursor: pointer; border: 1px solid var(--dsw-alias-border-l2); border-radius: 8px; padding: 5px 14px; font-size: 13px; line-height: 1.5; color: var(--dsw-alias-label-secondary); background: 0 0; text-decoration: none; display: inline-flex; align-items: center; }
511
515
  .sss-vr-link:hover { color: var(--dsw-alias-label-primary); border-color: var(--dsw-alias-label-dimmed); }
516
+ .sss-vr-notes { box-sizing: border-box; border: 1px solid var(--dsw-alias-border-l2); border-radius: 8px; background: var(--dsw-alias-bg-layer-3); color: var(--dsw-alias-label-primary); padding: 10px 12px; font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow-y: auto; margin-top: 8px; }
512
517
  `
513
518
  let stylesInstalled = false
514
519
  function installStyles() {
@@ -1088,6 +1093,8 @@ window.__ModuleLoader__.load({
1088
1093
  const [latest, setLatest] = React.useState('')
1089
1094
  const [copied, setCopied] = React.useState(false)
1090
1095
  const [copyFailed, setCopyFailed] = React.useState(false)
1096
+ const [notesState, setNotesState] = React.useState('idle') // idle | loading | loaded
1097
+ const [notesBody, setNotesBody] = React.useState('')
1091
1098
  const [aiOn, setAiOn] = React.useState(aiSearchEnabled)
1092
1099
  const cfg = aiConfig()
1093
1100
  const [provider, setProvider] = React.useState(cfg.provider)
@@ -1212,6 +1219,28 @@ window.__ModuleLoader__.load({
1212
1219
  const releasesUrl = latest
1213
1220
  ? `https://github.com/objectivex666/dsh-settings-search/releases/tag/v${latest}`
1214
1221
  : 'https://github.com/objectivex666/dsh-settings-search/releases/latest'
1222
+ const fetchNotes = async () => {
1223
+ setNotesState('loading')
1224
+ setNotesBody('')
1225
+ try {
1226
+ const res = await fetch('https://api.github.com/repos/objectivex666/dsh-settings-search/releases/latest', {
1227
+ headers: { Accept: 'application/vnd.github+json', 'User-Agent': 'dsh-settings-search' },
1228
+ })
1229
+ if (!res.ok) throw new Error(`HTTP ${res.status}`)
1230
+ const data = await res.json()
1231
+ const body = typeof data?.body === 'string' ? data.body.trim() : ''
1232
+ if (body === '') throw new Error('empty release body')
1233
+ setNotesBody(body)
1234
+ setNotesState('loaded')
1235
+ log('info', '查看更新说明', { ok: true, tag: typeof data?.tag_name === 'string' ? data.tag_name : '' })
1236
+ } catch {
1237
+ setNotesState('idle')
1238
+ setNotesBody('')
1239
+ log('error', '查看更新说明失败(跳转 release)', {})
1240
+ const opened = window.open(releasesUrl, '_blank', 'noopener,noreferrer')
1241
+ if (!opened) window.location.href = releasesUrl
1242
+ }
1243
+ }
1215
1244
  const commandBlock = (label, command) => React.createElement('div', { className: 'sss-vr-update-command', key: command }, [
1216
1245
  React.createElement('div', { className: 'sss-vr-update-command-label' }, label),
1217
1246
  React.createElement('code', { className: 'sss-vr-code' }, command),
@@ -1332,9 +1361,15 @@ window.__ModuleLoader__.load({
1332
1361
  copyFailed ? React.createElement('p', { className: 'sss-vr-note', style: { color: 'var(--dsw-alias-label-danger)' } }, t('updCopyFail')) : null,
1333
1362
  ])
1334
1363
  : null,
1335
- React.createElement('div', { className: 'sss-vr-actions' },
1336
- React.createElement('button', { className: 'sss-vr-btn', type: 'button', disabled: state === 'loading', onClick: () => { void check() } },
1337
- state === 'loading' ? t('updChecking') : t('updCheck'))),
1364
+ React.createElement('div', { className: 'sss-vr-actions' }, [
1365
+ React.createElement('button', { className: 'sss-vr-btn sss-vr-primary', type: 'button', disabled: state === 'loading', onClick: () => { void check() } },
1366
+ state === 'loading' ? t('updChecking') : t('updCheck')),
1367
+ React.createElement('button', { className: 'sss-vr-btn', type: 'button', disabled: notesState === 'loading', onClick: () => { void fetchNotes() } },
1368
+ notesState === 'loading' ? t('updFetchingNotes') : t('updReleaseNotes')),
1369
+ ]),
1370
+ notesState === 'loaded'
1371
+ ? React.createElement('div', { className: 'sss-vr-notes' }, notesBody)
1372
+ : null,
1338
1373
  ]),
1339
1374
  React.createElement('div', { className: 'sss-vr-field' }, [
1340
1375
  React.createElement('div', { className: 'sss-vr-field-head' }, [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@objectivex666/dsh-settings-search",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "DSH settings panel search plugin – instantly filter setting sections and general items with navigation guidance. Installable via `dsh plugin add`.",
5
5
  "keywords": [
6
6
  "dsh",