Hotfix/contextmenu srcurl generating fix (#63)

* fix: 修复右键菜单 srcUrl 误判、pre-push 全量扫描、generating 状态不可见问题

- contextMenu: srcUrl 检查限定为 qrCode-image 菜单项,避免其他菜单误返回图片 URL
- pre-push: eslint 改为只检查变更文件(git diff 过滤),tsc 保留全项目检查
- useQrCode: confirmGenerate 用 setTimeout 延迟生成,让 loading 状态先被 React 渲染
- tests: 生成相关测试改为 async + waitFor 适配异步 confirmGenerate

* fix(hooks): pre-push 无 upstream 时回退到 origin/main 对比
This commit is contained in:
LingandRX
2026-06-05 12:53:19 +08:00
committed by GitHub
parent 0624b609be
commit 359326c6da
4 changed files with 57 additions and 32 deletions
+2 -2
View File
@@ -103,8 +103,8 @@ export function parseContextMenuClick(
): ParseResult {
const featureKey = getMenuPageType(menuItemId);
// 处理图片 URL(右键点击图片时)
if (info.srcUrl) {
// 处理图片 URL仅 qrCode-image 菜单项,右键点击图片时)
if (menuItemId === 'qrCode-image' && info.srcUrl) {
return {
success: true,
data: { featureKey, payload: info.srcUrl },