@allbluecn/web-app 0.27.2 → 0.27.4
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/desktop/__tests__/quick-capture-invalidate.test.tsx +11 -1
- package/src/components/desktop/quick-capture-invalidate.tsx +11 -5
- package/src/components/quick-capture/__tests__/quick-capture-panel.test.tsx +21 -2
- package/src/components/quick-capture/quick-capture-panel.tsx +105 -35
- package/src/components/tiptap/ui/mention-dropdown-menu/mention-dropdown-menu.tsx +7 -5
- package/src/lib/__tests__/query-global-error.test.ts +2 -0
- package/src/lib/changelog/sdk-versions.ts +1 -1
- package/src/lib/desktop-bridge-types.ts +6 -0
- package/src/lib/query-global-error.ts +3 -0
- package/src/paraglide/messages/_index.js +4 -0
- package/src/paraglide/messages/quick_capture_openmain1.js +30 -0
- package/src/paraglide/messages/quick_capture_quickidea1.js +30 -0
- package/src/paraglide/messages/quick_capture_quickstory1.js +30 -0
- package/src/paraglide/messages/quick_capture_quit.js +29 -0
package/package.json
CHANGED
|
@@ -18,6 +18,8 @@ let captured: CaptureCb | null = null
|
|
|
18
18
|
const unsubscribe = vi.fn()
|
|
19
19
|
let noBridge = false
|
|
20
20
|
|
|
21
|
+
const routerInvalidate = vi.hoisted(() => vi.fn())
|
|
22
|
+
|
|
21
23
|
vi.mock('@/lib/desktop-bridge-types', () => ({
|
|
22
24
|
getDesktopBridge: () => {
|
|
23
25
|
if (noBridge) return null
|
|
@@ -30,6 +32,11 @@ vi.mock('@/lib/desktop-bridge-types', () => ({
|
|
|
30
32
|
},
|
|
31
33
|
}))
|
|
32
34
|
|
|
35
|
+
// 需求列表/看板走 route loader(非 react-query):事件需同时 router.invalidate
|
|
36
|
+
vi.mock('@tanstack/react-router', () => ({
|
|
37
|
+
useRouter: () => ({ invalidate: routerInvalidate }),
|
|
38
|
+
}))
|
|
39
|
+
|
|
33
40
|
import { QuickCaptureInvalidator } from '../quick-capture-invalidate'
|
|
34
41
|
|
|
35
42
|
let client: QueryClient
|
|
@@ -61,7 +68,7 @@ describe('QuickCaptureInvalidator 主窗跨窗口失效', () => {
|
|
|
61
68
|
expect(captured).toBeTypeOf('function')
|
|
62
69
|
})
|
|
63
70
|
|
|
64
|
-
it('桥推送记录创建事件 → invalidateQueries
|
|
71
|
+
it('桥推送记录创建事件 → invalidateQueries 全量失效 + router.invalidate 重跑 loader', async () => {
|
|
65
72
|
mount()
|
|
66
73
|
const invalidateSpy = vi.spyOn(client, 'invalidateQueries')
|
|
67
74
|
await act(async () => {
|
|
@@ -71,6 +78,9 @@ describe('QuickCaptureInvalidator 主窗跨窗口失效', () => {
|
|
|
71
78
|
expect(invalidateSpy).toHaveBeenCalledTimes(1)
|
|
72
79
|
// 全量失效口径(复审 C2):无 queryKey 过滤参数——零参调用
|
|
73
80
|
expect(invalidateSpy).toHaveBeenCalledWith()
|
|
81
|
+
// 列表数据走 route loader(非 react-query):必须同时重跑 loader,
|
|
82
|
+
// 否则新记录不会出现在需求列表(用户会以为要手动刷新)
|
|
83
|
+
expect(routerInvalidate).toHaveBeenCalledTimes(1)
|
|
74
84
|
})
|
|
75
85
|
|
|
76
86
|
it('desktopBridge 为 undefined(浏览器直开)→ 挂载不抛错、零订阅', () => {
|
|
@@ -4,24 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
// 主窗跨窗口失效(托盘 mini 快捷记录面板闭环第 4 步):订阅
|
|
6
6
|
// desktopBridge.onQuickCaptureCreated——mini 面板保存成功 → Electron main 广播
|
|
7
|
-
// →
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
7
|
+
// → 本组件刷新主窗数据。两条刷新通道缺一不可:
|
|
8
|
+
// ① invalidateQueries() 全量失效(复审 C2 口径)——覆盖 projects-brief /
|
|
9
|
+
// workspaces-brief / 通知等 react-query 缓存(灵感箱首建后侧边栏即时出现);
|
|
10
|
+
// ② router.invalidate() 重跑 active route loader——需求列表/看板/日历的数据
|
|
11
|
+
// 走 route loader + 组件内 reload 原语(非 react-query),仅失效 query 缓存
|
|
12
|
+
// 不会让新记录出现在列表里(用户会以为「没保存,要手动刷新」)。
|
|
13
|
+
// 旧壳(无此方法)undefined、浏览器直开(无桥)null——可选链双保险优雅降级。
|
|
11
14
|
// 挂载点:providers(Providers 全页挂载,DesktopRenamedToast 旁)。
|
|
12
15
|
import { useEffect } from "react"
|
|
13
16
|
import { useQueryClient } from "@tanstack/react-query"
|
|
17
|
+
import { useRouter } from "@tanstack/react-router"
|
|
14
18
|
import { getDesktopBridge } from "@/lib/desktop-bridge-types"
|
|
15
19
|
|
|
16
20
|
export function QuickCaptureInvalidator() {
|
|
17
21
|
const queryClient = useQueryClient()
|
|
22
|
+
const router = useRouter()
|
|
18
23
|
|
|
19
24
|
useEffect(() => {
|
|
20
25
|
const off = getDesktopBridge()?.onQuickCaptureCreated?.(() => {
|
|
21
26
|
void queryClient.invalidateQueries()
|
|
27
|
+
void router.invalidate()
|
|
22
28
|
})
|
|
23
29
|
return off
|
|
24
|
-
}, [queryClient])
|
|
30
|
+
}, [queryClient, router])
|
|
25
31
|
|
|
26
32
|
return null
|
|
27
33
|
}
|
|
@@ -55,6 +55,8 @@ const bridgeStub = vi.hoisted(() => {
|
|
|
55
55
|
notifyQuickCapture: vi.fn(),
|
|
56
56
|
setMiniPanelPinned: vi.fn(),
|
|
57
57
|
popUpTrayMenu: vi.fn(),
|
|
58
|
+
openMainWindow: vi.fn(),
|
|
59
|
+
quitApp: vi.fn(),
|
|
58
60
|
onMiniPanelMode: vi.fn((_cb: (mode: string) => void) => unsubMiniPanelMode),
|
|
59
61
|
onMiniPanelPinned: vi.fn((_cb: (pinned: boolean) => void) => unsubMiniPanelPinned),
|
|
60
62
|
}
|
|
@@ -317,11 +319,28 @@ describe('QuickCapturePanel', () => {
|
|
|
317
319
|
)
|
|
318
320
|
})
|
|
319
321
|
|
|
320
|
-
it('
|
|
322
|
+
it('设置菜单在面板处打开(内容与托盘右键一致):打开 AllBlue / 快捷记录灵感 / 退出', async () => {
|
|
321
323
|
const user = userEvent.setup()
|
|
322
324
|
renderPanel()
|
|
325
|
+
await screen.findByText('独立需求')
|
|
326
|
+
await user.click(screen.getByRole('button', { name: '设置' }))
|
|
327
|
+
// 面板内嵌菜单(不弹原生托盘菜单)
|
|
328
|
+
expect(await screen.findByText('打开 AllBlue')).toBeTruthy()
|
|
329
|
+
expect(screen.getByText('快捷记录需求')).toBeTruthy()
|
|
330
|
+
expect(screen.getByText('快捷记录灵感')).toBeTruthy()
|
|
331
|
+
expect(screen.getByText('退出 AllBlue')).toBeTruthy()
|
|
332
|
+
expect(bridgeStub.popUpTrayMenu).not.toHaveBeenCalled()
|
|
333
|
+
// 快捷记录灵感 → 面板切到灵感箱
|
|
334
|
+
await user.click(screen.getByText('快捷记录灵感'))
|
|
335
|
+
await waitFor(() => expect(screen.getByRole('button', { name: /灵感箱/ })).toBeTruthy())
|
|
336
|
+
// 打开主窗
|
|
337
|
+
await user.click(screen.getByRole('button', { name: '设置' }))
|
|
338
|
+
await user.click(await screen.findByText('打开 AllBlue'))
|
|
339
|
+
expect(bridgeStub.openMainWindow).toHaveBeenCalledTimes(1)
|
|
340
|
+
// 退出
|
|
323
341
|
await user.click(screen.getByRole('button', { name: '设置' }))
|
|
324
|
-
|
|
342
|
+
await user.click(await screen.findByText('退出 AllBlue'))
|
|
343
|
+
expect(bridgeStub.quitApp).toHaveBeenCalledTimes(1)
|
|
325
344
|
})
|
|
326
345
|
|
|
327
346
|
it('标题字号做 md 适配;编辑器收到 hideMobileToolbar(隐藏窄窗底部工具栏)', async () => {
|
|
@@ -44,7 +44,13 @@ import { listProjectsBriefFn } from "@/server/serverFns/project"
|
|
|
44
44
|
import { Button } from "@/components/ui/button"
|
|
45
45
|
import { Input } from "@/components/ui/input"
|
|
46
46
|
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"
|
|
47
|
-
import {
|
|
47
|
+
import {
|
|
48
|
+
DropdownMenu,
|
|
49
|
+
DropdownMenuContent,
|
|
50
|
+
DropdownMenuItem,
|
|
51
|
+
DropdownMenuSeparator,
|
|
52
|
+
DropdownMenuTrigger,
|
|
53
|
+
} from "@/components/ui/dropdown-menu"
|
|
48
54
|
import { toast } from "@/components/ui/toast"
|
|
49
55
|
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name"
|
|
50
56
|
import { NotionDocEditor } from "@/components/tiptap/notion-like"
|
|
@@ -98,12 +104,18 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
98
104
|
const [aiGenerating, setAiGenerating] = useState(false)
|
|
99
105
|
const [isEditorFocused, setIsEditorFocused] = useState(false)
|
|
100
106
|
const [pinned, setPinned] = useState(false)
|
|
107
|
+
// SSR/CSR 首帧一致性:AI 工具栏含 useToolbarOverflow 测量层(客户端首帧多一层
|
|
108
|
+
// DOM),直接 SSR 会 hydration mismatch(React 整树重建 → 输入框事件重绑,
|
|
109
|
+
// 表现为 Enter/Esc 时好时坏)。挂载后再渲染工具栏。
|
|
110
|
+
const [mounted, setMounted] = useState(false)
|
|
111
|
+
const [appVersion, setAppVersion] = useState("")
|
|
101
112
|
|
|
102
113
|
const feedbackTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null)
|
|
103
114
|
// 保存防重:请求在途(标题尚未清空)期间忽略再次提交,防重复落库
|
|
104
115
|
const savingRef = useRef(false)
|
|
105
116
|
const tiptapEditorRef = useRef<any>(null)
|
|
106
117
|
const editorWrapRef = useRef<HTMLDivElement | null>(null)
|
|
118
|
+
const titleInputRef = useRef<HTMLInputElement | null>(null)
|
|
107
119
|
|
|
108
120
|
const { model: aiModel, setModel: setAiModel, groups: aiGroups } = useStoryAiModel()
|
|
109
121
|
// 项目花名册:listProjectsBriefFn 内部先 ensureBuiltinIndependentProject,
|
|
@@ -170,6 +182,36 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
170
182
|
return () => unsubscribe?.()
|
|
171
183
|
}, [])
|
|
172
184
|
|
|
185
|
+
// 首帧一致性 + 版本号(设置菜单展示;旧壳无 appInfo 时留空)
|
|
186
|
+
useEffect(() => {
|
|
187
|
+
setMounted(true)
|
|
188
|
+
}, [])
|
|
189
|
+
|
|
190
|
+
// 焦点管理:面板每次获得焦点(showInactive + webContents.focus / 用户切回)
|
|
191
|
+
// 时把焦点放到标题框。否则焦点停在第一个可聚焦元素(顶部图钉按钮)——表现为
|
|
192
|
+
// 图钉出现 focus ring、Enter/Esc 落到按钮上(快捷键像失效)。用户正在其他
|
|
193
|
+
// 输入控件里编辑时不抢焦点。
|
|
194
|
+
useEffect(() => {
|
|
195
|
+
const focusTitle = () => {
|
|
196
|
+
const active = document.activeElement
|
|
197
|
+
if (active && active !== document.body && active !== titleInputRef.current) return
|
|
198
|
+
titleInputRef.current?.focus()
|
|
199
|
+
}
|
|
200
|
+
focusTitle()
|
|
201
|
+
window.addEventListener('focus', focusTitle)
|
|
202
|
+
return () => window.removeEventListener('focus', focusTitle)
|
|
203
|
+
}, [])
|
|
204
|
+
|
|
205
|
+
useEffect(() => {
|
|
206
|
+
const bridge = getDesktopBridge()
|
|
207
|
+
void bridge
|
|
208
|
+
?.appInfo?.()
|
|
209
|
+
.then((info) => {
|
|
210
|
+
if (info?.version) setAppVersion(info.version)
|
|
211
|
+
})
|
|
212
|
+
.catch(() => {})
|
|
213
|
+
}, [])
|
|
214
|
+
|
|
173
215
|
// 反馈定时器 unmount 清理(组件销毁后不再 setState,防泄漏)
|
|
174
216
|
useEffect(() => {
|
|
175
217
|
return () => {
|
|
@@ -301,40 +343,63 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
301
343
|
</span>
|
|
302
344
|
</div>
|
|
303
345
|
<div className="flex shrink-0 items-center gap-0.5">
|
|
304
|
-
<
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
>
|
|
318
|
-
{pinned ? <PinOff className="size-4" /> : <Pin className="size-4" />}
|
|
319
|
-
</TooltipTrigger>
|
|
320
|
-
<TooltipContent>{m.quick_capture_pin()}</TooltipContent>
|
|
321
|
-
</Tooltip>
|
|
322
|
-
<Tooltip>
|
|
323
|
-
<TooltipTrigger
|
|
346
|
+
<Button
|
|
347
|
+
type="button"
|
|
348
|
+
variant="ghost"
|
|
349
|
+
size="icon-sm"
|
|
350
|
+
aria-label={m.quick_capture_pin()}
|
|
351
|
+
aria-pressed={pinned}
|
|
352
|
+
className={pinned ? "text-primary" : undefined}
|
|
353
|
+
onClick={togglePinned}
|
|
354
|
+
>
|
|
355
|
+
{pinned ? <PinOff className="size-4" /> : <Pin className="size-4" />}
|
|
356
|
+
</Button>
|
|
357
|
+
<DropdownMenu>
|
|
358
|
+
<DropdownMenuTrigger
|
|
324
359
|
render={
|
|
325
360
|
<Button
|
|
326
361
|
type="button"
|
|
327
362
|
variant="ghost"
|
|
328
363
|
size="icon-sm"
|
|
329
364
|
aria-label={m.quick_capture_settings()}
|
|
330
|
-
onClick={() => getDesktopBridge()?.popUpTrayMenu?.()}
|
|
331
365
|
/>
|
|
332
366
|
}
|
|
333
367
|
>
|
|
334
368
|
<Settings className="size-4" />
|
|
335
|
-
</
|
|
336
|
-
|
|
337
|
-
|
|
369
|
+
</DropdownMenuTrigger>
|
|
370
|
+
{/* 设置菜单在面板处弹出,内容与菜单栏图标右键菜单一致(打开/快捷记录/版本/退出) */}
|
|
371
|
+
<DropdownMenuContent align="end" className="w-48">
|
|
372
|
+
<DropdownMenuItem onClick={() => getDesktopBridge()?.openMainWindow?.()}>
|
|
373
|
+
{m.quick_capture_openMain()}
|
|
374
|
+
</DropdownMenuItem>
|
|
375
|
+
<DropdownMenuItem
|
|
376
|
+
onClick={() => {
|
|
377
|
+
const pick = pickForMode("story")
|
|
378
|
+
if (pick) handlePickProject(pick)
|
|
379
|
+
}}
|
|
380
|
+
>
|
|
381
|
+
{m.quick_capture_quickStory()}
|
|
382
|
+
</DropdownMenuItem>
|
|
383
|
+
<DropdownMenuItem
|
|
384
|
+
onClick={() => {
|
|
385
|
+
const pick = pickForMode("inspiration")
|
|
386
|
+
if (pick) handlePickProject(pick)
|
|
387
|
+
}}
|
|
388
|
+
>
|
|
389
|
+
{m.quick_capture_quickIdea()}
|
|
390
|
+
</DropdownMenuItem>
|
|
391
|
+
{appVersion ? (
|
|
392
|
+
<>
|
|
393
|
+
<DropdownMenuSeparator />
|
|
394
|
+
<DropdownMenuItem disabled>{`v${appVersion}`}</DropdownMenuItem>
|
|
395
|
+
</>
|
|
396
|
+
) : null}
|
|
397
|
+
<DropdownMenuSeparator />
|
|
398
|
+
<DropdownMenuItem onClick={() => getDesktopBridge()?.quitApp?.()}>
|
|
399
|
+
{m.quick_capture_quit()}
|
|
400
|
+
</DropdownMenuItem>
|
|
401
|
+
</DropdownMenuContent>
|
|
402
|
+
</DropdownMenu>
|
|
338
403
|
</div>
|
|
339
404
|
</header>
|
|
340
405
|
|
|
@@ -400,6 +465,7 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
400
465
|
|
|
401
466
|
<Input
|
|
402
467
|
autoFocus
|
|
468
|
+
ref={titleInputRef}
|
|
403
469
|
value={name}
|
|
404
470
|
onChange={(e) => setName(e.target.value)}
|
|
405
471
|
onKeyDown={handleTitleKeyDown}
|
|
@@ -438,16 +504,20 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
438
504
|
</div>
|
|
439
505
|
|
|
440
506
|
<div className="mr-2 mb-1 flex shrink-0 items-center justify-end gap-1">
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
507
|
+
{/* 挂载后才渲染:工具栏测量层(客户端首帧多一层 DOM)会造成 hydration
|
|
508
|
+
mismatch → React 整树重建 → 输入框事件重绑(快捷键时好时坏) */}
|
|
509
|
+
{mounted && (
|
|
510
|
+
<StoryAiToolbar
|
|
511
|
+
description={description.markdown}
|
|
512
|
+
title={name}
|
|
513
|
+
mode="editor"
|
|
514
|
+
editorRef={tiptapEditorRef}
|
|
515
|
+
model={aiModel}
|
|
516
|
+
groups={aiGroups}
|
|
517
|
+
onModelChange={setAiModel}
|
|
518
|
+
onGenerating={setAiGenerating}
|
|
519
|
+
/>
|
|
520
|
+
)}
|
|
451
521
|
</div>
|
|
452
522
|
</div>
|
|
453
523
|
|
|
@@ -58,13 +58,15 @@ interface MentionItemProps {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
export const MentionDropdownMenu = (props: MentionDropdownMenuProps) => {
|
|
61
|
+
// useEditorServices 是 hook(内部 useContext),必须在组件渲染期调用——
|
|
62
|
+
// 放进 queryFn 会在 react-query 的异步上下文里触发 Invalid hook call,被
|
|
63
|
+
// query 全局 onError 捕获成「请求失败」toast(每次编辑器挂载即触发:
|
|
64
|
+
// mini 面板 / 创建需求弹窗 / 需求详情都会复现)。
|
|
65
|
+
const es = useEditorServices() ?? {}
|
|
66
|
+
const { mentionUserSource } = es
|
|
61
67
|
const { data: teamUsers = [] } = useQuery({
|
|
62
68
|
queryKey: ['teamUsers'],
|
|
63
|
-
queryFn: () =>
|
|
64
|
-
const es = useEditorServices() ?? {}
|
|
65
|
-
const { mentionUserSource } = es
|
|
66
|
-
return mentionUserSource?.listUsers?.() ?? []
|
|
67
|
-
},
|
|
69
|
+
queryFn: () => mentionUserSource?.listUsers?.() ?? [],
|
|
68
70
|
staleTime: 60_000,
|
|
69
71
|
})
|
|
70
72
|
|
|
@@ -51,6 +51,8 @@ async function executeFailingMutation(
|
|
|
51
51
|
|
|
52
52
|
beforeEach(() => {
|
|
53
53
|
vi.mocked(toast.error).mockClear()
|
|
54
|
+
// 取证钩子(handleGlobalError 内 console.error 打印具体错误)不污染测试输出
|
|
55
|
+
vi.spyOn(console, 'error').mockImplementation(() => {})
|
|
54
56
|
})
|
|
55
57
|
|
|
56
58
|
describe('QueryCache 全局 onError(web)', () => {
|
|
@@ -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.4",
|
|
116
116
|
"lastUpdate": "Nov 5, 2026",
|
|
117
117
|
"source": "apps/web/package.json",
|
|
118
118
|
"docsUrl": "https://github.com/allbluecn/allblue"
|
|
@@ -110,6 +110,12 @@ export interface DesktopBridgeApi {
|
|
|
110
110
|
setMiniPanelPinned?: (pinned: boolean) => void
|
|
111
111
|
onMiniPanelPinned?: (cb: (pinned: boolean) => void) => () => void
|
|
112
112
|
popUpTrayMenu?: () => void
|
|
113
|
+
/** mini 面板设置菜单(2026-11-05 追加,add-only):
|
|
114
|
+
* - openMainWindow:打开/前置主窗(菜单项「打开 AllBlue」);
|
|
115
|
+
* - quitApp:退出应用(菜单项「退出 AllBlue」,复用 before-quit 清理链)。
|
|
116
|
+
* 旧壳 undefined——调用方可选链降级。 */
|
|
117
|
+
openMainWindow?: () => void
|
|
118
|
+
quitApp?: () => void
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
/** A11 desktop-state 三态载荷(main 侧 desktop-state.json 持久化态的广播形状):
|
|
@@ -69,6 +69,9 @@ function handleGlobalError(
|
|
|
69
69
|
if (isGlobalToastSuppressed(error, meta)) return
|
|
70
70
|
// toast 仅浏览器端有渲染通道,SSR 静默
|
|
71
71
|
if (typeof window === 'undefined') return
|
|
72
|
+
// 取证钩子:toast 只给通用文案,具体错误落 console 便于用户/排查时定位
|
|
73
|
+
// (哪个 serverFn 失败、状态码、消息;不影响 toast 行为)
|
|
74
|
+
console.error('[query-global-error]', error)
|
|
72
75
|
if (isClientErrorStatus(extractErrorStatus(error))) {
|
|
73
76
|
// 4xx(非 401):业务语义错误,展示详情;空消息回落通用文案
|
|
74
77
|
toast.error(pickErrorMessage(error, new WeakSet()) ?? m.common_error_generic())
|
|
@@ -3550,8 +3550,12 @@ export * from './prototypepanel_title1.js'
|
|
|
3550
3550
|
export * from './quick_capture_failed.js'
|
|
3551
3551
|
export * from './quick_capture_hint.js'
|
|
3552
3552
|
export * from './quick_capture_inbox.js'
|
|
3553
|
+
export * from './quick_capture_openmain1.js'
|
|
3553
3554
|
export * from './quick_capture_paneltitle1.js'
|
|
3554
3555
|
export * from './quick_capture_pin.js'
|
|
3556
|
+
export * from './quick_capture_quickidea1.js'
|
|
3557
|
+
export * from './quick_capture_quickstory1.js'
|
|
3558
|
+
export * from './quick_capture_quit.js'
|
|
3555
3559
|
export * from './quick_capture_saved.js'
|
|
3556
3560
|
export * from './quick_capture_settings.js'
|
|
3557
3561
|
export * from './quick_capture_submit.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_Openmain1Inputs */
|
|
7
|
+
|
|
8
|
+
const zh_quick_capture_openmain1 = /** @type {(inputs: Quick_Capture_Openmain1Inputs) => LocalizedString} */ () => {
|
|
9
|
+
return /** @type {LocalizedString} */ (`打开 AllBlue`)
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const en_quick_capture_openmain1 = /** @type {(inputs: Quick_Capture_Openmain1Inputs) => LocalizedString} */ () => {
|
|
13
|
+
return /** @type {LocalizedString} */ (`Open AllBlue`)
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* | output |
|
|
18
|
+
* | --- |
|
|
19
|
+
* | "Open AllBlue" |
|
|
20
|
+
*
|
|
21
|
+
* @param {Quick_Capture_Openmain1Inputs} inputs
|
|
22
|
+
* @param {{ locale?: "zh" | "en" }} options
|
|
23
|
+
* @returns {LocalizedString}
|
|
24
|
+
*/
|
|
25
|
+
const quick_capture_openmain1 = /** @type {((inputs?: Quick_Capture_Openmain1Inputs, options?: { locale?: "zh" | "en" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quick_Capture_Openmain1Inputs, { locale?: "zh" | "en" }, {}>} */ ((inputs = {}, options = {}) => {
|
|
26
|
+
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
|
27
|
+
if (locale === "en") return en_quick_capture_openmain1(inputs)
|
|
28
|
+
return zh_quick_capture_openmain1(inputs)
|
|
29
|
+
});
|
|
30
|
+
export { quick_capture_openmain1 as "quick_capture_openMain" }
|
|
@@ -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_Quickidea1Inputs */
|
|
7
|
+
|
|
8
|
+
const zh_quick_capture_quickidea1 = /** @type {(inputs: Quick_Capture_Quickidea1Inputs) => LocalizedString} */ () => {
|
|
9
|
+
return /** @type {LocalizedString} */ (`快捷记录灵感`)
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const en_quick_capture_quickidea1 = /** @type {(inputs: Quick_Capture_Quickidea1Inputs) => LocalizedString} */ () => {
|
|
13
|
+
return /** @type {LocalizedString} */ (`Quick Idea`)
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* | output |
|
|
18
|
+
* | --- |
|
|
19
|
+
* | "Quick Idea" |
|
|
20
|
+
*
|
|
21
|
+
* @param {Quick_Capture_Quickidea1Inputs} inputs
|
|
22
|
+
* @param {{ locale?: "zh" | "en" }} options
|
|
23
|
+
* @returns {LocalizedString}
|
|
24
|
+
*/
|
|
25
|
+
const quick_capture_quickidea1 = /** @type {((inputs?: Quick_Capture_Quickidea1Inputs, options?: { locale?: "zh" | "en" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quick_Capture_Quickidea1Inputs, { locale?: "zh" | "en" }, {}>} */ ((inputs = {}, options = {}) => {
|
|
26
|
+
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
|
27
|
+
if (locale === "en") return en_quick_capture_quickidea1(inputs)
|
|
28
|
+
return zh_quick_capture_quickidea1(inputs)
|
|
29
|
+
});
|
|
30
|
+
export { quick_capture_quickidea1 as "quick_capture_quickIdea" }
|
|
@@ -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_Quickstory1Inputs */
|
|
7
|
+
|
|
8
|
+
const zh_quick_capture_quickstory1 = /** @type {(inputs: Quick_Capture_Quickstory1Inputs) => LocalizedString} */ () => {
|
|
9
|
+
return /** @type {LocalizedString} */ (`快捷记录需求`)
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const en_quick_capture_quickstory1 = /** @type {(inputs: Quick_Capture_Quickstory1Inputs) => LocalizedString} */ () => {
|
|
13
|
+
return /** @type {LocalizedString} */ (`Quick Story`)
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* | output |
|
|
18
|
+
* | --- |
|
|
19
|
+
* | "Quick Story" |
|
|
20
|
+
*
|
|
21
|
+
* @param {Quick_Capture_Quickstory1Inputs} inputs
|
|
22
|
+
* @param {{ locale?: "zh" | "en" }} options
|
|
23
|
+
* @returns {LocalizedString}
|
|
24
|
+
*/
|
|
25
|
+
const quick_capture_quickstory1 = /** @type {((inputs?: Quick_Capture_Quickstory1Inputs, options?: { locale?: "zh" | "en" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quick_Capture_Quickstory1Inputs, { locale?: "zh" | "en" }, {}>} */ ((inputs = {}, options = {}) => {
|
|
26
|
+
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
|
27
|
+
if (locale === "en") return en_quick_capture_quickstory1(inputs)
|
|
28
|
+
return zh_quick_capture_quickstory1(inputs)
|
|
29
|
+
});
|
|
30
|
+
export { quick_capture_quickstory1 as "quick_capture_quickStory" }
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
|
3
|
+
|
|
4
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
5
|
+
|
|
6
|
+
/** @typedef {{}} Quick_Capture_QuitInputs */
|
|
7
|
+
|
|
8
|
+
const zh_quick_capture_quit = /** @type {(inputs: Quick_Capture_QuitInputs) => LocalizedString} */ () => {
|
|
9
|
+
return /** @type {LocalizedString} */ (`退出 AllBlue`)
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const en_quick_capture_quit = /** @type {(inputs: Quick_Capture_QuitInputs) => LocalizedString} */ () => {
|
|
13
|
+
return /** @type {LocalizedString} */ (`Quit AllBlue`)
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* | output |
|
|
18
|
+
* | --- |
|
|
19
|
+
* | "Quit AllBlue" |
|
|
20
|
+
*
|
|
21
|
+
* @param {Quick_Capture_QuitInputs} inputs
|
|
22
|
+
* @param {{ locale?: "zh" | "en" }} options
|
|
23
|
+
* @returns {LocalizedString}
|
|
24
|
+
*/
|
|
25
|
+
export const quick_capture_quit = /** @type {((inputs?: Quick_Capture_QuitInputs, options?: { locale?: "zh" | "en" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quick_Capture_QuitInputs, { locale?: "zh" | "en" }, {}>} */ ((inputs = {}, options = {}) => {
|
|
26
|
+
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
|
27
|
+
if (locale === "en") return en_quick_capture_quit(inputs)
|
|
28
|
+
return zh_quick_capture_quit(inputs)
|
|
29
|
+
});
|