Skip to content

Commit 6021dc1

Browse files
committed
style: 调整 records 页提供商染色策略,提升来源识别度与颜色区分度
1 parent 00a4e18 commit 6021dc1

File tree

2 files changed

+36
-10
lines changed

2 files changed

+36
-10
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# CHANGELOG
22

3-
按日期记录主要变更(简版:写“改了什么 + 作用”)。
3+
## 2026-02-15
4+
5+
- 调整 `records` 页提供商染色策略:覆盖 `GeminiCLI``Vertex``AIStudio``Antigravity``Claude``Codex``Qwen``Kimi``iFlow`(大小写不敏感),提升来源识别度与颜色区分度。
46

57
## 2026-02-14
68

app/records/page.tsx

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -728,17 +728,41 @@ export default function RecordsPage() {
728728
}, []);
729729

730730
const providerTone = useCallback((provider: string | null) => {
731-
const val = (provider || "").toLowerCase();
732-
if (val.includes("openai")) return "bg-emerald-500/20 text-emerald-200 ring-1 ring-emerald-500/40";
733-
if (val.includes("anthropic") || val.includes("claude")) return "bg-orange-500/20 text-orange-200 ring-1 ring-orange-500/40";
734-
if (val.includes("google") || val.includes("gemini")) return "bg-blue-500/20 text-blue-200 ring-1 ring-blue-500/40";
735-
if (val.includes("azure")) return "bg-cyan-500/20 text-cyan-200 ring-1 ring-cyan-500/40";
736-
if (val.includes("deepseek")) return "bg-indigo-500/20 text-indigo-200 ring-1 ring-indigo-500/40";
737-
if (val.includes("xai") || val.includes("grok")) return "bg-fuchsia-500/20 text-fuchsia-200 ring-1 ring-fuchsia-500/40";
738-
if (val.includes("openrouter")) return "bg-violet-500/20 text-violet-200 ring-1 ring-violet-500/40";
731+
const val = (provider || "").trim().toLowerCase();
732+
733+
// 指定 provider(无视大小写)
734+
if (val.includes("geminicli") || val.includes("gemini")) {
735+
return "bg-indigo-500/20 text-indigo-200 ring-1 ring-indigo-500/40";
736+
}
737+
if (val.includes("vertex")) return "bg-sky-500/20 text-sky-200 ring-1 ring-sky-500/40";
738+
if (val.includes("aistudio") || val.includes("ai studio")) {
739+
return "bg-cyan-500/20 text-cyan-200 ring-1 ring-cyan-500/40";
740+
}
741+
if (val.includes("antigravity")) {
742+
return "bg-fuchsia-500/20 text-fuchsia-200 ring-1 ring-fuchsia-500/40";
743+
}
744+
if (val.includes("claude") || val.includes("anthropic")) {
745+
return "bg-orange-500/20 text-orange-200 ring-1 ring-orange-500/40";
746+
}
747+
if (val.includes("codex") || val.includes("openai")) {
748+
return "bg-emerald-500/20 text-emerald-200 ring-1 ring-emerald-500/40";
749+
}
739750
if (val.includes("qwen") || val.includes("aliyun") || val.includes("dashscope")) {
740-
return "bg-yellow-500/20 text-yellow-200 ring-1 ring-yellow-500/40";
751+
return "bg-amber-500/20 text-amber-200 ring-1 ring-amber-500/40";
752+
}
753+
if (val.includes("kimi") || val.includes("moonshot")) {
754+
return "bg-rose-500/20 text-rose-200 ring-1 ring-rose-500/40";
741755
}
756+
if (val.includes("iflow") || val.includes("i-flow")) {
757+
return "bg-lime-500/20 text-lime-200 ring-1 ring-lime-500/40";
758+
}
759+
760+
// 兼容历史 provider
761+
if (val.includes("openrouter")) return "bg-violet-500/20 text-violet-200 ring-1 ring-violet-500/40";
762+
if (val.includes("google")) return "bg-blue-500/20 text-blue-200 ring-1 ring-blue-500/40";
763+
if (val.includes("azure")) return "bg-cyan-500/20 text-cyan-200 ring-1 ring-cyan-500/40";
764+
if (val.includes("deepseek")) return "bg-indigo-500/20 text-indigo-200 ring-1 ring-indigo-500/40";
765+
if (val.includes("xai") || val.includes("grok")) return "bg-purple-500/20 text-purple-200 ring-1 ring-purple-500/40";
742766
return "bg-slate-700/60 text-slate-300 ring-1 ring-slate-600";
743767
}, []);
744768

0 commit comments

Comments
 (0)