From 456a4bede2a8d8aafc3fc6aec46fa8d56dabbffe Mon Sep 17 00:00:00 2001 From: dengqichen Date: Thu, 4 Dec 2025 13:59:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9B=BE=E6=A0=87=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=EF=BC=8C=E5=8C=BA=E5=88=86=E6=B8=85=E6=A5=9A=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dashboard/components/ApplicationCard.tsx | 26 +++++++++++++++++-- frontend/src/pages/Dashboard/types.ts | 3 +++ 2 files changed, 27 insertions(+), 2 deletions(-) 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; // 🆕 部署分支