dsh-copy-toast 0.6.0 → 0.6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.1
4
+
5
+ - README 的「安装」改成两条路:从 npm 装(`pnpm add dsh-copy-toast` + 把包名写进 `dsh.profile.bundles`)与从源码目录装(`tools/register.mjs` + `tools/link.mjs`)。`tools/` 不进 npm 包,所以之前的说明对 npm 安装者是空的。
6
+ - 补上全局提示的前提说明:需要本机有 Electron(DSH 桌面版自带),否则只剩窗口内提示。
7
+
3
8
  ## 0.6.0
4
9
 
5
10
  - package.json 的 files 补上 runtime 与 assets:之前只打包 lib,即使发布到 npm 也会缺 Electron 副窗(runtime/electron-helper/)与立绘素材,全局提示会直接失效。
package/README.md CHANGED
@@ -23,16 +23,39 @@
23
23
 
24
24
  ## 安装
25
25
 
26
- 插件已经是本机 profile 的一部分(`~/.dsh/profiles/desktop/package.json` 的 dependencies + `dsh.profile.bundles`),并已在 `node_modules` 里建好 junction。换机器时:
26
+ ### 从 npm 装(推荐)
27
+
28
+ 插件已发布到公共 registry:<https://www.npmjs.com/package/dsh-copy-toast>(现行版本 0.6.0)。在 profile 目录里装:
29
+
30
+ ```bash
31
+ cd ~/.dsh/profiles/desktop
32
+ pnpm add dsh-copy-toast
33
+ ```
34
+
35
+ 再把包名加进同一个 `package.json` 的 `dsh.profile.bundles` 数组:
36
+
37
+ ```json
38
+ {
39
+ "dsh": { "profile": { "bundles": ["...已有项", "dsh-copy-toast"] } }
40
+ }
41
+ ```
42
+
43
+ 重启 DSH(关掉窗口再打开)即生效。若启动时提示缺模块,再在 profile 目录跑一次 `pnpm install`。
44
+
45
+ ### 从源码目录装
46
+
47
+ 把本仓库放进 `plugins/dsh-copy-toast`,然后:
27
48
 
28
49
  ```bash
29
50
  node tools/register.mjs # 写入 profile 的 dependencies 与 bundles
30
51
  node tools/link.mjs # 在 profile 的 node_modules 里建 junction
31
52
  ```
32
53
 
33
- 然后重启 DSH(关掉窗口再打开),插件即生效。
54
+ `tools/` 不进 npm 包,只有源码目录里才有这两个脚本。
55
+
56
+ ### 全局提示的前提
34
57
 
35
- 全局提示需要本机有 Electron(DSH 自带的那份即可:`~/.dsh/electron/electron.exe`)。也可以用环境变量 `DSH_COPY_TOAST_ELECTRON` 指定别的可执行文件。
58
+ 全局提示(整个电脑)需要本机有 Electron。DSH 桌面版自带一份(`~/.dsh/electron/electron.exe`),装了 DSH 桌面版就不用额外准备;也可以用环境变量 `DSH_COPY_TOAST_ELECTRON` 指定别的可执行文件。没有 Electron 时插件仍可用,只是只剩 DSH 窗口内的提示。
36
59
 
37
60
  ## 开关
38
61
 
package/lib/client.js CHANGED
@@ -804,7 +804,7 @@ window.__ModuleLoader__.load({
804
804
  setEnabled: (value) => setEnabled(value),
805
805
  isGlobalEnabled: () => globalEnabled,
806
806
  setGlobalEnabled: (value) => setGlobalEnabled(value),
807
- version: '0.6.0',
807
+ version: '0.6.1',
808
808
  }
809
809
  } catch (e) {
810
810
  /* ignore */
package/lib/index.js CHANGED
@@ -289,7 +289,7 @@ async function handle(req, res) {
289
289
  const state = readState()
290
290
  return json(res, 200, {
291
291
  ok: true,
292
- version: '0.6.0',
292
+ version: '0.6.1',
293
293
  running: helperAlive(),
294
294
  port: state ? state.port : 0,
295
295
  pid: state ? state.pid : 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-copy-toast",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "带 Q 版立绘头像的「复制成功」顶层提示:任何界面(含欢迎页)一点复制,就在页面最上层弹出小卡片,带进度条、悬停暂停、堆叠与点击关闭。纯本地,无网络请求。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",