雨霖铃
5be15301b5
feat(qrcode): 实现图片转二维码右键菜单功能
...
- 添加图片类型的右键菜单配置
- 修改 parseContextMenuClick 支持 srcUrl 参数
- 实现图片URL自动解析功能
- 检测图片URL自动切换到解析模式
- 更新测试用例覆盖新功能
- 新增国际化文案
2026-05-30 20:58:28 +08:00
雨霖铃
306600a35c
refactor(qrcode): 优化二维码转文本布局,与文本转二维码风格统一
...
- 未上传图片时只显示上传区域
- 上传图片后显示小图预览 + 解析结果
- 添加重新上传按钮
- 解析结果文本限制显示长度
- 新增国际化文案(已上传图片、重新上传、解析中等)
- 适配popup窗口紧凑布局
2026-05-30 20:51:48 +08:00
雨霖铃
6dca673a5a
refactor(qrcode): 优化文本转二维码为两步操作模式
...
- 将实时预览改为显式触发生成,用户体验更清晰
- 新增输入态(input)和预览态(preview)两种状态
- 输入态:显示输入框和生成按钮,右侧显示占位提示
- 预览态:显示只读文本预览和编辑按钮,右侧显示二维码
- 保存上次输入内容,返回编辑态时自动回填
- 添加空输入校验和错误提示
- 更新国际化文案
- 完善单元测试覆盖新功能
2026-05-30 20:23:05 +08:00
雨霖铃
0d69695dbb
refactor: simplify Timestamp and RightClickRestorer
...
Timestamp:
- Extract shared utilities (msToUnit, dayjsFromTimestamp, ModeType)
- Remove unnecessary useCallback/useMemo/React.memo
- Remove extra info section (relative time, ISO 8601, UTC)
- Fix missing translation key timestamp_unitS
RightClickRestorer:
- Remove website badge (右键已解锁 overlay)
- Remove mouse penetration logic for media elements
- Remove unnecessary useCallback
- Remove redundant setIsLoading call
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-05-29 22:40:11 +08:00
雨霖铃
f9fbc79612
refactor(storageCleaner): simplify architecture and improve type semantics
...
- Remove RELOAD_TAB message chain, use chrome.tabs.reload() directly
- Rename IndexedDB label to '站点存储' for accuracy
- Introduce StorageSizeInfo type to distinguish bytes vs count
- Rename totalSize to totalBytes for clarity
- Merge runCleanScript into runScript to reduce duplication
- Rename CleaningResult.success to overallSuccess to avoid confusion
- Remove unused domain state and setDomain call
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-05-29 21:59:54 +08:00
雨霖铃
6bddc4fcfc
Merge remote-tracking branch 'origin/main' into develop
2026-05-28 22:35:39 +08:00
雨霖铃
0054e97a0a
refactor: 移除设置页面
...
- 删除 options 入口点目录及相关文件
- 移除 wxt.config.ts 中 options_ui 配置
- 移除 TopBar 组件中的设置按钮和 onOpenOptions prop
- 移除 popup/sidepanel App.tsx 中的 handleOpenOptions
- 移除相关测试中的设置页面引用
- 移除 messages.json 中设置相关翻译键
- 通过 lint、typecheck、test 验证
2026-05-28 22:15:56 +08:00
雨霖铃
c6cadda95b
feat: redesign Dashboard layout with search and recently used tools
...
- Add search input at top to filter tools by name/description
- Add 'recently used' section showing last 3 used tools as compact chips
- Add 'all tools' section header for the tool card grid
- Track tool usage via new 'app/recentlyUsedTools' storage key
- Update navigateTo to record recently used tools (max 3, LRU order)
- Add i18n keys: dashboard_searchPlaceholder, dashboard_recentlyUsed, dashboard_allTools
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-28 21:22:30 +08:00
雨霖铃
067a20fb0a
feat: remove HTML-Markdown conversion features (htmlToMarkdown & markdownToHtml)
...
Removed both conversion tools and all related code:
- Deleted page components: HtmlToMarkdown, MarkdownToHtml
- Deleted utility functions: htmlToMarkdown.ts, markdownToHtml.ts
- Deleted unit tests for both utilities
- Removed feature configs and PageType entries from storage.d.ts
- Removed preview mode types and StorageSchema keys
- Removed all i18n translation keys from messages.json
- Removed vendor-markdown chunk from wxt.config.ts
- Removed marked dependency from package.json
- Updated feature count in tests (11 -> 9, page order 10 -> 8)
- Updated README, AGENTS.md, and copilot-instructions.md
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-28 21:08:15 +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
雨霖铃
08911d4cba
chore: 清理未使用的 i18n key(322 → 245)
...
移除 77 个未被源码引用的翻译 key,包括:
- jsonFormat_* (17): 未接入的子模式标题和按钮
- buttons_* (15): 代码使用 common: 命名空间格式,直接 key 未引用
- qrCode_* (14): 未使用的页面标题和状态提示
- timestamp/common/storageCleaner/jsonDiff 等零散未用 key
保留了通过模板字面量动态引用的 key(storageCleaner_options_*、common_buttons_themeMode_*、jsonFormat_*InputPlaceholder 等)。
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-28 19:48:38 +08:00
雨霖铃
1daf049737
refactor: 移除英文翻译,仅保留中文
...
删除 public/_locales/en/ 目录,清理 chromeI18n.ts 中未使用的语言切换相关导出。
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-28 19:27:15 +08:00
雨霖铃
aa23a263fe
refactor: 迁移 i18n 系统从 react-i18next 到 chrome.i18n
...
- 移除 react-i18next、i18next 及相关依赖
- 删除旧的 i18n/ 目录和 useLazyTranslation 工具
- 新增 utils/chromeI18n.ts 类型安全 wrapper(useI18n Hook + getMessage)
- 生成 public/_locales/{zh,en}/messages.json(298 个翻译 key)
- 批量更新 39+ 组件文件的导入和翻译调用
- 转换翻译键格式:namespace:key → namespace_key
- 修复 ErrorBoundary/PageErrorBoundary 从 withTranslation HOC 改为直接调用 getMessage
- 更新 vitest.setup.ts mock 加载实际翻译文本
- 修复 11 个测试文件的断言以匹配中文翻译
- TypeScript、ESLint、547 项测试全部通过
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-28 19:21:54 +08:00
LingandRX
d4c29a1bf4
Develop ( #54 )
...
* fix(ci): fix release workflow artifact upload issue
- Split artifact upload into 3 separate steps (Chrome, Firefox, Source)
- Update download steps to match new artifact names
- Add if-no-files-found: error for better error handling
- Fix Node.js 20 compatibility issue with upload-artifact@v4 glob pattern
* docs: 更新 AGENTS.md,添加测试工具和翻译文件结构说明
* docs: 更新 AGENTS.md,完善 CI 步骤和存储键名格式说明
* fix: remove unnecessary animations from StorageCleaner page
- Remove entrance animations (animate-in, fade-in, zoom-in) from all components
- Remove scale effect (active:scale-[0.99]) from clean button
- Remove transition effects (transition-all, transition-colors) from OptionItem, StorageOptionsGrid, AutoRefreshToggle
- Remove bouncing animation from error icon
- Remove pulsing animation from warning banner
- Keep animate-spin on button loading spinner as functional indicator
* fix: remove unnecessary animations from RightClickRestorer page
* fix: remove all unnecessary animations from all pages
- Remove dead code animations (animate-in, fade-in, slide-in, zoom-in, shake) from tailwindcss-animate plugin (not installed)
- Remove decorative transition effects (transition-all, transition-colors) from all page components
- Remove scale effects (active:scale-95) from buttons
- Remove bounce animations (animate-bounce) from icons
- Keep functional animate-spin on loading spinners as they provide essential loading feedback
Affected pages: Dashboard, Timestamp, Jwt, JsonTools, Base64Converter, HtmlToMarkdown, MarkdownToHtml, QrCode, TextStatistics
* docs: 添加项目文档(copilot-instructions、编码规范、各目录 README)
- 新增 .github/copilot-instructions.md:Copilot 指令文件,涵盖构建命令、CI 流水线、项目架构、关键规范
- 新增 .github/CODING_STANDARDS.md:完整的代码编写规范文档(TypeScript、React、样式、错误处理、命名、测试、Hook、i18n、存储等 12 个章节)
- 新增 11 个目录的 README.md:components、components/ui、config、entrypoints、i18n、lib、pages、providers、public、src、types、utils
- 更新 AGENTS.md:补充页面组件模式说明和 components/ui 目录
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(CopyButton): use shadcn buttonVariants instead of duplicated variant classes
Remove hand-written variantClasses/sizeClasses that duplicated shadcn's
buttonVariants. Now extends ButtonProps and imports buttonVariants from
components/ui/button for consistent styling.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(ErrorBoundary): use shadcn destructive tokens instead of hardcoded red colors
Replace hardcoded red-200/red-50/red-600 with border-destructive,
bg-destructive/5, text-destructive. Use variant='destructive' on
Button. Align error log styling with PageErrorBoundary.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(TextInputArea): replace hardcoded Chinese strings with i18n t() calls
Use existing translation keys for clear success, copy success, and
copy error messages instead of hardcoded Chinese text.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(QrCodePreview): use shadcn Button instead of manual button styles
Replace hand-written button class strings with shadcn Button component
using outline and default variants. Removes ~15 lines of duplicated
Tailwind classes.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* docs(GlobalSnackbar): clarify relationship with sonner toast
Add note explaining when to use GlobalSnackbar (provider context,
severity levels, custom positioning) vs sonner toast (simple one-off
messages).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(ImageUploader): wrap handleClearFile with useCallback
Prevents unnecessary re-renders by memoizing the callback, consistent
with handleFileChange which already uses useCallback.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(SwitchButtonGroup): remove redundant containerPadding conditional
Both branches of the ternary returned 'p-1'. Inline the constant
directly into the className string.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(TopBar): add missing openExtensionPage import
The function was called in handleOpenInTab but never imported from
utils/chromeTabs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(TopBar): add selectedIndex boundary protection in keyboard nav
Guard against out-of-bounds access when search results change during
keyboard navigation. Check selectedIndex < totalItems before accessing
arrays.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(RouterContainer): remove unnecessary empty-dep useMemo
getEntryPointType() is a simple config getter. Replace useMemo(() => ..., [])
with a direct call — the empty dep array made the memo pointless.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* feat(i18n): add missing translation keys for error boundaries and copy messages
Add keys for errorBoundary, pageErrorBoundary, router, and
messages.copyEmpty in both zh and en locales.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(CopyButton): replace hardcoded Chinese strings with i18n t() calls
Use useTranslation('common') for tooltip, copy empty/success/error
toast messages.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(ErrorBoundary): replace hardcoded Chinese with i18n via withTranslation HOC
Use react-i18next withTranslation HOC for class component to translate
title, description, and refresh button text.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(PageErrorBoundary): replace hardcoded Chinese with i18n via withTranslation HOC
Use react-i18next withTranslation HOC for class component to translate
title, description, and retry button text.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(RouterContainer): replace hardcoded Chinese with i18n t() calls
Use useTranslation('common') for 404 page title and description with
entryPointType interpolation.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(pages): 修复 TypeScript 错误、硬编码字符串,移除死代码
- 修复 LiveClock.tsx CopyButton size 属性类型错误 (small → sm)
- 修复 ToolCard.tsx 紫色 RGB 值拼写错误 (147,51,2 purple → 147,51,232)
- 替换 4 处硬编码中文为 i18n 调用 (StorageCleaner, JsonTools)
- MarkdownToHtml 预览链接色改为 CSS 变量以支持暗黑模式
- 移除 Base64Converter 中已被 Base64ConverterSection 替代的死代码
(FileMode.tsx, ImageMode.tsx 及其测试文件)
- 更新 README.md 移除对已删除文件的引用
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix(CopyButton, LiveClock): 修改按钮大小为 'icon',移除硬编码颜色配置
* refactor(TextInputArea): 复用 CopyButton 组件替换内联复制逻辑
* fix(test): 修复 CopyButton mock 未捕获 clipboard writeText 异常
---------
Co-authored-by: Ubuntu <ubuntu@localhost.localdomain >
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-28 00:40:54 +08:00
雨霖铃
c61b599287
docs: 添加项目文档(copilot-instructions、编码规范、各目录 README)
...
- 新增 .github/copilot-instructions.md:Copilot 指令文件,涵盖构建命令、CI 流水线、项目架构、关键规范
- 新增 .github/CODING_STANDARDS.md:完整的代码编写规范文档(TypeScript、React、样式、错误处理、命名、测试、Hook、i18n、存储等 12 个章节)
- 新增 11 个目录的 README.md:components、components/ui、config、entrypoints、i18n、lib、pages、providers、public、src、types、utils
- 更新 AGENTS.md:补充页面组件模式说明和 components/ui 目录
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-27 11:54:21 +08:00
LingandRX
57ea4d9858
Enhance form recognition, optimize UI, and unify components ( #19 )
...
- **docs**: 完善组件注释、README 目录结构及 AGENTS.md 文档。
- **refactor**:
- 提取通用 `PageHeader`、`Button`、`DashboardCard` 及 `ErrorBoundary` 组件。
- 重构消息通信机制,采用 `@webext-core/messaging` 实现类型安全。
- 将全局通知系统重构为 `SnackbarProvider` (后合并至 `GlobalSnackbar`)。
- 迁移样式系统至 MUI 主题,移除冗余 CSS。
- 优化路由配置,支持独立标签页模式及页面懒加载。
- 移除未使用文件、URL 工具及表单映射相关功能。
- **feat**:
- 新增配置导出功能(JSON)及状态提示。
- 新增侧边栏状态变化通知机制。
- 新增文本统计及 JWT 解析工具。
- 优化二维码生成与解析逻辑,换用更轻量的 `qrious` 和 `qr-scanner`。
- 增强高亮器功能,支持闪烁效果及 Shadow DOM 穿透。
- **style**: 优化仪表盘响应式网格布局及 UI 细节。
- **fix**: 修复 `useStorageState` 依赖缺失及路由初始化性能问题。
- **test**: 更新单元测试以覆盖新增的工具函数及功能特性。
2026-05-03 17:06:32 +08:00
LingandRX
84ffd2a132
Develop fastapi ( #6 )
...
* feat: add side panel with navigation and storage cleaner functionality
* feat: add OpenUrlPage and integrate into app navigation
* feat: 添加 GlobalSnackbar 组件并在多个页面中集成,替换原有 Snackbar 实现
* feat: fix OpenUrl sidebar issue with architecture refactor
- 修复原问题:不再直接替换侧边栏 URL,保持插件导航可见
- 采用配置页 + 查看页分离架构:OpenUrlPage (配置) + OpenUrlViewerPage (查看)
- 支持多个 URL 快捷方式管理(添加/删除)
- 每个 URL 提供两种打开方式:在侧边栏打开 / 在新标签页打开
- 侧边栏查看页使用 iframe 占满全部剩余空间
- 更新 TypeScript 类型定义
- 保留原有混合内容警告检查
- 数据持久化到 Chrome Storage
* refactor: centralized route management - consolidate routing config into single source
* feat: 更换logo
* refactor: code review fixes - security and race condition improvements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
Changes:
- wxt.config.ts: Remove unused `debugger` permission (no code uses it)
- OpenUrlPage.tsx: Fix unreachable showMessage after window.close()
- OpenUrlPage.tsx: Replace unnecessary div wrapper with Fragment to reduce DOM nesting
- OpenUrlViewerPage.tsx: Add URL validation to prevent XSS via javascript:/data: URLs
- OpenUrlViewerPage.tsx: Add sandbox attribute to iframe for security isolation
- OpenUrlViewerPage.tsx: Add error handling for invalid URLs
- StorageCleanerPage.tsx: Fix race condition in handleOptionChange preference saving
- StorageCleanerPage.tsx: Remove unnecessary storage reads when saving preferences (use state directly)
- StorageCleanerPage.tsx: Add timeout cleanup for setTimeout to follow React best practices
* feat: implement drill-down navigation with master-detail dashboard
* feat: enhance dashboard dynamism and refine options UI
* feat: overhaul storage cleaner UI with real-time size estimation and modern aesthetics
* feat: overhaul TimestampPage UI/UX and fix GlobalSnackbar positioning
* fix: decouple popup routing from storage sync and enhance OpenUrlPage UI
* fix: avoid closing sidepanel when opening URL preview from within sidepanel
2026-04-16 08:54:23 +08:00
雨霖铃
f4c2f6d374
feat: complete testing-tool browser extension with timestamp converter and storage cleaner
2026-03-23 08:11:05 +08:00