dsh-wb-desk 0.1.0 → 0.1.2
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 +14 -0
- package/README.en.md +0 -9
- package/README.md +0 -9
- package/client.js +8 -2
- package/lib/index.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
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.2] - 2026-11-20
|
|
7
|
+
|
|
8
|
+
### 修复
|
|
9
|
+
|
|
10
|
+
- 「用默认应用打开」「打开所在文件夹」点了没反应:本地产物的绝对路径存的是正斜杠,
|
|
11
|
+
Windows 的 `explorer.exe` 不认正斜杠会静默失败;调起前统一转成反斜杠。
|
|
12
|
+
|
|
13
|
+
## [0.1.1] - 2026-11-20
|
|
14
|
+
|
|
15
|
+
### 变更
|
|
16
|
+
|
|
17
|
+
- 本地产物列表:工作区分组行显示该工作区所有产物的总大小。
|
|
18
|
+
- 本地产物列表:会话分组标题去掉「会话」前缀,直接显示会话标题。
|
|
19
|
+
|
|
6
20
|
## [0.1.0] - 2026-11-19
|
|
7
21
|
|
|
8
22
|
首个公开版本。
|
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
|
@@ -491,6 +491,11 @@ window.__ModuleLoader__.load({
|
|
|
491
491
|
}
|
|
492
492
|
return m
|
|
493
493
|
}, [artifacts])
|
|
494
|
+
/* 产物大小:优先 /artifacts 的 stat,落库文件回退全库元信息 */
|
|
495
|
+
const artSize = (a) => (
|
|
496
|
+
typeof a.size === 'number' ? a.size
|
|
497
|
+
: (a.libPath ? (treeMeta[a.libPath]?.size ?? allMeta[a.libPath]?.size) : undefined)
|
|
498
|
+
) || 0
|
|
494
499
|
/* 统一取元信息:树(我的资料)→ 全库(含 inbox)→ 产物台账/索引 */
|
|
495
500
|
const metaFor = (p, abs) => (
|
|
496
501
|
abs ? artifactsMeta[normPath(p)]
|
|
@@ -1213,6 +1218,7 @@ window.__ModuleLoader__.load({
|
|
|
1213
1218
|
: artifactGroups.map(g => {
|
|
1214
1219
|
const wsOpen = openGroups.has('ws:' + g.ws)
|
|
1215
1220
|
const wsCount = g.sessions.reduce((n, s) => n + s.items.length, 0)
|
|
1221
|
+
const wsSize = g.sessions.reduce((n, s) => n + s.items.reduce((m, a) => m + artSize(a), 0), 0)
|
|
1216
1222
|
return h('div', { key: g.ws },
|
|
1217
1223
|
h('div', { className: 'wb-row wb-row-group', onClick: () => toggleGroup('ws:' + g.ws) },
|
|
1218
1224
|
h('span', { className: 'wb-chevron' + (wsOpen ? ' open' : '') }, Icon.chevron(14)),
|
|
@@ -1223,7 +1229,7 @@ window.__ModuleLoader__.load({
|
|
|
1223
1229
|
h('span', { className: 'wb-col wb-col-type' }),
|
|
1224
1230
|
h('span', { className: 'wb-col wb-col-author' }),
|
|
1225
1231
|
h('span', { className: 'wb-col wb-col-time' }, fmtTime(Date.parse(g.latest) || 0)),
|
|
1226
|
-
h('span', { className: 'wb-col wb-col-size' }),
|
|
1232
|
+
h('span', { className: 'wb-col wb-col-size' }, wsSize ? fmtSize(wsSize) : ''),
|
|
1227
1233
|
h('span', { className: 'wb-col-actions' })),
|
|
1228
1234
|
wsOpen && g.sessions.map(s => {
|
|
1229
1235
|
const sOpen = openGroups.has('s:' + g.ws + ' ' + s.sid)
|
|
@@ -1232,7 +1238,7 @@ window.__ModuleLoader__.load({
|
|
|
1232
1238
|
h('span', { className: 'wb-chevron' + (sOpen ? ' open' : '') }, Icon.chevron(14)),
|
|
1233
1239
|
h('span', { className: 'wb-col-name' },
|
|
1234
1240
|
Icon.robot(18),
|
|
1235
|
-
h('span', { className: 'wb-filename' },
|
|
1241
|
+
h('span', { className: 'wb-filename' }, s.sid),
|
|
1236
1242
|
h('span', { className: 'wb-pill' }, s.items.length + ' 个产物')),
|
|
1237
1243
|
h('span', { className: 'wb-col wb-col-type' }),
|
|
1238
1244
|
h('span', { className: 'wb-col wb-col-author' }),
|
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,
|