Skip to content

Commit 80a2af9

Browse files
committed
chore: remove unnecessary dark mode changes
1 parent 128866d commit 80a2af9

File tree

8 files changed

+154
-144
lines changed

8 files changed

+154
-144
lines changed

src/App.jsx

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ function App() {
201201
<div
202202
className="fixed inset-0 bg-blue-600 bg-opacity-95 z-50 flex items-center justify-center backdrop-blur-sm drag-overlay-fade-in"
203203
>
204-
<div
205-
className="bg-white dark:bg-gray-800 dark:text-gray-100 rounded-xl shadow-2xl p-8 text-center max-w-md mx-4 border-4 border-dashed border-blue-300 drag-modal-scale-in"
204+
<div
205+
className="bg-white rounded-xl shadow-2xl p-8 text-center max-w-md mx-4 border-4 border-dashed border-blue-300 drag-modal-scale-in"
206206
>
207207
<div className="mb-6">
208208
<div className="relative">
@@ -227,13 +227,13 @@ function App() {
227227
</div>
228228
</div>
229229
</div>
230-
<h3 className="text-xl font-bold text-gray-900 dark:text-gray-100 mb-3">
230+
<h3 className="text-xl font-bold text-gray-900 mb-3">
231231
🎯 释放文件以上传
232232
</h3>
233-
<p className="text-sm text-gray-600 dark:text-gray-300 mb-2">
233+
<p className="text-sm text-gray-600 mb-2">
234234
支持 <span className="font-semibold text-blue-600">所有文本格式</span> 文件
235235
</p>
236-
<p className="text-xs text-gray-500 dark:text-gray-400">
236+
<p className="text-xs text-gray-500">
237237
拖拽到页面任意位置即可快速上传文件
238238
</p>
239239
</div>
@@ -243,7 +243,7 @@ function App() {
243243
{!sidebarVisible && (
244244
<button
245245
onClick={() => setSidebarVisible(true)}
246-
className="fixed top-3 left-3 z-40 p-2 bg-white dark:bg-gray-800 rounded-full shadow-md text-gray-600 dark:text-gray-100 hover:text-gray-800 dark:hover:text-gray-200 focus:outline-none focus:ring-2 focus:ring-blue-500"
246+
className="fixed top-3 left-3 z-40 p-2 bg-white rounded-full shadow-md text-gray-600 hover:text-gray-800 focus:outline-none focus:ring-2 focus:ring-blue-500"
247247
aria-label="显示工具栏"
248248
>
249249
<PanelLeftOpen size={20} aria-hidden="true" />
@@ -264,7 +264,7 @@ function App() {
264264
aria-label="控制面板"
265265
>
266266
{/* 标题信息 */}
267-
<div className="bg-white dark:bg-gray-800 dark:text-gray-100 rounded-lg shadow-md p-3">
267+
<div className="bg-white rounded-lg shadow-md p-3">
268268
<div className="flex items-center gap-2 mb-2">
269269
<div className="p-2 bg-blue-100 rounded-lg">
270270
<svg className="w-5 h-5 text-blue-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
@@ -276,30 +276,30 @@ function App() {
276276
</h1>
277277
<button
278278
onClick={() => setSidebarVisible(false)}
279-
className="ml-auto p-1 text-gray-400 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded"
279+
className="ml-auto p-1 text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded"
280280
aria-label="隐藏工具栏"
281281
>
282282
<PanelLeftClose size={16} aria-hidden="true" />
283283
</button>
284284
</div>
285-
<p className="text-sm text-gray-600 dark:text-gray-300 mb-3">
285+
<p className="text-sm text-gray-600 mb-3">
286286
📊 分析和可视化大模型训练日志中的损失函数和梯度范数数据
287287
</p>
288288

289289
{/* 状态和链接按钮 */}
290290
<div className="flex items-center gap-2" role="group" aria-label="工具状态和链接">
291-
<span
292-
className="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-100"
291+
<span
292+
className="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800"
293293
aria-label="当前为在线版本"
294294
>
295295
<span aria-hidden="true">🌐</span>
296296
<span className="ml-1">在线使用</span>
297297
</span>
298-
<a
298+
<a
299299
href="https://github.com/JavaZeroo/log-parser"
300300
target="_blank"
301301
rel="noopener noreferrer"
302-
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 dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
302+
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"
303303
aria-label="访问 GitHub 仓库(在新窗口中打开)"
304304
>
305305
<svg className="w-3 h-3" fill="currentColor" viewBox="0 0 20 20">
@@ -336,26 +336,26 @@ function App() {
336336
/>
337337
)}
338338

339-
<section className="bg-white dark:bg-gray-800 dark:text-gray-100 rounded-lg shadow-md p-3" aria-labelledby="display-options-heading">
340-
<h3
339+
<section className="bg-white rounded-lg shadow-md p-3" aria-labelledby="display-options-heading">
340+
<h3
341341
id="display-options-heading"
342-
className="text-base font-semibold text-gray-800 dark:text-gray-100 mb-2"
342+
className="text-base font-semibold text-gray-800 mb-2"
343343
>
344344
🎛️ 显示选项
345345
</h3>
346346
<div className="space-y-3">
347347
<div>
348-
<h4 className="text-xs font-medium text-gray-700 dark:text-gray-300 mb-2">📊 图表显示</h4>
349-
<p className="text-xs text-gray-500 dark:text-gray-400">上传文件后自动展示所有已配置的指标图表</p>
348+
<h4 className="text-xs font-medium text-gray-700 mb-2">📊 图表显示</h4>
349+
<p className="text-xs text-gray-500">上传文件后自动展示所有已配置的指标图表</p>
350350
</div>
351351

352-
<div className="border-t dark:border-gray-700 pt-3">
353-
<h4 className="text-xs font-medium text-gray-700 dark:text-gray-300 mb-2">基准线设置</h4>
352+
<div className="border-t pt-3">
353+
<h4 className="text-xs font-medium text-gray-700 mb-2">基准线设置</h4>
354354
<div className="space-y-3">
355355
<div>
356356
<label
357357
htmlFor="relative-baseline"
358-
className="block text-xs font-medium text-gray-700 dark:text-gray-300 mb-1"
358+
className="block text-xs font-medium text-gray-700 mb-1"
359359
>
360360
相对误差 Baseline
361361
</label>
@@ -365,7 +365,7 @@ function App() {
365365
step="0.001"
366366
value={relativeBaseline}
367367
onChange={(e) => setRelativeBaseline(parseFloat(e.target.value) || 0)}
368-
className="w-full px-2 py-1 text-xs border border-gray-300 dark:border-gray-600 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 focus:outline-none"
368+
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"
369369
placeholder="0.002"
370370
aria-describedby="relative-baseline-description"
371371
/>
@@ -380,7 +380,7 @@ function App() {
380380
<div>
381381
<label
382382
htmlFor="absolute-baseline"
383-
className="block text-xs font-medium text-gray-700 dark:text-gray-300 mb-1"
383+
className="block text-xs font-medium text-gray-700 mb-1"
384384
>
385385
绝对误差 Baseline
386386
</label>
@@ -390,7 +390,7 @@ function App() {
390390
step="0.001"
391391
value={absoluteBaseline}
392392
onChange={(e) => setAbsoluteBaseline(parseFloat(e.target.value) || 0)}
393-
className="w-full px-2 py-1 text-xs border border-gray-300 dark:border-gray-600 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 focus:outline-none"
393+
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"
394394
placeholder="0.005"
395395
aria-describedby="absolute-baseline-description"
396396
/>

src/components/ChartContainer.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,8 @@ export default function ChartContainer({
532532

533533
if (parsedData.length === 0) {
534534
return (
535-
<div className="bg-white dark:bg-gray-800 dark:text-gray-100 rounded-lg shadow-md p-8">
536-
<div className="text-center text-gray-500 dark:text-gray-400">
535+
<div className="bg-white rounded-lg shadow-md p-8">
536+
<div className="text-center text-gray-500">
537537
<p className="text-lg mb-2">📊 暂无数据</p>
538538
<p>📁 请上传日志文件开始分析</p>
539539
</div>
@@ -559,8 +559,8 @@ export default function ChartContainer({
559559

560560
if (metrics.length === 0) {
561561
return (
562-
<div className="bg-white dark:bg-gray-800 dark:text-gray-100 rounded-lg shadow-md p-8">
563-
<div className="text-center text-gray-500 dark:text-gray-400">
562+
<div className="bg-white rounded-lg shadow-md p-8">
563+
<div className="text-center text-gray-500">
564564
<p className="text-lg mb-2 font-medium">🎯 请选择要显示的图表</p>
565565
</div>
566566
</div>
@@ -639,8 +639,8 @@ export default function ChartContainer({
639639
</ResizablePanel>
640640
{comparisonChart}
641641
{stats && (
642-
<div className="bg-white dark:bg-gray-800 dark:text-gray-100 rounded-lg shadow-md p-3">
643-
<h4 className="text-sm font-medium text-gray-700 dark:text-gray-200 mb-1">{key} 差值统计</h4>
642+
<div className="bg-white rounded-lg shadow-md p-3">
643+
<h4 className="text-sm font-medium text-gray-700 mb-1">{key} 差值统计</h4>
644644
<div className="space-y-1 text-xs">
645645
<p>平均误差 (normal): {stats.meanNormal.toFixed(6)}</p>
646646
<p>平均误差 (absolute): {stats.meanAbsolute.toFixed(6)}</p>

src/components/ComparisonControls.jsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ export function ComparisonControls({
1212
{ value: 'relative', label: '📊 平均相对误差 (absolute)', description: '绝对相对误差的平均' }
1313
];
1414

15-
return (
16-
<section className="bg-white dark:bg-gray-800 dark:text-gray-100 rounded-lg shadow-md p-3" aria-labelledby="comparison-controls-heading">
15+
return (
16+
<section className="bg-white rounded-lg shadow-md p-3" aria-labelledby="comparison-controls-heading">
1717
<div className="flex items-center gap-2 mb-2">
18-
<BarChart2
19-
size={16}
20-
className="text-gray-600 dark:text-gray-300"
21-
aria-hidden="true"
22-
/>
18+
<BarChart2
19+
size={16}
20+
className="text-gray-600"
21+
aria-hidden="true"
22+
/>
2323
<h3
24-
id="comparison-controls-heading"
25-
className="text-base font-semibold text-gray-800 dark:text-gray-100"
24+
id="comparison-controls-heading"
25+
className="text-base font-semibold text-gray-800"
2626
>
2727
⚖️ 对比模式
2828
</h3>
@@ -33,24 +33,24 @@ export function ComparisonControls({
3333
{modes.map(mode => (
3434
<label
3535
key={mode.value}
36-
className="flex items-center cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 p-1 rounded"
36+
className="flex items-center cursor-pointer hover:bg-gray-50 p-1 rounded"
3737
>
3838
<input
3939
type="radio"
4040
name="compareMode"
4141
value={mode.value}
4242
checked={compareMode === mode.value}
4343
onChange={(e) => onCompareModeChange(e.target.value)}
44-
className="text-blue-600 dark:text-blue-400 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
44+
className="text-blue-600 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
4545
aria-describedby={`mode-${mode.value}-description`}
4646
/>
4747
<div className="ml-2">
48-
<div className="text-xs font-medium text-gray-700 dark:text-gray-200">
48+
<div className="text-xs font-medium text-gray-700">
4949
{mode.label}
5050
</div>
5151
<div
5252
id={`mode-${mode.value}-description`}
53-
className="text-xs text-gray-500 dark:text-gray-400"
53+
className="text-xs text-gray-500"
5454
>
5555
{mode.description}
5656
</div>

0 commit comments

Comments
 (0)