@allbluecn/web-app 0.27.6 → 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} +2 -2
- package/src/components/{quick-capture/quick-capture-panel.tsx → mini-quick-panel/mini-quick-panel.tsx} +14 -3
- package/src/lib/changelog/sdk-versions.ts +1 -1
- 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 不保存
|
|
@@ -137,7 +137,7 @@ vi.mock('@/components/story/inline-editors', () => ({
|
|
|
137
137
|
),
|
|
138
138
|
}))
|
|
139
139
|
|
|
140
|
-
import { QuickCapturePanel } from '../quick-
|
|
140
|
+
import { QuickCapturePanel } from '../mini-quick-panel'
|
|
141
141
|
|
|
142
142
|
function renderPanel(initialMode: 'story' | 'inspiration' = 'story') {
|
|
143
143
|
const client = new QueryClient({ defaultOptions: { queries: { retry: false } } })
|
|
@@ -210,13 +210,20 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
210
210
|
active.tagName === 'TEXTAREA' ||
|
|
211
211
|
active.isContentEditable)
|
|
212
212
|
if (isEditing && active !== titleInputRef.current) return
|
|
213
|
-
titleInputRef.current?.focus()
|
|
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)
|
|
214
221
|
}
|
|
215
222
|
focusTitle()
|
|
216
223
|
window.addEventListener('focus', focusTitle)
|
|
217
224
|
document.addEventListener('visibilitychange', focusTitle)
|
|
218
225
|
const bridge = getDesktopBridge()
|
|
219
|
-
const unsubscribe = bridge?.onMiniPanelShown?.(
|
|
226
|
+
const unsubscribe = bridge?.onMiniPanelShown?.(focusTitleTrailing)
|
|
220
227
|
return () => {
|
|
221
228
|
window.removeEventListener('focus', focusTitle)
|
|
222
229
|
document.removeEventListener('visibilitychange', focusTitle)
|
|
@@ -384,7 +391,10 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
384
391
|
size="icon-sm"
|
|
385
392
|
aria-label={m.quick_capture_pin()}
|
|
386
393
|
aria-pressed={pinned}
|
|
387
|
-
|
|
394
|
+
// focus:outline-none:脚本聚焦路径(webContents.focus 重置到首个可
|
|
395
|
+
// 聚焦元素)落在图钉上时不再显示 UA 焦点框;键盘用户的可见焦点仍由
|
|
396
|
+
// shadcn 的 focus-visible:ring 提供,可访问性不受影响
|
|
397
|
+
className={pinned ? "text-primary focus:outline-none" : "focus:outline-none"}
|
|
388
398
|
onClick={togglePinned}
|
|
389
399
|
>
|
|
390
400
|
{pinned ? <PinOff className="size-4" /> : <Pin className="size-4" />}
|
|
@@ -397,6 +407,7 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
|
|
|
397
407
|
variant="ghost"
|
|
398
408
|
size="icon-sm"
|
|
399
409
|
aria-label={m.quick_capture_settings()}
|
|
410
|
+
className="focus:outline-none"
|
|
400
411
|
/>
|
|
401
412
|
}
|
|
402
413
|
>
|
|
@@ -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"
|
|
@@ -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,
|