雨霖铃
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
雨霖铃
528621f16e
fix(tests): 修复 CI 失败的测试 - 补充 withTranslation 和 CopyButton mock
...
- vitest.setup.ts: react-i18next mock 添加 withTranslation HOC(读取 zh/common.json 翻译)
- vitest.setup.ts: 添加 @/components/CopyButton 全局 mock
- App 测试: 补充 withTranslation 导出
- TextMode 测试: 修复多个 CopyButton 实例导致的 getByTestId 冲突,改用 getByRole
2026-05-28 00:13:09 +08:00
雨霖铃
62c880b0a8
fix(CopyButton, LiveClock): 修改按钮大小为 'icon',移除硬编码颜色配置
2026-05-27 17:07:39 +08:00
雨霖铃
e263b63ced
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 >
2026-05-27 16:56:27 +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
42d3fedbaa
develop → main: 合并开发分支 ( #51 )
...
* 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
---------
Co-authored-by: Ubuntu <ubuntu@localhost.localdomain >
2026-05-26 15:08:53 +08:00
雨霖铃
0f3b6c4cd8
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
2026-05-25 20:29:12 +08:00
雨霖铃
af2262d2c9
fix: remove unnecessary animations from RightClickRestorer page
2026-05-25 20:15:23 +08:00
雨霖铃
e5ae802ab2
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
2026-05-25 20:11:39 +08:00
雨霖铃
8ec36ac3b3
test: fix i18n namespace assertions in Base64Converter and QrCode tests
...
Align test selectors with useLazyTranslation mock which prefixes keys
with namespace (e.g. base64Converter:encode). Also remove obsolete
page title assertions for components that no longer render titles.
2026-05-23 14:04:10 +08:00
雨霖铃
df3eee8749
refactor: 移除所有页面的 PageHeader 组件
...
删除 PageHeader 组件及其测试文件,清理相关不再使用的导入和变量。
2026-05-23 13:15:25 +08:00
雨霖铃
cf05df7022
fix(i18n): replace useTranslation with useLazyTranslation in Base64Converter
...
Fix missing translations by ensuring base64Converter namespace is dynamically loaded.
2026-05-23 13:07:31 +08:00
雨霖铃
e0888c7fb3
refactor: remove remaining config/pageTheme dependencies
...
- Replace base64ConverterPageStyles.primaryColor with inline text-indigo-800
- Replace qrCodePageStyles.primaryColor with inline text-green-700
- Remove obsolete page-error-boundary design doc
2026-05-23 12:58:35 +08:00
雨霖铃
8b2bca9eef
refactor(timestamp): migrate pageTheme constants to Timestamp feature
...
Remove config/pageTheme.ts and move DATE_FORMAT, ZONES, UnitType, ZoneType
to pages/Timestamp/constants.ts for better feature cohesion.
2026-05-23 12:57:51 +08:00
雨霖铃
6bac88fbc4
feat(right-click-restorer): add unsupported page detection
...
- Detect and block chrome://, chrome-extension://, about://, edge://, brave:// pages
- Show 'Unsupported' badge with warning icon and disabled button
- Add 'unsupported' and 'unsupportedDesc' i18n keys (zh/en)
- Update useRightClickRestorer hook with isUnsupported state
- Add unit tests for unsupported page behavior
- Update page UI to render conditional unsupported layout
2026-05-23 12:46:20 +08:00
雨霖铃
4c08e17b19
fix(right-click-restorer): prevent domain overflow in domain card
...
- Add truncate/min-w-0/flex-1 to domain code block for ellipsis
- Add shrink-0 to Badge to prevent compression
- Add gap-2 for consistent spacing
2026-05-23 12:41:42 +08:00
雨霖铃
fa0f1bdcad
feat: add right-click restorer for current site
...
- Add RightClickRestorer page with active unlock trigger
- Content script with dual-world strategy (isolated + main world)
- Monkey patch preventDefault/stopPropagation via background executeScript
- Overlay penetration for pointer-events blocking layers
- Delegated main-world injection to avoid CSP restrictions
- Async message handling for reliable state updates
- i18n translations (zh/en) and unit tests
2026-05-23 12:39:14 +08:00
雨霖铃
a0e6871b16
refactor: rename autoRefresh to reloadAfterClean for clarity and consistency across components
2026-05-23 10:02:02 +08:00
雨霖铃
5e23b29a25
refactor: use regex matchers for i18n text and add uniform mocks in test files
2026-05-22 23:51:16 +08:00
雨霖铃
272bcae904
refactor: 优化 MarkdownToHtml 预览样式,剥离 CSS 变量回退值并增强 iframe 暗色模式自适应
2026-05-22 22:46:13 +08:00
雨霖铃
539f9648b1
refactor: 优化 Dashboard 布局及 ToolCard 描述文本截断处理
2026-05-22 22:37:45 +08:00
雨霖铃
7e58b5688f
refactor: 重构 QrCode 页面为声明式响应架构并统一 shadcn 样式
2026-05-22 22:32:11 +08:00
雨霖铃
89e33f6273
refactor: 抽离 useBase64Converter hook 并新增 Base64ConverterSection 组件,统一 Base64 转换页面的 shadcn 样式
2026-05-22 22:26:35 +08:00
雨霖铃
9601afdd49
refactor: 重构 HtmlToMarkdown 和 MarkdownToHtml 页面,统一 shadcn 样式并优化打印与暗色模式
2026-05-22 22:06:34 +08:00
雨霖铃
ae0b923e11
refactor: 重构 Dashboard 页面和 ToolCard 组件,全面迁移至 shadcn 样式并优化布局
2026-05-22 21:56:09 +08:00
雨霖铃
917fca5947
refactor: 全面重构 Jwt 页面,采用防抖输入并统一 shadcn 样式
2026-05-22 21:46:45 +08:00
雨霖铃
d2e5e6b45d
refactor: 全面重构 JsonTools 页面,采用声明式响应架构并统一 shadcn 样式
2026-05-22 21:45:13 +08:00
雨霖铃
336b62256d
refactor: 全面迁移 StorageCleaner 页面至 shadcn 样式并移除 GlobalSnackbar 依赖
2026-05-22 21:26:02 +08:00
雨霖铃
67553afe9c
refactor: 将 TextStatistics 页面和 TextInputArea 组件全面迁移至 shadcn 样式并优化布局
2026-05-22 21:10:52 +08:00
雨霖铃
02aef0c7b1
refactor: 重构 Timestamp 页面使用响应式 Hook 统一状态并全面迁移至 shadcn 样式
2026-05-22 21:03:48 +08:00
雨霖铃
21e44cb889
refactor: 移除 MUI sx 样式和未使用的 GlobalSnackbar 引用
2026-05-22 20:51:57 +08:00
雨霖铃
b3dd7146ad
refactor: 重构 CopyButton 与 RouterContainer 组件,移除 GlobalSnackbar 并统一使用 sonner toast 和 cn 工具函数
2026-05-22 20:51:13 +08:00
雨霖铃
cf0d19914c
refactor: remove DomainHeader component and its usage
2026-05-22 20:44:59 +08:00
雨霖铃
72883b5d1d
fix: 增强 SwitchButtonGroup 和立即转换按钮的视觉层级
...
- SwitchButtonGroup 选中按钮阴影从 shadow-sm 升级到 shadow-md
- 同步更新单元测试中断言
- Timestamp 立即转换按钮添加 shadow-md 增强边界感
2026-05-22 18:08:44 +08:00
雨霖铃
c7beebf6e0
fix: 修复输入框和按钮在暗色模式下的样式问题
...
- 为 :root 和 .dark 添加 color-scheme,使浏览器表单控件默认样式适配暗色模式
- 将 bg-primary 搭配 text-white 的按钮改为 text-primary-foreground
- 替换残留的 hover:bg-blue-700、text-blue-500、bg-gray-200 等硬编码颜色
- 同步更新 TextInputArea 单元测试
2026-05-22 17:36:37 +08:00
雨霖铃
de7da9f1db
fix: 修复暗黑模式样式兼容性
...
- 在 tailwind.config.js 中启用 darkMode: 'class' 并扩展语义化颜色变量
- 将全项目硬编码颜色(bg-white、text-gray-*、border-gray-* 等)替换为语义化类名
- 修复 popup/index.html 硬编码浅色背景色
- 同步更新相关单元测试中的类名断言
2026-05-22 16:04:50 +08:00
雨霖铃
e2dd5f5915
重写所有页面和组件:用纯 Tailwind CSS 替换 MUI 组件和图标
2026-05-22 00:51:11 +08:00
雨霖铃
1bc3ee59a0
重写基础骨架组件:用纯 Tailwind CSS 替换 MUI Box 组件
2026-05-22 00:44:32 +08:00
雨霖铃
6711783975
修复 TypeScript 类型错误:将 MUI sx 语法改成标准 CSS 属性
2026-05-22 00:38:48 +08:00
雨霖铃
37618eb71f
用 Tailwind CSS 重写 JsonTools 页面
2026-05-22 00:07:56 +08:00
雨霖铃
d2334c5e95
用 Tailwind CSS 重写 StorageCleaner 页面,创建 shadcn/ui Dialog 组件
2026-05-22 00:00:04 +08:00
雨霖铃
a4533be2c1
用 Tailwind CSS 重写 Jwt 页面
2026-05-21 23:52:20 +08:00
雨霖铃
83bf9dd342
用 Tailwind CSS 重写 QrCode 页面及相关组件
2026-05-21 23:46:44 +08:00
雨霖铃
8902bc0f10
用 Tailwind CSS 重写 Base64Converter 页面
2026-05-21 23:40:52 +08:00
雨霖铃
4753a7b54d
用 Tailwind CSS 重写 TextStatistics 页面
2026-05-21 23:35:25 +08:00
雨霖铃
7f9bf2334c
用 Tailwind CSS 重写 Dashboard/index.tsx 和 ToolCard.tsx
2026-05-21 23:32:19 +08:00
雨霖铃
6bd05aa6f1
用 Tailwind CSS 重构 ResultView 和 LiveClock 组件
2026-05-21 23:23:13 +08:00
雨霖铃
bdb40343b1
用 Tailwind CSS 重写 Timestamp 页面的 MUI 基础排版组件
2026-05-21 23:13:29 +08:00
雨霖铃
9a9336aea8
替换 Timestamp 页面图标为 lucide-react 的 Clock 图标
2026-05-21 23:00:44 +08:00
雨霖铃
f1f0047928
test: 修复测试中的 act() 警告和 clipboard mock 问题
...
- TextInputArea: 使用 userEvent 替代 fireEvent,用 vi.spyOn 替代 Object.assign mock clipboard
- ImageMode/FileMode: 添加 waitForStorageReady() 等待 useStorageState 异步初始化
2026-05-21 22:06:09 +08:00