import { CodeOutlined, JavaOutlined, NodeIndexOutlined, PythonOutlined, } from '@ant-design/icons'; import { DevelopmentLanguageTypeEnum } from '@/pages/Deploy/Application/List/types'; interface LanguageIconConfig { icon: React.ReactNode; color: string; label: string; } /** * 语言图标配置映射(与 /deploy/applications 保持一致) */ export const LANGUAGE_ICONS: Record = { JAVA: { icon: , color: '#E76F00', label: 'Java' }, NODE_JS: { icon: , color: '#339933', label: 'NodeJS' }, PYTHON: { icon: , color: '#3776AB', label: 'Python' }, GO: { icon: , color: '#00ADD8', label: 'Go' } }; /** * 获取语言图标配置 */ export const getLanguageIcon = (language?: DevelopmentLanguageTypeEnum): LanguageIconConfig => { if (!language) { return { icon: , color: '#666666', label: '未知' }; } return LANGUAGE_ICONS[language] || { icon: , color: '#666666', label: language }; };