@allbluecn/web-app 0.27.5 → 0.27.7
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/package.json +1 -1
- package/src/components/{quick-capture/__tests__/quick-capture-panel.test.tsx → mini-quick-panel/__tests__/mini-quick-panel.test.tsx} +66 -8
- package/src/components/{quick-capture/quick-capture-panel.tsx → mini-quick-panel/mini-quick-panel.tsx} +104 -23
- package/src/lib/changelog/sdk-versions.ts +1 -1
- package/src/lib/desktop-bridge-types.ts +4 -0
- package/src/paraglide/messages/_index.js +3 -0
- package/src/paraglide/messages/quick_capture_comingsoon1.js +30 -0
- package/src/paraglide/messages/quick_capture_hint.js +3 -3
- package/src/paraglide/messages/quick_capture_tabbug1.js +30 -0
- package/src/paraglide/messages/quick_capture_tabtask1.js +30 -0
- package/src/routes/quick-capture/route.lazy.tsx +1 -1
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
// 桌面托盘 mini 快捷记录面板(QuickCapturePanel):
|
|
18
|
+
// 桌面托盘 mini 快捷记录面板(MiniQuickPanel 组件,历史名 QuickCapturePanel):
|
|
19
19
|
// 1) 顶部栏(logo + 「mini 面板」)+ 默认预选独立需求 + 标题占位 + 快捷键文案
|
|
20
20
|
// 2) 标题 Enter 提交:quickCaptureStoryFn 收到显式 projectId 与内联字段缺省值
|
|
21
21
|
// 3) 纯空白标题 Enter 不保存
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
// 15) 请求在途期间再 Enter 不重复提交
|
|
34
34
|
// 富文本编辑器 / AI 工具栏 / 内联编辑器在 jsdom 以替身注入。
|
|
35
35
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
|
36
|
-
import { act, cleanup, render, screen, waitFor } from '@testing-library/react'
|
|
36
|
+
import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'
|
|
37
37
|
import userEvent from '@testing-library/user-event'
|
|
38
38
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
|
39
39
|
|
|
@@ -48,9 +48,11 @@ const listLabelsFnMock = vi.hoisted(() => vi.fn())
|
|
|
48
48
|
const bridgeStub = vi.hoisted(() => {
|
|
49
49
|
const unsubMiniPanelMode = vi.fn()
|
|
50
50
|
const unsubMiniPanelPinned = vi.fn()
|
|
51
|
+
const unsubMiniPanelShown = vi.fn()
|
|
51
52
|
return {
|
|
52
53
|
unsubMiniPanelMode,
|
|
53
54
|
unsubMiniPanelPinned,
|
|
55
|
+
unsubMiniPanelShown,
|
|
54
56
|
window: vi.fn(),
|
|
55
57
|
notifyQuickCapture: vi.fn(),
|
|
56
58
|
setMiniPanelPinned: vi.fn(),
|
|
@@ -59,6 +61,7 @@ const bridgeStub = vi.hoisted(() => {
|
|
|
59
61
|
quitApp: vi.fn(),
|
|
60
62
|
onMiniPanelMode: vi.fn((_cb: (mode: string) => void) => unsubMiniPanelMode),
|
|
61
63
|
onMiniPanelPinned: vi.fn((_cb: (pinned: boolean) => void) => unsubMiniPanelPinned),
|
|
64
|
+
onMiniPanelShown: vi.fn((_cb: () => void) => unsubMiniPanelShown),
|
|
62
65
|
}
|
|
63
66
|
})
|
|
64
67
|
|
|
@@ -134,7 +137,7 @@ vi.mock('@/components/story/inline-editors', () => ({
|
|
|
134
137
|
),
|
|
135
138
|
}))
|
|
136
139
|
|
|
137
|
-
import { QuickCapturePanel } from '../quick-
|
|
140
|
+
import { QuickCapturePanel } from '../mini-quick-panel'
|
|
138
141
|
|
|
139
142
|
function renderPanel(initialMode: 'story' | 'inspiration' = 'story') {
|
|
140
143
|
const client = new QueryClient({ defaultOptions: { queries: { retry: false } } })
|
|
@@ -156,16 +159,32 @@ beforeEach(() => {
|
|
|
156
159
|
afterEach(() => cleanup())
|
|
157
160
|
|
|
158
161
|
describe('QuickCapturePanel', () => {
|
|
159
|
-
it('渲染顶部栏(logo + mini
|
|
162
|
+
it('渲染顶部栏(logo + mini 面板)、三个类型 tab、默认预选独立需求与快捷键文案', async () => {
|
|
160
163
|
renderPanel()
|
|
161
164
|
expect(screen.getAllByAltText('AllBlue').length).toBeGreaterThan(0)
|
|
162
165
|
expect(screen.getByText('mini 面板')).toBeTruthy()
|
|
163
|
-
//
|
|
164
|
-
expect(screen.
|
|
165
|
-
expect(screen.
|
|
166
|
+
// 类型 tab:需求/灵感(当前)、BUG、任务(占位)
|
|
167
|
+
expect(screen.getByRole('button', { name: '需求/灵感' })).toBeTruthy()
|
|
168
|
+
expect(screen.getByRole('button', { name: 'BUG' })).toBeTruthy()
|
|
169
|
+
expect(screen.getByRole('button', { name: '任务' })).toBeTruthy()
|
|
166
170
|
expect(await screen.findByText('独立需求')).toBeTruthy()
|
|
167
171
|
expect(screen.getByPlaceholderText('标题')).toBeTruthy()
|
|
168
|
-
expect(screen.getByText('Enter 记录 ·
|
|
172
|
+
expect(screen.getByText('Enter 记录 · ⌘+Enter 编辑区提交 · Esc 关闭')).toBeTruthy()
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
it('类型 tab:切到 BUG/任务显示占位,切回需求/灵感表单仍在', async () => {
|
|
176
|
+
const user = userEvent.setup()
|
|
177
|
+
const { container } = renderPanel()
|
|
178
|
+
await screen.findByText('独立需求')
|
|
179
|
+
expect(container.querySelector('input[placeholder="标题"]')).toBeTruthy()
|
|
180
|
+
await user.click(screen.getByRole('button', { name: 'BUG' }))
|
|
181
|
+
expect(screen.getByText('该类型记录即将上线,敬请期待')).toBeTruthy()
|
|
182
|
+
expect(container.querySelector('input[placeholder="标题"]')).toBeNull()
|
|
183
|
+
expect(screen.queryByRole('button', { name: '记录' })).toBeNull()
|
|
184
|
+
await user.click(screen.getByRole('button', { name: '任务' }))
|
|
185
|
+
expect(screen.getByText('该类型记录即将上线,敬请期待')).toBeTruthy()
|
|
186
|
+
await user.click(screen.getByRole('button', { name: '需求/灵感' }))
|
|
187
|
+
expect(container.querySelector('input[placeholder="标题"]')).toBeTruthy()
|
|
169
188
|
})
|
|
170
189
|
|
|
171
190
|
it('标题 Enter 提交:带默认独立需求 projectId 与内联字段缺省值', async () => {
|
|
@@ -197,6 +216,45 @@ describe('QuickCapturePanel', () => {
|
|
|
197
216
|
expect(quickCaptureStoryFnMock).not.toHaveBeenCalled()
|
|
198
217
|
})
|
|
199
218
|
|
|
219
|
+
it('失焦状态(焦点不在输入框)Enter 也提交', async () => {
|
|
220
|
+
const { container } = renderPanel()
|
|
221
|
+
await screen.findByText('独立需求')
|
|
222
|
+
fireEvent.change(screen.getByPlaceholderText('标题'), { target: { value: '失焦提交' } })
|
|
223
|
+
// 模拟焦点移到面板容器(非输入框、非按钮)后按 Enter
|
|
224
|
+
fireEvent.keyDown(container.firstElementChild as HTMLElement, { key: 'Enter' })
|
|
225
|
+
await waitFor(() =>
|
|
226
|
+
expect(quickCaptureStoryFnMock).toHaveBeenCalledWith({
|
|
227
|
+
data: expect.objectContaining({ name: '失焦提交' }),
|
|
228
|
+
}),
|
|
229
|
+
)
|
|
230
|
+
})
|
|
231
|
+
|
|
232
|
+
it('描述编辑器内:Enter 换行不提交,⌘+Enter 提交', async () => {
|
|
233
|
+
renderPanel()
|
|
234
|
+
await screen.findByText('独立需求')
|
|
235
|
+
fireEvent.change(screen.getByPlaceholderText('标题'), { target: { value: '编辑器提交' } })
|
|
236
|
+
const editor = screen.getByTestId('description-editor')
|
|
237
|
+
fireEvent.keyDown(editor, { key: 'Enter' })
|
|
238
|
+
expect(quickCaptureStoryFnMock).not.toHaveBeenCalled()
|
|
239
|
+
fireEvent.keyDown(editor, { key: 'Enter', metaKey: true })
|
|
240
|
+
await waitFor(() =>
|
|
241
|
+
expect(quickCaptureStoryFnMock).toHaveBeenCalledWith({
|
|
242
|
+
data: expect.objectContaining({ name: '编辑器提交' }),
|
|
243
|
+
}),
|
|
244
|
+
)
|
|
245
|
+
})
|
|
246
|
+
|
|
247
|
+
it('main 推送 panel-shown → 标题框重新聚焦', async () => {
|
|
248
|
+
renderPanel()
|
|
249
|
+
await screen.findByText('独立需求')
|
|
250
|
+
const input = screen.getByPlaceholderText('标题') as HTMLInputElement
|
|
251
|
+
input.blur()
|
|
252
|
+
const shownCb = bridgeStub.onMiniPanelShown.mock.calls[0]?.[0]
|
|
253
|
+
expect(shownCb).toBeTypeOf('function')
|
|
254
|
+
act(() => shownCb?.())
|
|
255
|
+
expect(document.activeElement).toBe(input)
|
|
256
|
+
})
|
|
257
|
+
|
|
200
258
|
it('项目下拉选中「灵感箱」:Popover 自动关闭,保存传 kind=inspiration 且无 projectId', async () => {
|
|
201
259
|
const user = userEvent.setup()
|
|
202
260
|
renderPanel()
|
|
@@ -66,6 +66,9 @@ import {
|
|
|
66
66
|
|
|
67
67
|
export type QuickCaptureMode = "story" | "inspiration"
|
|
68
68
|
|
|
69
|
+
/** 面板类型 tab:需求/灵感(story/inspiration 共用)、BUG、任务 */
|
|
70
|
+
type QuickCaptureTab = "story" | "bug" | "task"
|
|
71
|
+
|
|
69
72
|
/** 保存成功反馈(已记录 IDENTIFIER)自动清除时长 */
|
|
70
73
|
const FEEDBACK_CLEAR_MS = 1500
|
|
71
74
|
|
|
@@ -109,6 +112,8 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
109
112
|
// 表现为 Enter/Esc 时好时坏)。挂载后再渲染工具栏。
|
|
110
113
|
const [mounted, setMounted] = useState(false)
|
|
111
114
|
const [appVersion, setAppVersion] = useState("")
|
|
115
|
+
// 类型 tab:story = 需求/灵感(本期),bug / task 占位(后续完善)
|
|
116
|
+
const [activeTab, setActiveTab] = useState<QuickCaptureTab>("story")
|
|
112
117
|
|
|
113
118
|
const feedbackTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null)
|
|
114
119
|
// 保存防重:请求在途(标题尚未清空)期间忽略再次提交,防重复落库
|
|
@@ -171,6 +176,8 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
171
176
|
const unsubscribe = bridge?.onMiniPanelMode?.((next) => {
|
|
172
177
|
const pick = pickForMode(next)
|
|
173
178
|
if (pick) setProjectPick(pick)
|
|
179
|
+
// 托盘菜单「快捷记录」→ 始终切回需求/灵感 tab
|
|
180
|
+
setActiveTab("story")
|
|
174
181
|
})
|
|
175
182
|
return () => unsubscribe?.()
|
|
176
183
|
}, [pickForMode])
|
|
@@ -187,19 +194,41 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
187
194
|
setMounted(true)
|
|
188
195
|
}, [])
|
|
189
196
|
|
|
190
|
-
//
|
|
191
|
-
//
|
|
192
|
-
//
|
|
193
|
-
//
|
|
197
|
+
// 焦点管理:面板每次显示/获得焦点时把焦点放到标题框。否则焦点停在第一个
|
|
198
|
+
// 可聚焦元素(顶部图钉按钮)——表现为图钉出现 focus ring、Enter/Esc 落到
|
|
199
|
+
// 按钮上(快捷键像失效)。三重触发覆盖窗口生命周期:
|
|
200
|
+
// ① mount(首次加载);② main 每次 presentPanel 推送 shown(mini 窗口单例
|
|
201
|
+
// 复用、组件不重挂载,mount 只跑一次——这是用户实测「还是落在图钉上」的根因);
|
|
202
|
+
// ③ visibilitychange(窗口 hide→show 的可见性切换兜底)。
|
|
203
|
+
// 用户正在其他输入控件里编辑时不抢焦点。
|
|
194
204
|
useEffect(() => {
|
|
195
205
|
const focusTitle = () => {
|
|
196
|
-
const active = document.activeElement
|
|
197
|
-
|
|
198
|
-
|
|
206
|
+
const active = document.activeElement as HTMLElement | null
|
|
207
|
+
const isEditing =
|
|
208
|
+
!!active &&
|
|
209
|
+
(active.tagName === 'INPUT' ||
|
|
210
|
+
active.tagName === 'TEXTAREA' ||
|
|
211
|
+
active.isContentEditable)
|
|
212
|
+
if (isEditing && active !== titleInputRef.current) return
|
|
213
|
+
titleInputRef.current?.focus({ preventScroll: true })
|
|
214
|
+
}
|
|
215
|
+
// shown 处理带延迟二次聚焦:webContents.focus 的焦点重置与渲染端 IPC 派发
|
|
216
|
+
// 的先后不保证,rAF + 60ms 兜底确保标题框是最终焦点
|
|
217
|
+
const focusTitleTrailing = () => {
|
|
218
|
+
focusTitle()
|
|
219
|
+
requestAnimationFrame(() => focusTitle())
|
|
220
|
+
setTimeout(focusTitle, 60)
|
|
199
221
|
}
|
|
200
222
|
focusTitle()
|
|
201
223
|
window.addEventListener('focus', focusTitle)
|
|
202
|
-
|
|
224
|
+
document.addEventListener('visibilitychange', focusTitle)
|
|
225
|
+
const bridge = getDesktopBridge()
|
|
226
|
+
const unsubscribe = bridge?.onMiniPanelShown?.(focusTitleTrailing)
|
|
227
|
+
return () => {
|
|
228
|
+
window.removeEventListener('focus', focusTitle)
|
|
229
|
+
document.removeEventListener('visibilitychange', focusTitle)
|
|
230
|
+
unsubscribe?.()
|
|
231
|
+
}
|
|
203
232
|
}, [])
|
|
204
233
|
|
|
205
234
|
useEffect(() => {
|
|
@@ -292,20 +321,31 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
292
321
|
}
|
|
293
322
|
|
|
294
323
|
const handlePanelKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {
|
|
295
|
-
if (e.key
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
e.preventDefault()
|
|
299
|
-
const bridge = getDesktopBridge()
|
|
300
|
-
bridge?.window?.("hide")
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
// 标题框 Enter 提交(Shift+Enter 不拦截);描述编辑器内 Enter/Shift+Enter 由 TipTap 换行
|
|
304
|
-
const handleTitleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {
|
|
305
|
-
if (e.key === "Enter" && !e.shiftKey) {
|
|
324
|
+
if (e.key === "Escape") {
|
|
325
|
+
// 项目 Popover 展开时 Esc 只关 Popover(Base UI 自行处理),不收起整个面板
|
|
326
|
+
if (projectOpen) return
|
|
306
327
|
e.preventDefault()
|
|
307
|
-
|
|
328
|
+
const bridge = getDesktopBridge()
|
|
329
|
+
bridge?.window?.("hide")
|
|
330
|
+
return
|
|
308
331
|
}
|
|
332
|
+
if (e.key !== "Enter") return
|
|
333
|
+
const target = e.target as HTMLElement | null
|
|
334
|
+
// 描述编辑器内:普通 Enter 交给 TipTap 换行,仅 Mod+Enter(⌘/Ctrl)提交
|
|
335
|
+
if (editorWrapRef.current?.contains(target as Node)) {
|
|
336
|
+
if (e.metaKey || e.ctrlKey) {
|
|
337
|
+
e.preventDefault()
|
|
338
|
+
void save()
|
|
339
|
+
}
|
|
340
|
+
return
|
|
341
|
+
}
|
|
342
|
+
// 按钮上的 Enter 交给按钮自身(避免「钉按钮 + 记录」双重动作)
|
|
343
|
+
if (target?.tagName === "BUTTON") return
|
|
344
|
+
// 其余位置(标题框 / 失焦后的面板任意处):Enter 提交(Shift+Enter 不再
|
|
345
|
+
// 作为换行快捷键——描述框内换行直接用 Enter)
|
|
346
|
+
if (e.shiftKey) return
|
|
347
|
+
e.preventDefault()
|
|
348
|
+
void save()
|
|
309
349
|
}
|
|
310
350
|
|
|
311
351
|
const handlePickProject = (pick: ProjectPick) => {
|
|
@@ -315,6 +355,8 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
315
355
|
setExtraLabels([])
|
|
316
356
|
setProjectPick(pick)
|
|
317
357
|
setProjectOpen(false)
|
|
358
|
+
// 托盘菜单/设置菜单的「快捷记录需求/灵感」始终回到需求/灵感 tab
|
|
359
|
+
setActiveTab("story")
|
|
318
360
|
}
|
|
319
361
|
|
|
320
362
|
const togglePinned = () => {
|
|
@@ -349,7 +391,10 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
349
391
|
size="icon-sm"
|
|
350
392
|
aria-label={m.quick_capture_pin()}
|
|
351
393
|
aria-pressed={pinned}
|
|
352
|
-
|
|
394
|
+
// focus:outline-none:脚本聚焦路径(webContents.focus 重置到首个可
|
|
395
|
+
// 聚焦元素)落在图钉上时不再显示 UA 焦点框;键盘用户的可见焦点仍由
|
|
396
|
+
// shadcn 的 focus-visible:ring 提供,可访问性不受影响
|
|
397
|
+
className={pinned ? "text-primary focus:outline-none" : "focus:outline-none"}
|
|
353
398
|
onClick={togglePinned}
|
|
354
399
|
>
|
|
355
400
|
{pinned ? <PinOff className="size-4" /> : <Pin className="size-4" />}
|
|
@@ -362,6 +407,7 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
362
407
|
variant="ghost"
|
|
363
408
|
size="icon-sm"
|
|
364
409
|
aria-label={m.quick_capture_settings()}
|
|
410
|
+
className="focus:outline-none"
|
|
365
411
|
/>
|
|
366
412
|
}
|
|
367
413
|
>
|
|
@@ -403,7 +449,36 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
403
449
|
</div>
|
|
404
450
|
</header>
|
|
405
451
|
|
|
406
|
-
|
|
452
|
+
{/* 类型 tab:需求/灵感(本期)、BUG / 任务(占位,后续完善) */}
|
|
453
|
+
<div className="flex items-center gap-1 border-b border-border px-2 py-1.5">
|
|
454
|
+
<Button
|
|
455
|
+
type="button"
|
|
456
|
+
size="sm"
|
|
457
|
+
variant={activeTab === "story" ? "secondary" : "ghost"}
|
|
458
|
+
onClick={() => setActiveTab("story")}
|
|
459
|
+
>
|
|
460
|
+
{m.quick_capture_tabUnified()}
|
|
461
|
+
</Button>
|
|
462
|
+
<Button
|
|
463
|
+
type="button"
|
|
464
|
+
size="sm"
|
|
465
|
+
variant={activeTab === "bug" ? "secondary" : "ghost"}
|
|
466
|
+
onClick={() => setActiveTab("bug")}
|
|
467
|
+
>
|
|
468
|
+
{m.quick_capture_tabBug()}
|
|
469
|
+
</Button>
|
|
470
|
+
<Button
|
|
471
|
+
type="button"
|
|
472
|
+
size="sm"
|
|
473
|
+
variant={activeTab === "task" ? "secondary" : "ghost"}
|
|
474
|
+
onClick={() => setActiveTab("task")}
|
|
475
|
+
>
|
|
476
|
+
{m.quick_capture_tabTask()}
|
|
477
|
+
</Button>
|
|
478
|
+
</div>
|
|
479
|
+
|
|
480
|
+
{activeTab === "story" ? (
|
|
481
|
+
<div className="flex-1 space-y-3 overflow-y-auto p-3">
|
|
407
482
|
<Popover open={projectOpen} onOpenChange={setProjectOpen}>
|
|
408
483
|
<PopoverTrigger
|
|
409
484
|
render={
|
|
@@ -468,7 +543,6 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
468
543
|
ref={titleInputRef}
|
|
469
544
|
value={name}
|
|
470
545
|
onChange={(e) => setName(e.target.value)}
|
|
471
|
-
onKeyDown={handleTitleKeyDown}
|
|
472
546
|
placeholder={m.story_column_title()}
|
|
473
547
|
maxLength={200}
|
|
474
548
|
className="h-10 text-base md:text-lg"
|
|
@@ -552,7 +626,13 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
552
626
|
/>
|
|
553
627
|
</div>
|
|
554
628
|
</div>
|
|
629
|
+
) : (
|
|
630
|
+
<div className="flex flex-1 items-center justify-center p-4 text-center text-sm text-muted-foreground">
|
|
631
|
+
{m.quick_capture_comingSoon()}
|
|
632
|
+
</div>
|
|
633
|
+
)}
|
|
555
634
|
|
|
635
|
+
{activeTab === "story" && (
|
|
556
636
|
<footer className="space-y-1.5 border-t border-border p-2">
|
|
557
637
|
<Button
|
|
558
638
|
type="button"
|
|
@@ -568,6 +648,7 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
568
648
|
: m.quick_capture_hint()}
|
|
569
649
|
</div>
|
|
570
650
|
</footer>
|
|
651
|
+
)}
|
|
571
652
|
</div>
|
|
572
653
|
)
|
|
573
654
|
}
|
|
@@ -112,7 +112,7 @@ export const SDK_GROUPS: SdkGroup[] = [
|
|
|
112
112
|
"items": [
|
|
113
113
|
{
|
|
114
114
|
"name": "@allbluecn/web-app",
|
|
115
|
-
"version": "v0.27.
|
|
115
|
+
"version": "v0.27.7",
|
|
116
116
|
"lastUpdate": "Nov 5, 2026",
|
|
117
117
|
"source": "apps/web/package.json",
|
|
118
118
|
"docsUrl": "https://github.com/allbluecn/allblue"
|
|
@@ -110,6 +110,10 @@ export interface DesktopBridgeApi {
|
|
|
110
110
|
setMiniPanelPinned?: (pinned: boolean) => void
|
|
111
111
|
onMiniPanelPinned?: (cb: (pinned: boolean) => void) => () => void
|
|
112
112
|
popUpTrayMenu?: () => void
|
|
113
|
+
/** mini 面板每次显示(presentPanel)推送的**无参信号**:面板窗口单例复用、
|
|
114
|
+
* 组件不重挂载,渲染端据此重新聚焦标题框(否则 mini 窗口重新打开后焦点
|
|
115
|
+
* 仍停在最后一个聚焦元素/图钉按钮上)。订阅返回 unsubscribe。 */
|
|
116
|
+
onMiniPanelShown?: (cb: () => void) => () => void
|
|
113
117
|
/** mini 面板设置菜单(2026-11-05 追加,add-only):
|
|
114
118
|
* - openMainWindow:打开/前置主窗(菜单项「打开 AllBlue」);
|
|
115
119
|
* - quitApp:退出应用(菜单项「退出 AllBlue」,复用 before-quit 清理链)。
|
|
@@ -3547,6 +3547,7 @@ export * from './prototypepanel_mobile1.js'
|
|
|
3547
3547
|
export * from './prototypepanel_saving1.js'
|
|
3548
3548
|
export * from './prototypepanel_tablet1.js'
|
|
3549
3549
|
export * from './prototypepanel_title1.js'
|
|
3550
|
+
export * from './quick_capture_comingsoon1.js'
|
|
3550
3551
|
export * from './quick_capture_failed.js'
|
|
3551
3552
|
export * from './quick_capture_hint.js'
|
|
3552
3553
|
export * from './quick_capture_inbox.js'
|
|
@@ -3559,6 +3560,8 @@ export * from './quick_capture_quit.js'
|
|
|
3559
3560
|
export * from './quick_capture_saved.js'
|
|
3560
3561
|
export * from './quick_capture_settings.js'
|
|
3561
3562
|
export * from './quick_capture_submit.js'
|
|
3563
|
+
export * from './quick_capture_tabbug1.js'
|
|
3564
|
+
export * from './quick_capture_tabtask1.js'
|
|
3562
3565
|
export * from './quick_capture_tabunified1.js'
|
|
3563
3566
|
export * from './rightsidebar_collapse1.js'
|
|
3564
3567
|
export * from './rightsidebar_expand1.js'
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
|
3
|
+
|
|
4
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
5
|
+
|
|
6
|
+
/** @typedef {{}} Quick_Capture_Comingsoon1Inputs */
|
|
7
|
+
|
|
8
|
+
const zh_quick_capture_comingsoon1 = /** @type {(inputs: Quick_Capture_Comingsoon1Inputs) => LocalizedString} */ () => {
|
|
9
|
+
return /** @type {LocalizedString} */ (`该类型记录即将上线,敬请期待`)
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const en_quick_capture_comingsoon1 = /** @type {(inputs: Quick_Capture_Comingsoon1Inputs) => LocalizedString} */ () => {
|
|
13
|
+
return /** @type {LocalizedString} */ (`This record type is coming soon`)
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* | output |
|
|
18
|
+
* | --- |
|
|
19
|
+
* | "This record type is coming soon" |
|
|
20
|
+
*
|
|
21
|
+
* @param {Quick_Capture_Comingsoon1Inputs} inputs
|
|
22
|
+
* @param {{ locale?: "zh" | "en" }} options
|
|
23
|
+
* @returns {LocalizedString}
|
|
24
|
+
*/
|
|
25
|
+
const quick_capture_comingsoon1 = /** @type {((inputs?: Quick_Capture_Comingsoon1Inputs, options?: { locale?: "zh" | "en" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quick_Capture_Comingsoon1Inputs, { locale?: "zh" | "en" }, {}>} */ ((inputs = {}, options = {}) => {
|
|
26
|
+
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
|
27
|
+
if (locale === "en") return en_quick_capture_comingsoon1(inputs)
|
|
28
|
+
return zh_quick_capture_comingsoon1(inputs)
|
|
29
|
+
});
|
|
30
|
+
export { quick_capture_comingsoon1 as "quick_capture_comingSoon" }
|
|
@@ -6,17 +6,17 @@ import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
|
|
6
6
|
/** @typedef {{}} Quick_Capture_HintInputs */
|
|
7
7
|
|
|
8
8
|
const zh_quick_capture_hint = /** @type {(inputs: Quick_Capture_HintInputs) => LocalizedString} */ () => {
|
|
9
|
-
return /** @type {LocalizedString} */ (`Enter 记录 ·
|
|
9
|
+
return /** @type {LocalizedString} */ (`Enter 记录 · ⌘+Enter 编辑区提交 · Esc 关闭`)
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const en_quick_capture_hint = /** @type {(inputs: Quick_Capture_HintInputs) => LocalizedString} */ () => {
|
|
13
|
-
return /** @type {LocalizedString} */ (`Enter to save ·
|
|
13
|
+
return /** @type {LocalizedString} */ (`Enter to save · ⌘+Enter in editor · Esc to close`)
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* | output |
|
|
18
18
|
* | --- |
|
|
19
|
-
* | "Enter to save ·
|
|
19
|
+
* | "Enter to save · ⌘+Enter in editor · Esc to close" |
|
|
20
20
|
*
|
|
21
21
|
* @param {Quick_Capture_HintInputs} inputs
|
|
22
22
|
* @param {{ locale?: "zh" | "en" }} options
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
|
3
|
+
|
|
4
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
5
|
+
|
|
6
|
+
/** @typedef {{}} Quick_Capture_Tabbug1Inputs */
|
|
7
|
+
|
|
8
|
+
const zh_quick_capture_tabbug1 = /** @type {(inputs: Quick_Capture_Tabbug1Inputs) => LocalizedString} */ () => {
|
|
9
|
+
return /** @type {LocalizedString} */ (`BUG`)
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const en_quick_capture_tabbug1 = /** @type {(inputs: Quick_Capture_Tabbug1Inputs) => LocalizedString} */ () => {
|
|
13
|
+
return /** @type {LocalizedString} */ (`Bug`)
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* | output |
|
|
18
|
+
* | --- |
|
|
19
|
+
* | "Bug" |
|
|
20
|
+
*
|
|
21
|
+
* @param {Quick_Capture_Tabbug1Inputs} inputs
|
|
22
|
+
* @param {{ locale?: "zh" | "en" }} options
|
|
23
|
+
* @returns {LocalizedString}
|
|
24
|
+
*/
|
|
25
|
+
const quick_capture_tabbug1 = /** @type {((inputs?: Quick_Capture_Tabbug1Inputs, options?: { locale?: "zh" | "en" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quick_Capture_Tabbug1Inputs, { locale?: "zh" | "en" }, {}>} */ ((inputs = {}, options = {}) => {
|
|
26
|
+
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
|
27
|
+
if (locale === "en") return en_quick_capture_tabbug1(inputs)
|
|
28
|
+
return zh_quick_capture_tabbug1(inputs)
|
|
29
|
+
});
|
|
30
|
+
export { quick_capture_tabbug1 as "quick_capture_tabBug" }
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
|
3
|
+
|
|
4
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
5
|
+
|
|
6
|
+
/** @typedef {{}} Quick_Capture_Tabtask1Inputs */
|
|
7
|
+
|
|
8
|
+
const zh_quick_capture_tabtask1 = /** @type {(inputs: Quick_Capture_Tabtask1Inputs) => LocalizedString} */ () => {
|
|
9
|
+
return /** @type {LocalizedString} */ (`任务`)
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const en_quick_capture_tabtask1 = /** @type {(inputs: Quick_Capture_Tabtask1Inputs) => LocalizedString} */ () => {
|
|
13
|
+
return /** @type {LocalizedString} */ (`Task`)
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* | output |
|
|
18
|
+
* | --- |
|
|
19
|
+
* | "Task" |
|
|
20
|
+
*
|
|
21
|
+
* @param {Quick_Capture_Tabtask1Inputs} inputs
|
|
22
|
+
* @param {{ locale?: "zh" | "en" }} options
|
|
23
|
+
* @returns {LocalizedString}
|
|
24
|
+
*/
|
|
25
|
+
const quick_capture_tabtask1 = /** @type {((inputs?: Quick_Capture_Tabtask1Inputs, options?: { locale?: "zh" | "en" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quick_Capture_Tabtask1Inputs, { locale?: "zh" | "en" }, {}>} */ ((inputs = {}, options = {}) => {
|
|
26
|
+
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
|
27
|
+
if (locale === "en") return en_quick_capture_tabtask1(inputs)
|
|
28
|
+
return zh_quick_capture_tabtask1(inputs)
|
|
29
|
+
});
|
|
30
|
+
export { quick_capture_tabtask1 as "quick_capture_tabTask" }
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
18
|
import { createLazyFileRoute } from '@tanstack/react-router'
|
|
19
|
-
import { QuickCapturePanel } from '@/components/quick-
|
|
19
|
+
import { QuickCapturePanel } from '@/components/mini-quick-panel/mini-quick-panel'
|
|
20
20
|
|
|
21
21
|
export const Route = createLazyFileRoute('/quick-capture')({
|
|
22
22
|
component: QuickCapturePage,
|