LingandRX
359326c6da
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 对比
2026-06-05 12:53:19 +08:00
雨霖铃
e919af6857
fix(qrcode): 修复图片右键菜单功能描述和检测逻辑
...
- 修改菜单标题为「解析图片二维码」更准确
- 改进 isImageUrl 函数,支持更多图片URL格式
- 支持 data:image/ 格式
- 支持URL路径中包含图片相关关键词
- 更新国际化文案和测试用例
2026-05-30 21:01:33 +08:00
雨霖铃
5be15301b5
feat(qrcode): 实现图片转二维码右键菜单功能
...
- 添加图片类型的右键菜单配置
- 修改 parseContextMenuClick 支持 srcUrl 参数
- 实现图片URL自动解析功能
- 检测图片URL自动切换到解析模式
- 更新测试用例覆盖新功能
- 新增国际化文案
2026-05-30 20:58:28 +08:00
雨霖铃
9458d62a99
feat(qrcode): 右键菜单传入URL时自动生成二维码
...
- 右键菜单传入URL时直接生成二维码,跳转到预览态
- 保留手动输入文本并点击生成按钮的功能
- 优化用户体验,简化操作流程
2026-05-30 20:38:23 +08:00
雨霖铃
6dca673a5a
refactor(qrcode): 优化文本转二维码为两步操作模式
...
- 将实时预览改为显式触发生成,用户体验更清晰
- 新增输入态(input)和预览态(preview)两种状态
- 输入态:显示输入框和生成按钮,右侧显示占位提示
- 预览态:显示只读文本预览和编辑按钮,右侧显示二维码
- 保存上次输入内容,返回编辑态时自动回填
- 添加空输入校验和错误提示
- 更新国际化文案
- 完善单元测试覆盖新功能
2026-05-30 20:23:05 +08:00
雨霖铃
2727e60025
refactor: replace GlobalSnackbar with sonner toast
...
Remove the custom 373-line GlobalSnackbar component and its Provider/Hook
in favor of the already-installed sonner library.
Changes:
- Delete src/components/GlobalSnackbar.tsx (+ tests)
- Remove SnackbarProvider from popup/App.tsx and sidepanel/App.tsx
- Replace useSnackbar() calls with toast.success()/toast.error() in:
- ImageUploader.tsx
- useQrCode.ts
- ParsePanel.tsx
- LiveClock.tsx
- Update test mocks to use sonner instead of GlobalSnackbar
-554 lines, +43 lines (net -511 lines)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-05-29 20:47:16 +08:00
雨霖铃
e140af7698
refactor: remove meaningless comments
...
Remove 50+ noise comments across the codebase:
- AI-generated verbose prose (💡 emoji, '超进化', '大闸', etc.)
- Comments that restate what the code obviously does
- Comments about deleted code
- Import-level noise comments
- Overly verbose Chinese section markers
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-28 20:37:52 +08:00
雨霖铃
b79fe7dd49
refactor: reorganize directory structure into src/
...
Move all source code directories into src/ for cleaner project structure:
- pages/, components/, utils/, config/, providers/, types/, lib/, assets/, entrypoints/ → src/
- Use WXT srcDir config to resolve @/ alias to src/
- Update tsconfig, vitest, eslint, tailwind configs
- Remove scattered README.md files from subdirectories
- Update documentation (AGENTS.md, CODING_STANDARDS.md, README.md)
- Fix pre-existing lint error in RouterProvider.tsx
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-28 20:20:45 +08:00