From d455641b86d3cb59d37f9df144a16428594cd5ba Mon Sep 17 00:00:00 2001 From: xiezhouwei Date: Wed, 17 Jun 2026 11:39:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AF=84=E6=B5=8B=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=B5=85=E8=89=B2=E6=A8=A1=E5=BC=8F=E6=A0=B7=E5=BC=8F=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=20-=20=E5=88=87=E6=8D=A2=E4=B8=BA=20shadcn/ui=20?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E5=8F=98=E9=87=8F=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:Benchmarks 页面所有 Tailwind 样式使用硬编码暗色类 (bg-gray-950/text-white/bg-white/5/border-white/10 等), 导致浅色模式下显示为深色背景+白字,完全不可见。 修改:将所有 hardcoded dark-mode 类替换为 shadcn/ui CSS 变量类: - bg-gray-950 → bg-background - text-white/text-gray-* → text-foreground/text-muted-foreground - border-white/* → border-border - bg-white/* → bg-muted/* 和 bg-primary/* - 卡片:添加上下模式 gradient(light:from-purple-50 dark:from-purple-950/40) - 筛选/搜索/进度条/标签等全部适配 dual-theme - 额外优化:分类图标更新、加载动画主题化 --- $null | 1 - l.href)) | 5 ++ web/src/pages/Benchmarks/index.jsx | 134 +++++++++++++++-------------- 3 files changed, 73 insertions(+), 67 deletions(-) create mode 100644 l.href)) diff --git a/$null b/$null index 6e4b3b7..e69de29 100644 --- a/$null +++ b/$null @@ -1 +0,0 @@ -ERROR: The process "main.exe" not found. diff --git a/l.href)) b/l.href)) new file mode 100644 index 0000000..6362214 --- /dev/null +++ b/l.href)) @@ -0,0 +1,5 @@ +### Error +SyntaxError: Unexpected token ')' + at eval (eval at evaluate (:303:30), :2:38) + at UtilityScript.evaluate (:305:16) + at UtilityScript. (:1:44) diff --git a/web/src/pages/Benchmarks/index.jsx b/web/src/pages/Benchmarks/index.jsx index 2702ac7..e41650b 100644 --- a/web/src/pages/Benchmarks/index.jsx +++ b/web/src/pages/Benchmarks/index.jsx @@ -23,6 +23,8 @@ import { TrendingUp, Gauge, Sparkles, + Activity, + BarChart3, } from 'lucide-react'; const COLORS = { @@ -34,10 +36,10 @@ const COLORS = { }; const CATEGORIES = [ - { key: 'all', label: '全部', icon: Sparkles }, + { key: 'all', label: '全部', icon: BarChart3 }, { key: 'language', label: '语言模型', icon: Brain }, - { key: 'image', label: '图像模型', icon: Zap }, - { key: 'video', label: '视频模型', icon: Zap }, + { key: 'image', label: '图像模型', icon: Sparkles }, + { key: 'video', label: '视频模型', icon: Activity }, ]; /* ─── Default benchmark data (fallback when API unavailable) ─── */ @@ -165,19 +167,19 @@ const Benchmarks = () => { if (loading) { return ( -
-
+
+
); } const SortHeader = ({ label, sortField, icon: Icon }) => ( toggleSort(sortField)} >
- {Icon && } + {Icon && } {label} {sortKey === sortField && ( { ); return ( -
+
{/* Header */}

{t('AI 模型评测排行榜')}

-

+

{t('基于 Artificial Analysis 数据,从智能指数、输出速度、价格成本、延迟等维度对主流 AI 模型进行多维度对比评测')}

@@ -205,82 +207,82 @@ const Benchmarks = () => { {/* Highlight Cards */}
{topIntel[0] && ( -
+
- - + + {t('智能冠军')}
-
+
{topIntel[0].name}
-
{topIntel[0].provider}
+
{topIntel[0].provider}
- + {topIntel[0].intelligence} - / 60 + / 60
)} {fastest && ( -
+
- - + + {t('速度之王')}
-
+
{fastest.name}
-
{fastest.provider}
+
{fastest.provider}
- + {fastest.speed?.toLocaleString()} - tok/s + tok/s
)} {cheapest && ( -
+
- - + + {t('性价比首选')}
-
+
{cheapest.name}
-
{cheapest.provider}
+
{cheapest.provider}
- + ${cheapest.price?.toFixed(2)} - /M tokens + /M tokens
)} {lowestLatency && ( -
+
- - + + {t('低延迟标杆')}
-
+
{lowestLatency.name}
-
{lowestLatency.provider}
+
{lowestLatency.provider}
- + {lowestLatency.latency?.toFixed(2)} - {t('秒')} + {t('秒')}
)} @@ -298,8 +300,8 @@ const Benchmarks = () => { onClick={() => setActiveCategory(cat.key)} className={`flex items-center gap-1.5 px-3.5 py-1.5 rounded-lg text-xs font-medium transition-all duration-150 ${ isActive - ? 'bg-white/10 text-white border border-white/20' - : 'bg-white/5 text-gray-400 border border-transparent hover:bg-white/10 hover:text-gray-300' + ? 'bg-primary/10 text-foreground border border-border' + : 'bg-muted/40 text-muted-foreground border border-transparent hover:bg-muted/60 hover:text-foreground/80' }`} > @@ -311,34 +313,34 @@ const Benchmarks = () => {
setSearchTerm(e.target.value)} - className="w-full bg-white/5 border border-white/10 rounded-lg pl-9 pr-3 py-2 text-sm text-white placeholder-gray-500 focus:outline-none focus:border-white/30 focus:bg-white/10 transition-all" + className="w-full bg-muted/30 border border-input rounded-lg pl-9 pr-3 py-2 text-sm text-foreground placeholder-muted-foreground/50 focus:outline-none focus:border-ring focus:bg-muted/50 transition-all" />
{/* Model Count */} -
+
{t('共 {count} 个模型', { count: filteredModels.length })}
{/* Table */} -
+
- - + - @@ -354,39 +356,39 @@ const Benchmarks = () => { icon={DollarSign} /> - - - + {filteredModels.map((model, idx) => ( - @@ -435,8 +437,8 @@ const Benchmarks = () => { {model.type === 'reasoning' @@ -449,14 +451,14 @@ const Benchmarks = () => {
+
# +
- + {t('模型名称')}
+
- + {t('上下文')}
+ {t('类型')}
+ {idx + 1}
- + {model.name} - + {model.provider}
-
+
{ }} />
- + {model.intelligence}
-
+
{ }} />
- + {model.speed?.toLocaleString()}
- + ${model.price?.toFixed(2)} - + {model.latency?.toFixed(2)}s - + {model.context_window || '-'}
{filteredModels.length === 0 && ( -
+
{t('暂未找到匹配的模型')}
)}
{/* Footer */} -
+
{t('数据来源: Artificial Analysis | 数据持续更新中')}