refactor: 统一中文文案并简化组件结构,提升代码可读性

移除 chrome.i18n 后,将各功能页面、布局与工具模块的 UI 文案改为内联中文;
删除冗余注释与过度抽象(如 ToolCard、StatCard),精简 props 与状态管理;
同步优化 JsonTools、StorageCleaner、Timestamp、TestDataGenerator、Dashboard、
Base64Converter、RightClickRestorer、TextStatistics、TopBar、RouterProvider、
ThemeModeProvider 及生成器库与 utils 工具文件。
This commit is contained in:
雨霖铃
2026-06-27 10:49:36 +08:00
parent f3a9838017
commit d38bafe237
85 changed files with 324 additions and 864 deletions
@@ -14,15 +14,16 @@ export default function ResultView({
className,
...props
}: ResultViewProps) {
if (!result && !showEmptyPlaceholder) return null;
if (!result) {
if (!showEmptyPlaceholder) return null;
return (
<EmptyPlaceholder
className={cn('flex-1 min-h-[320px]', className)}
messageClassName="text-sm font-medium text-muted-foreground max-w-none"
{...props}
>
{'请输入并点击转换'}
</EmptyPlaceholder>
);
}
@@ -30,7 +31,7 @@ export default function ResultView({
return (
<div className={cn('flex flex-col w-full', className)} {...props}>
<span className="block text-muted-foreground/90 mb-2.5 text-xs font-semibold tracking-wider uppercase">
{'转换结果'}
</span>
<div className="bg-card text-card-foreground border border-border p-4 sm:p-5 rounded-xl relative shadow-sm flex justify-between items-center gap-4 focus-within:ring-1 focus-within:ring-ring">
@@ -39,7 +40,7 @@ export default function ResultView({
</span>
<CopyButton
text={result}
tooltip={'复制结果'}
tooltip="复制结果"
variant="ghost"
size="icon"
className="h-7 w-7 text-muted-foreground hover:text-foreground"