dsh-mailbox-local 0.3.1 → 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 +15 -5
- package/package.json +1 -1
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
|
-
'
|
|
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
|
|
package/package.json
CHANGED