mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-02 10:21:16 +08:00
feat(preset): add icon configuration to provider presets
- Add icon/iconColor fields to CodexProviderPreset and GeminiProviderPreset interfaces - Configure icons for Claude presets (DeepSeek, Zhipu, Qwen, Kimi, MiniMax, DouBao, etc.) - Configure icons for Codex presets (OpenAI, Azure, PackyCode) - Configure icons for Gemini presets (Google, PackyCode) - Fix handlePresetChange to pass icon fields when resetting form This ensures preset icons are displayed in the icon picker when selecting a provider preset.
This commit is contained in:
@@ -20,6 +20,9 @@ export interface CodexProviderPreset {
|
||||
endpointCandidates?: string[];
|
||||
// 新增:视觉主题配置
|
||||
theme?: PresetTheme;
|
||||
// 图标配置
|
||||
icon?: string; // 图标名称
|
||||
iconColor?: string; // 图标颜色
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,6 +74,8 @@ export const codexProviderPresets: CodexProviderPreset[] = [
|
||||
backgroundColor: "#1F2937", // gray-800
|
||||
textColor: "#FFFFFF",
|
||||
},
|
||||
icon: "openai",
|
||||
iconColor: "#00A67E",
|
||||
},
|
||||
{
|
||||
name: "Azure OpenAI",
|
||||
@@ -97,6 +102,8 @@ requires_openai_auth = true`,
|
||||
backgroundColor: "#0078D4",
|
||||
textColor: "#FFFFFF",
|
||||
},
|
||||
icon: "azure",
|
||||
iconColor: "#0078D4",
|
||||
},
|
||||
{
|
||||
name: "AiHubMix",
|
||||
@@ -142,5 +149,6 @@ requires_openai_auth = true`,
|
||||
],
|
||||
isPartner: true, // 合作伙伴
|
||||
partnerPromotionKey: "packycode", // 促销信息 i18n key
|
||||
icon: "packycode",
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user