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 91d42eed8..2f0c5bcb3 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 @@ -22,6 +22,24 @@ function resolveMetadataHint(pending: boolean, ready: boolean) { return '已根据创作内容预填简介和分类,免费;你可以直接修改。'; } +/** + * 主行动按钮文案:打包 / 上传 / 生成封面 / 上传截图 / 上传素材 依次优先,都没有才是常态。 + */ +function resolvePublishActionLabel(state: { + packaging: boolean; + busy: boolean; + generatingCover: boolean; + screenshotsUploading: boolean; + uploadingLabel: string; +}) { + if (state.packaging) return '正在打包…'; + if (state.busy) return '上传中…'; + if (state.generatingCover) return '封面生成中…'; + if (state.screenshotsUploading) return '截图上传中…'; + if (state.uploadingLabel) return '素材上传中…'; + return '打包并发布'; +} + /** * 发布资料表单的表现层(工作台内联形态)。 * @@ -388,17 +406,13 @@ export function GameDistributionPublishFormView({ onClick={() => void handlePackageAndPublish()} className="inline-flex w-full items-center justify-center gap-2 rounded-xl border border-[#c7653d] bg-[#c7653d] px-6 py-4 text-lg font-bold tracking-wide text-white shadow-md transition enabled:hover:bg-[#b4562f] disabled:cursor-not-allowed disabled:opacity-45" > - {packaging - ? '正在打包…' - : busy - ? '上传中…' - : generatingCover - ? '封面生成中…' - : screenshotsUploading - ? '截图上传中…' - : uploadingLabel - ? '素材上传中…' - : '打包并发布'} + {resolvePublishActionLabel({ + packaging, + busy, + generatingCover, + screenshotsUploading, + uploadingLabel, + })} )}