From 5cc4958eb0fbb8b57e682a9de1bc4751d7c2d684 Mon Sep 17 00:00:00 2001 From: dengqichen Date: Tue, 11 Nov 2025 22:29:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BB=A3=E7=A0=81=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E8=A1=A8=E5=8D=95=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dashboard/components/DeploymentFormModal.tsx | 5 +++-- frontend/src/pages/Dashboard/types.ts | 11 +++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/Dashboard/components/DeploymentFormModal.tsx b/frontend/src/pages/Dashboard/components/DeploymentFormModal.tsx index cf3f29a9..67363389 100644 --- a/frontend/src/pages/Dashboard/components/DeploymentFormModal.tsx +++ b/frontend/src/pages/Dashboard/components/DeploymentFormModal.tsx @@ -67,8 +67,9 @@ const DeploymentFormModal: React.FC = ({ }, // 通知信息(使用环境配置的通知设置) notification: { - required: environment.notificationEnabled ? 'true' : 'false', - channelId: environment.notificationChannelId?.toString() || '', + required: environment.notificationConfig?.deployNotificationEnabled ? 'true' : 'false', + channelId: environment.notificationConfig?.notificationChannelId?.toString() || '', + channelName: environment.notificationConfig?.notificationChannelName || '', }, }; }, [app, environment, teamId]); // 只在这些依赖变化时重新生成 diff --git a/frontend/src/pages/Dashboard/types.ts b/frontend/src/pages/Dashboard/types.ts index 886e52fe..2a7c17ba 100644 --- a/frontend/src/pages/Dashboard/types.ts +++ b/frontend/src/pages/Dashboard/types.ts @@ -58,6 +58,14 @@ export interface ApplicationConfig { recentDeployRecords?: DeployRecord[]; } +export interface NotificationConfig { + notificationChannelId: number; + deployNotificationEnabled: boolean; + buildNotificationEnabled: boolean; + buildFailureFileEnabled: boolean; + notificationChannelName: string; +} + export interface DeployEnvironment { environmentId: number; environmentCode: string; @@ -67,8 +75,7 @@ export interface DeployEnvironment { sort: number; requiresApproval: boolean; approvers: Approver[]; - notificationEnabled: boolean; // 🆕 是否启用通知 - notificationChannelId: number; // 🆕 通知渠道ID + notificationConfig?: NotificationConfig; // 🆕 通知配置 requireCodeReview: boolean; // 🆕 是否需要代码审查 canDeploy: boolean; // 🆕 当前用户是否可以发起部署 canApprove: boolean; // 🆕 当前用户是否可以审批部署