From 62947a836f06fc67edb6c60def02b9d00542bc4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Tue, 6 Oct 2026 21:05:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=AA=E5=9B=BE=E6=8C=89=E9=92=AE=E6=96=87?= =?UTF-8?q?=E6=A1=88=E6=8A=BD=E6=88=90=E5=87=BD=E6=95=B0=E5=B9=B6=E8=B7=9F?= =?UTF-8?q?=E5=B8=B8=E9=87=8F=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GameDistributionPublishFormView.tsx:新增 resolveScreenshotPickLabel,替掉嵌套三元并把「截图已满 6 张」改成 MAX_AGC_GAME_SCREENSHOTS。 --- .../GameDistributionPublishFormView.tsx | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/apps/ai-game-creator-shell/src/components/game-distribution/GameDistributionPublishFormView.tsx b/apps/ai-game-creator-shell/src/components/game-distribution/GameDistributionPublishFormView.tsx index a4ed3a66a..13b3143c2 100644 --- a/apps/ai-game-creator-shell/src/components/game-distribution/GameDistributionPublishFormView.tsx +++ b/apps/ai-game-creator-shell/src/components/game-distribution/GameDistributionPublishFormView.tsx @@ -55,6 +55,18 @@ function resolvePublicationStatusLabel( } } +/** 截图选择按钮的文案:满 / 上传中 / 可添加三态,上限跟着常量走。 */ +function resolveScreenshotPickLabel(state: { + activeScreenshotCount: number; + screenshotsUploading: boolean; +}) { + if (state.activeScreenshotCount >= MAX_AGC_GAME_SCREENSHOTS) { + return `截图已满 ${MAX_AGC_GAME_SCREENSHOTS} 张`; + } + if (state.screenshotsUploading) return '截图上传中…'; + return '添加截图'; +} + /** * 发布资料表单的表现层(工作台内联形态)。 * @@ -289,11 +301,10 @@ export function GameDistributionPublishFormView({ }} /> - {activeScreenshotCount >= MAX_AGC_GAME_SCREENSHOTS - ? '截图已满 6 张' - : screenshotsUploading - ? '截图上传中…' - : '添加截图'} + {resolveScreenshotPickLabel({ + activeScreenshotCount, + screenshotsUploading, + })}