dsh-wb-desk 0.1.1 → 0.1.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.
- package/CHANGELOG.md +13 -0
- package/README.en.md +0 -9
- package/README.md +0 -9
- package/client.js +2 -0
- package/lib/index.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
本文件记录本插件的重要改动。格式参考 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),
|
|
4
4
|
版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
5
5
|
|
|
6
|
+
## [0.1.3] - 2026-11-20
|
|
7
|
+
|
|
8
|
+
### 新增
|
|
9
|
+
|
|
10
|
+
- 文件与本地产物行的「⋯」菜单新增「打开所在文件夹」,不必先打开文件再定位。
|
|
11
|
+
|
|
12
|
+
## [0.1.2] - 2026-11-20
|
|
13
|
+
|
|
14
|
+
### 修复
|
|
15
|
+
|
|
16
|
+
- 「用默认应用打开」「打开所在文件夹」点了没反应:本地产物的绝对路径存的是正斜杠,
|
|
17
|
+
Windows 的 `explorer.exe` 不认正斜杠会静默失败;调起前统一转成反斜杠。
|
|
18
|
+
|
|
6
19
|
## [0.1.1] - 2026-11-20
|
|
7
20
|
|
|
8
21
|
### 变更
|
package/README.en.md
CHANGED
|
@@ -57,15 +57,6 @@ Fully quit DSH (including the tray background process) and restart.
|
|
|
57
57
|
- No in-browser Office editing (use the empty templates with your local Office)
|
|
58
58
|
- Unrelated to `dsh-wb` (WorkBuddy bridge) and `dsh-desk` (desktop edition); the similar names are coincidental
|
|
59
59
|
|
|
60
|
-
## Development
|
|
61
|
-
|
|
62
|
-
```sh
|
|
63
|
-
npm install --ignore-scripts
|
|
64
|
-
npm run build # tsdown compiles src/index.ts → lib/index.js; client.js ships as-is
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Host-side changes require a DSH restart; `client.js` changes only need a page refresh. Open `preview.html` in the repo root for a mocked design preview.
|
|
68
|
-
|
|
69
60
|
## License
|
|
70
61
|
|
|
71
62
|
MIT
|
package/README.md
CHANGED
|
@@ -65,15 +65,6 @@ dsh plugin --profile desktop add github:elegant01/dsh-wb-desk
|
|
|
65
65
|
- 不做 Office 文档在线编辑(新建的空模板请用本机 Office 打开)
|
|
66
66
|
- 与 `dsh-wb`(WorkBuddy 桥接插件)、`dsh-desk`(桌面发行版)无任何关联,名字相邻纯属查找时的巧合
|
|
67
67
|
|
|
68
|
-
## 开发
|
|
69
|
-
|
|
70
|
-
```sh
|
|
71
|
-
npm install --ignore-scripts
|
|
72
|
-
npm run build # tsdown 编译 src/index.ts → lib/index.js;client.js 免构建直发
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
宿主改动必须重启 DSH;`client.js` 改动刷新页面即可。设计验证可打开仓库根目录的 `preview.html`(mock 数据)。
|
|
76
|
-
|
|
77
68
|
## License
|
|
78
69
|
|
|
79
70
|
MIT
|
package/client.js
CHANGED
|
@@ -938,6 +938,7 @@ window.__ModuleLoader__.load({
|
|
|
938
938
|
: menu.kind === 'artifact'
|
|
939
939
|
? [
|
|
940
940
|
item('打开', () => { setMenu(null); openDrawer(node.path, node.abs) }, false, Icon.doc(15)),
|
|
941
|
+
item('打开所在文件夹', () => { setMenu(null); openExternal(node.path, !!node.abs, 'folder') }, false, Icon.folder(15)),
|
|
941
942
|
item('复制路径', () => { copyText(node.path, '路径已复制'); setMenu(null) }, false, Icon.copy(15)),
|
|
942
943
|
item('上传到云端', () => { setMenu(null); uploadToCloud(node.path, node.abs) }, false, Icon.upload(15)),
|
|
943
944
|
item('添加到任务', () => { setMenu(null); addToTask(node.path, node.abs) }, false, Icon.task(15)),
|
|
@@ -946,6 +947,7 @@ window.__ModuleLoader__.load({
|
|
|
946
947
|
: [
|
|
947
948
|
!isDir && item('打开', () => { setMenu(null); overlay ? openDrawer(node.path) : openFile(node.path) }),
|
|
948
949
|
isDir && item('打开文件夹', () => { setCwd(node.path); setSection('files'); setMenu(null) }),
|
|
950
|
+
!isDir && item('打开所在文件夹', () => { setMenu(null); openExternal(node.path, false, 'folder') }, false, Icon.folder(15)),
|
|
949
951
|
item('重命名', () => startRename(node)),
|
|
950
952
|
item('复制路径', () => { copyText(node.path, '路径已复制'); setMenu(null) }, false, Icon.copy(15)),
|
|
951
953
|
!isDir && item('上传到云端', () => { setMenu(null); uploadToCloud(node.path, false) }, false, Icon.upload(15)),
|
package/lib/index.js
CHANGED
|
@@ -1662,7 +1662,8 @@ function registerRoutes(ctx) {
|
|
|
1662
1662
|
const isDir = statSync(abs).isDirectory();
|
|
1663
1663
|
const win = process.platform === "win32";
|
|
1664
1664
|
const cmd = win ? "explorer.exe" : process.platform === "darwin" ? "open" : "xdg-open";
|
|
1665
|
-
const
|
|
1665
|
+
const target = win ? abs.replaceAll("/", "\\") : abs;
|
|
1666
|
+
const args = wantFolder && !isDir ? win ? ["/select,", target] : [dirname(abs)] : [target];
|
|
1666
1667
|
try {
|
|
1667
1668
|
spawn(cmd, args, {
|
|
1668
1669
|
detached: true,
|