dsh-mailbox-local 0.3.0 → 0.3.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/client.js CHANGED
@@ -89,6 +89,20 @@ window.__ModuleLoader__.load({
89
89
  loadCfg()
90
90
  }, [])
91
91
 
92
+ // 原文浮层开着时,Esc 只关浮层:用 window 捕获阶段拦下来,别让它冒泡到设置面板把整个插件页关掉
93
+ useEffect(() => {
94
+ if (!docView) return undefined
95
+ const onKey = (e) => {
96
+ if (e.key !== 'Escape' && e.key !== 'Esc') return
97
+ e.preventDefault()
98
+ e.stopPropagation()
99
+ if (typeof e.stopImmediatePropagation === 'function') e.stopImmediatePropagation()
100
+ setDocView(null)
101
+ }
102
+ window.addEventListener('keydown', onKey, true)
103
+ return () => window.removeEventListener('keydown', onKey, true)
104
+ }, [docView])
105
+
92
106
  const savePath = async (value) => {
93
107
  setSavingPath(true)
94
108
  try {
@@ -161,10 +175,7 @@ window.__ModuleLoader__.load({
161
175
  h('button', { style: S.btn, onClick: load }, '刷新'),
162
176
  ),
163
177
  h('div', { style: { fontSize: 12, color: '#555', lineHeight: 1.7, marginBottom: 10 } },
164
- '同一台机器上的两只 agent 互相留信的地方:一只把事写成信投进去,另一只在它那段对话里收到一句提醒,点开就是全文。谁先搬走那封信,谁负责回执——人不用在窗口之间来回搬运,也不用复制粘贴。',
165
- ),
166
- h('div', { style: { fontSize: 12, color: '#555', lineHeight: 1.7, marginBottom: 10 } },
167
- '下面这块看板只读一个 markdown 表格:一行一件事,状态是进行中 / 待办 / 搁置 / 已完成,后面跟回执、最近改动和文件名。点每行右边「原文」能看那一份的全文。',
178
+ '一行一件事;点右边「原文」看那一份的全文(Esc 关掉)。',
168
179
  ),
169
180
  h('div', { style: S.card },
170
181
  h('div', { style: { ...S.dim, marginBottom: 6 } }, '看板文件'),
@@ -215,7 +226,6 @@ window.__ModuleLoader__.load({
215
226
  h('pre', { style: { flex: 1, margin: 0, overflow: 'auto', background: '#0f1620', color: '#dbe4ee', border: '1px solid #2a3644', borderRadius: 6, padding: 12, fontSize: 12, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, docView.text),
216
227
  )
217
228
  : null,
218
- h('div', { style: S.dim }, '这个面板只读一个 markdown 看板:表格里「状态」那列是进行中 / 待办 / 搁置 / 已完成,一行一件事,后面跟回执、最近改动、文件名。谁生成、放在哪都能配——默认找信箱目录下的「工单看板.md」。'),
219
229
  )
220
230
  }
221
231
 
@@ -0,0 +1,9 @@
1
+ - insert:
2
+ - id: dsh-mailbox-local
3
+ name: dsh-mailbox-local
4
+ config:
5
+ dir: ""
6
+ ordersFile: ""
7
+ expireHours: 24
8
+ scanSeconds: 20
9
+ notify: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mailbox-local",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "同机信箱:同一台机器上的两只 agent 互相留信、派活、回执,不靠人转手;附一个只读的工单看板。Mailbox for agents on one machine, plus a read-only work-order board.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -14,6 +14,7 @@
14
14
  "index.js",
15
15
  "client.js",
16
16
  "icon.svg",
17
+ "cordis.patch.yml",
17
18
  "lib",
18
19
  "locale/*.json",
19
20
  "README.md"
@@ -32,7 +33,7 @@
32
33
  ],
33
34
  "author": "鹿野 <luye@dsh.local>",
34
35
  "license": "MIT",
35
- "homepage": "https://github.com/heiyedehen/dsh-mailbox-local",
36
+ "homepage": "https://github.com/heiyedehen/dsh-mailbox-local",
36
37
  "repository": {
37
38
  "type": "git",
38
39
  "url": "git+https://github.com/heiyedehen/dsh-mailbox-local.git"