dsh-notify-tray 0.1.9 → 0.1.10
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 +1 -1
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/lib/client.js +14 -7
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -96,7 +96,7 @@ The **Updates** card at the bottom of the sidebar settings page:
|
|
|
96
96
|
- Never installs automatically. DSH handles compatibility checks and recovery on failure. The page distinguishes completion, a required restart, restoration, and an unconfirmed outcome.
|
|
97
97
|
- Explains why local-directory and Git installations cannot use this update path. Once a release is published to npm, switch to an npm installation through plugin management to enable online updates.
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
If the settings page in 0.1.8 or 0.1.9 says that plugin update access or APIs are unavailable, open **Plugins → Whale Notify Station → Versions** in DSH. Expand the version list and select the release to install. Restart DSH when prompted.
|
|
100
100
|
|
|
101
101
|
To develop or try unpublished code, install a local checkout:
|
|
102
102
|
|
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
- 安装不会自动开始;DSH 负责版本兼容性检查和失败时的恢复。页面会区分更新完成、需要重启、恢复旧版和结果尚未确认。
|
|
97
97
|
- 本地目录、Git 等非 npm 安装不支持这条在线更新流程,会显示原因。需等正式版发布到 npm 后,通过插件管理页改为 npm 安装。
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
使用 0.1.8 或 0.1.9 时,如果设置页提示「当前 DSH 未提供可用的插件更新权限或接口」,请打开 DSH「插件 → 小鲸鱼通知站 → 版本」,展开版本列表并选择要更新到的版本。提示需要重启时,请重启 DSH。
|
|
100
100
|
|
|
101
101
|
开发或试用尚未发布的代码,可从本地仓库安装:
|
|
102
102
|
|
package/README.zh-CN.md
CHANGED
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
- 安装不会自动开始;DSH 负责版本兼容性检查和失败时的恢复。页面会区分更新完成、需要重启、恢复旧版和结果尚未确认。
|
|
97
97
|
- 本地目录、Git 等非 npm 安装不支持这条在线更新流程,会显示原因。需等正式版发布到 npm 后,通过插件管理页改为 npm 安装。
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
使用 0.1.8 或 0.1.9 时,如果设置页提示「当前 DSH 未提供可用的插件更新权限或接口」,请打开 DSH「插件 → 小鲸鱼通知站 → 版本」,展开版本列表并选择要更新到的版本。提示需要重启时,请重启 DSH。
|
|
100
100
|
|
|
101
101
|
开发或试用尚未发布的代码,可从本地仓库安装:
|
|
102
102
|
|
package/lib/client.js
CHANGED
|
@@ -120,7 +120,8 @@ window.__ModuleLoader__.load({
|
|
|
120
120
|
update_available: '发现可用的新版本',
|
|
121
121
|
update_current: '已是最新正式版',
|
|
122
122
|
update_blocked: '有新版本,但暂无适合当前 DSH 的正式版',
|
|
123
|
-
update_unavailable: '
|
|
123
|
+
update_unavailable: '此页无法检查更新,请在 DSH 的「插件」页查看。',
|
|
124
|
+
update_local: '当前插件来自本地目录或 Git 等来源。此页仅检查 npm 安装的插件。',
|
|
124
125
|
update_updating: '正在更新,请稍候…',
|
|
125
126
|
update_updated: '更新已完成',
|
|
126
127
|
update_restart: '更新已安装,重启 DSH 后生效',
|
|
@@ -300,7 +301,8 @@ window.__ModuleLoader__.load({
|
|
|
300
301
|
update_available: 'A new version is available',
|
|
301
302
|
update_current: 'You have the latest stable version',
|
|
302
303
|
update_blocked: 'Newer versions exist, but no compatible stable release is available',
|
|
303
|
-
update_unavailable: '
|
|
304
|
+
update_unavailable: 'Open the DSH Plugins page to check for updates.',
|
|
305
|
+
update_local: 'This plugin was installed from a local directory, Git, or another source. This page checks npm installations only.',
|
|
304
306
|
update_updating: 'Updating, please wait…',
|
|
305
307
|
update_updated: 'Update complete',
|
|
306
308
|
update_restart: 'Update installed. Restart DSH to use it.',
|
|
@@ -639,15 +641,19 @@ window.__ModuleLoader__.load({
|
|
|
639
641
|
async check() {
|
|
640
642
|
if (this.disposed || ['checking', 'updating', 'restart'].includes(this.snapshot.phase)) return
|
|
641
643
|
const manager = this.getManager()
|
|
642
|
-
if (!manager?.listVersions || !manager?.updateBundle) return this.patch({ phase: 'unavailable' })
|
|
643
644
|
this.patch({ phase: 'checking', candidate: undefined, error: undefined })
|
|
645
|
+
if (!manager?.listBundles || !manager.listVersions || !manager.updateBundle) return this.patch({ phase: 'unavailable' })
|
|
644
646
|
try {
|
|
645
647
|
const inventory = await manager.listBundles()
|
|
646
648
|
if (!inventory.ok) throw new Error(inventory.error?.message || 'Plugin inventory unavailable')
|
|
647
649
|
const pkg = inventory.value.find(pkg => pkg.name === 'dsh-notify-tray')
|
|
648
650
|
if (!pkg) return this.patch({ phase: 'unavailable' })
|
|
649
651
|
this.patch({ installed: pkg.version })
|
|
650
|
-
|
|
652
|
+
const registry = pkg.update === undefined ? pkg.updatable === true : pkg.update === 'registry'
|
|
653
|
+
if (!registry) {
|
|
654
|
+
const local = pkg.update === 'git' || /^(?:link:|file:|git|https?:|\/)/u.test(pkg.source || '')
|
|
655
|
+
return this.patch({ phase: local ? 'local' : 'unavailable' })
|
|
656
|
+
}
|
|
651
657
|
const answer = await manager.listVersions('dsh-notify-tray', {})
|
|
652
658
|
if (!answer.ok) throw new Error(answer.error?.message || 'Version check failed')
|
|
653
659
|
const list = answer.value
|
|
@@ -1068,7 +1074,8 @@ window.__ModuleLoader__.load({
|
|
|
1068
1074
|
}
|
|
1069
1075
|
|
|
1070
1076
|
const PAGE_CSS = `
|
|
1071
|
-
.dnt-page { --dnt-accent: #5085b2; --dnt-border: color-mix(in srgb, currentColor 11%, transparent);
|
|
1077
|
+
.dnt-page { --dnt-accent: #5085b2; --dnt-border: color-mix(in srgb, currentColor 11%, transparent); flex: 1; min-height: 0; overflow-y: auto; }
|
|
1078
|
+
html[data-platform='darwin'] .dnt-page { margin-top: var(--dsh-frame-top-clearance, 0px); }
|
|
1072
1079
|
.dnt-content { max-width: 1040px; margin: auto; padding: 30px 26px 48px; }
|
|
1073
1080
|
.dnt-hero { display: flex; align-items: center; gap: 18px; padding: 22px; margin-bottom: 24px; border-radius: 20px; background: linear-gradient(115deg, color-mix(in srgb, var(--dnt-accent) 12%, transparent), color-mix(in srgb, var(--dnt-accent) 2%, transparent)); border: 1px solid var(--dnt-border); }
|
|
1074
1081
|
.dnt-mascot { box-sizing: border-box; width: 80px; height: 80px; padding: 8px; flex: none; border-radius: 22px; border: 1px solid var(--dnt-border); background: var(--dsw-alias-bg-layer-1, #fff); box-shadow: 0 3px 10px #00000006; }
|
|
@@ -1160,12 +1167,12 @@ window.__ModuleLoader__.load({
|
|
|
1160
1167
|
state.installed ? h('div', { className: 'dnt-update-version' },
|
|
1161
1168
|
h('span', null, `${t('installedVersion')} ${state.installed}`),
|
|
1162
1169
|
state.candidate ? h('span', null, `${t('newVersion')} ${state.candidate}`) : null) : null,
|
|
1163
|
-
|
|
1170
|
+
h('p', { className: 'dnt-note', role: 'status' }, t(`update_${state.phase}`)),
|
|
1164
1171
|
state.error ? h('p', { className: 'dnt-note', style: S.error, role: 'alert' }, state.error === 'updateSaveFirst' ? t(state.error) : state.error) : null),
|
|
1165
1172
|
h('div', { className: 'dnt-update-actions' },
|
|
1166
1173
|
h('button', { type: 'button', style: S.button, disabled: busy || state.phase === 'restart', onClick: props.checkUpdate }, t('checkUpdate')),
|
|
1167
1174
|
state.phase === 'available' ? h('button', { type: 'button', style: { ...S.button, background: 'var(--dnt-accent)', color: '#fff', borderColor: 'transparent' }, onClick: props.installUpdate }, t('installUpdate')) : null)),
|
|
1168
|
-
h('p', { className: 'dnt-note', style: { marginTop: 12 } }, t('updateHint')))
|
|
1175
|
+
state.phase === 'unavailable' || state.phase === 'local' ? null : h('p', { className: 'dnt-note', style: { marginTop: 12 } }, t('updateHint')))
|
|
1169
1176
|
}
|
|
1170
1177
|
|
|
1171
1178
|
function WhaleIcon({ size = 16 }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-notify-tray",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "DeepSeek Harness 通知 + 状态栏插件:任务完成、需要输入、需要选择时弹系统通知(macOS / Windows / Linux);macOS 与 Linux(含 UOS、Deepin、麒麟)状态栏常驻小图标,显示任务进度与花费。Windows 没有状态栏,只弹通知。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek",
|