dsh-clean-desktop-shell 0.1.13 → 0.1.14
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 +428 -422
- package/README.md +369 -363
- package/electron/main.js +12 -3
- package/electron/shortcut.js +4 -1
- package/electron/tray.js +26 -14
- package/package.json +3 -2
- package/version.txt +1 -1
package/electron/main.js
CHANGED
|
@@ -138,9 +138,18 @@ if (!gotLock) {
|
|
|
138
138
|
cancelId: 1,
|
|
139
139
|
})
|
|
140
140
|
if (choice === 0) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
try {
|
|
142
|
+
const ok = await createDesktopShortcut()
|
|
143
|
+
if (!ok) {
|
|
144
|
+
dialog.showErrorBox('创建快捷方式失败', '无法在桌面创建快捷方式。可稍后在托盘右键菜单中重试。')
|
|
145
|
+
}
|
|
146
|
+
} catch (err) {
|
|
147
|
+
// See tray.js: writeShortcutLink throws on some failures, and an
|
|
148
|
+
// unguarded rejection here would abort the rest of the ready chain.
|
|
149
|
+
dialog.showErrorBox(
|
|
150
|
+
'创建快捷方式失败',
|
|
151
|
+
`${err && err.message ? err.message : String(err)}\n\n可稍后在托盘右键菜单中重试。`,
|
|
152
|
+
)
|
|
144
153
|
}
|
|
145
154
|
}
|
|
146
155
|
}
|
package/electron/shortcut.js
CHANGED
|
@@ -52,8 +52,11 @@ export function shortcutSupported() {
|
|
|
52
52
|
* The user's real Desktop. app.getPath('desktop') resolves OneDrive
|
|
53
53
|
* redirection and roaming profile policies — a hardcoded ~/Desktop misses
|
|
54
54
|
* those and writes the shortcut where the user will never see it.
|
|
55
|
+
* Exported so callers can tell the user which folder actually received the
|
|
56
|
+
* .lnk (a shortcut written to a redirected Desktop is a classic
|
|
57
|
+
* "nothing happened" report).
|
|
55
58
|
*/
|
|
56
|
-
function desktopDir() {
|
|
59
|
+
export function desktopDir() {
|
|
57
60
|
try {
|
|
58
61
|
return app.getPath('desktop')
|
|
59
62
|
} catch {
|
package/electron/tray.js
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from './service.js'
|
|
21
21
|
import { showProgress, setProgress, closeProgress } from './progress.js'
|
|
22
22
|
import { checkForUpdatesAuto, openRepo } from './update.js'
|
|
23
|
-
import { shortcutSupported, createDesktopShortcut } from './shortcut.js'
|
|
23
|
+
import { shortcutSupported, createDesktopShortcut, desktopDir } from './shortcut.js'
|
|
24
24
|
|
|
25
25
|
const trayIconPath = join(
|
|
26
26
|
fileURLToPath(new URL('.', import.meta.url)),
|
|
@@ -71,19 +71,31 @@ export function refreshTrayMenu() {
|
|
|
71
71
|
label: '创建桌面快捷方式',
|
|
72
72
|
visible: shortcutSupported(),
|
|
73
73
|
click: async () => {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
74
|
+
try {
|
|
75
|
+
const ok = await createDesktopShortcut()
|
|
76
|
+
if (ok) {
|
|
77
|
+
dialog.showMessageBoxSync({
|
|
78
|
+
type: 'info',
|
|
79
|
+
title: '已创建',
|
|
80
|
+
message: '桌面快捷方式已创建。',
|
|
81
|
+
detail: `位置:${desktopDir()}`,
|
|
82
|
+
})
|
|
83
|
+
} else {
|
|
84
|
+
dialog.showMessageBoxSync({
|
|
85
|
+
type: 'warning',
|
|
86
|
+
title: '创建失败',
|
|
87
|
+
message: '无法创建桌面快捷方式,请稍后重试。',
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
} catch (err) {
|
|
91
|
+
// shell.writeShortcutLink throws (instead of returning false) for
|
|
92
|
+
// several failure modes. Without this guard the rejection is
|
|
93
|
+
// swallowed by the async click handler and the menu item looks like
|
|
94
|
+
// it did nothing at all.
|
|
95
|
+
dialog.showErrorBox(
|
|
96
|
+
'创建桌面快捷方式失败',
|
|
97
|
+
`${err && err.message ? err.message : String(err)}\n\n位置:${desktopDir()}`,
|
|
98
|
+
)
|
|
87
99
|
}
|
|
88
100
|
},
|
|
89
101
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-clean-desktop-shell",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "Clean desktop shell for DeepSeek Harness (DSH) as a DSH plugin — wraps your web profile in a native window, tray-managed backend, offline auto-reconnect, zero visual changes. DSH 插件形态的纯净桌面壳:复用现有 web profile,托盘管理后端,零视觉改造。",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -50,9 +50,10 @@
|
|
|
50
50
|
"dsh": ">=0.1.1 <0.2.0",
|
|
51
51
|
"dshReleases": {
|
|
52
52
|
"0.1.1-rc.2": "unknown",
|
|
53
|
+
"0.1.5-alpha.2": "unknown",
|
|
53
54
|
"0.1.5-rc.1": "compatible",
|
|
54
55
|
"0.1.5-rc.2": "unknown",
|
|
55
|
-
"0.1.5-
|
|
56
|
+
"0.1.5-rc.3": "compatible"
|
|
56
57
|
}
|
|
57
58
|
},
|
|
58
59
|
"client": {
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.14
|