diff --git a/src/App.jsx b/src/App.jsx index 950e072..fabdf3a 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -4,8 +4,8 @@ import { RegexControls } from './components/RegexControls'; import { FileList } from './components/FileList'; import ChartContainer from './components/ChartContainer'; import { ComparisonControls } from './components/ComparisonControls'; -import { Header } from './components/Header'; import { FileConfigModal } from './components/FileConfigModal'; +import { ThemeToggle } from './components/ThemeToggle'; import { PanelLeftClose, PanelLeftOpen } from 'lucide-react'; import { mergeFilesWithReplacement } from './utils/mergeFiles.js'; @@ -194,14 +194,14 @@ function App() { }, [handleGlobalDragEnter, handleGlobalDragOver, handleGlobalDragLeave, handleGlobalDrop]); return ( -
+
{/* 全页面拖拽覆盖层 */} {globalDragOver && (
-
@@ -226,13 +226,13 @@ function App() {
-

+

🎯 释放文件以上传

-

+

支持 所有文本格式 文件

-

+

拖拽到页面任意位置即可快速上传文件

@@ -242,7 +242,7 @@ function App() { {!sidebarVisible && (
-

+

📊 分析和可视化大模型训练日志中的损失函数和梯度范数数据

{/* 状态和链接按钮 */}
- @@ -298,7 +299,7 @@ function App() { href="https://github.com/JavaZeroo/log-parser" target="_blank" rel="noopener noreferrer" - className="inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-700 hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2" + className="inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-700 hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600" aria-label="访问 GitHub 仓库(在新窗口中打开)" > @@ -334,26 +335,26 @@ function App() { /> )} -
-

+

🎛️ 显示选项

-

📊 图表显示

-

上传文件后自动展示所有已配置的指标图表

+

📊 图表显示

+

上传文件后自动展示所有已配置的指标图表

-
-

基准线设置

+
+

基准线设置

- @@ -363,7 +364,7 @@ function App() { step="0.001" value={relativeBaseline} onChange={(e) => setRelativeBaseline(parseFloat(e.target.value) || 0)} - className="w-full px-2 py-1 text-xs border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 focus:outline-none" + className="input-field" placeholder="0.002" aria-describedby="relative-baseline-description" /> @@ -376,9 +377,9 @@ function App() {
- @@ -388,7 +389,7 @@ function App() { step="0.001" value={absoluteBaseline} onChange={(e) => setAbsoluteBaseline(parseFloat(e.target.value) || 0)} - className="w-full px-2 py-1 text-xs border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 focus:outline-none" + className="input-field" placeholder="0.005" aria-describedby="absolute-baseline-description" /> diff --git a/src/components/ChartContainer.jsx b/src/components/ChartContainer.jsx index a5f124a..5cda7ec 100644 --- a/src/components/ChartContainer.jsx +++ b/src/components/ChartContainer.jsx @@ -532,8 +532,8 @@ export default function ChartContainer({ if (parsedData.length === 0) { return ( -
-
+
+

📊 暂无数据

📁 请上传日志文件开始分析

@@ -559,8 +559,8 @@ export default function ChartContainer({ if (metrics.length === 0) { return ( -
-
+
+

🎯 请选择要显示的图表

@@ -639,8 +639,8 @@ export default function ChartContainer({ {comparisonChart} {stats && ( -
-

{key} 差值统计

+
+

{key} 差值统计

平均误差 (normal): {stats.meanNormal.toFixed(6)}

平均误差 (absolute): {stats.meanAbsolute.toFixed(6)}

diff --git a/src/components/ComparisonControls.jsx b/src/components/ComparisonControls.jsx index d844575..7447f60 100644 --- a/src/components/ComparisonControls.jsx +++ b/src/components/ComparisonControls.jsx @@ -13,16 +13,16 @@ export function ComparisonControls({ ]; return ( -
+
-