diff --git a/frontend/src/pages/Dashboard/components/ApplicationCard.tsx b/frontend/src/pages/Dashboard/components/ApplicationCard.tsx index 3b50849a..ff9a32ed 100644 --- a/frontend/src/pages/Dashboard/components/ApplicationCard.tsx +++ b/frontend/src/pages/Dashboard/components/ApplicationCard.tsx @@ -4,7 +4,6 @@ import { Skeleton } from "@/components/ui/skeleton"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; import { - Package, GitBranch, Rocket, CheckCircle2, @@ -18,6 +17,7 @@ import { Hash, } from "lucide-react"; import { formatDuration, formatTime, getStatusIcon, getStatusText } from '../utils/dashboardUtils'; +import { getLanguageIcon } from '../utils/languageIcons'; import type { ApplicationConfig, DeployEnvironment, DeployRecord } from '../types'; import { DeployFlowGraphModal } from './DeployFlowGraphModal'; import DeploymentFormModal from './DeploymentFormModal'; @@ -41,6 +41,9 @@ export const ApplicationCard: React.FC = ({ const [flowModalOpen, setFlowModalOpen] = useState(false); const [deployDialogOpen, setDeployDialogOpen] = useState(false); + // 获取语言图标配置 + const languageConfig = getLanguageIcon(app.language); + const handleDeployRecordClick = (record: DeployRecord) => { setSelectedDeployRecordId(record.id); setFlowModalOpen(true); @@ -50,7 +53,26 @@ export const ApplicationCard: React.FC = ({
{/* 应用基本信息 - 固定高度确保一致性 */}
- + + + + + {languageConfig.icon} + + + +

{languageConfig.label}

+
+
+
{app.applicationName ? (

{app.applicationName}

diff --git a/frontend/src/pages/Dashboard/types.ts b/frontend/src/pages/Dashboard/types.ts index 86989f42..80a79188 100644 --- a/frontend/src/pages/Dashboard/types.ts +++ b/frontend/src/pages/Dashboard/types.ts @@ -1,3 +1,5 @@ +import type { DevelopmentLanguageTypeEnum } from '@/pages/Deploy/Application/List/types'; + export interface Approver { userId: number; username: string; @@ -46,6 +48,7 @@ export interface ApplicationConfig { applicationCode: string; applicationName: string; applicationDesc?: string; + language?: DevelopmentLanguageTypeEnum; // 开发语言 buildType?: BuildType; // 构建类型 branch: string; deployBranch?: string; // 🆕 部署分支