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 new file mode 100644 index 000000000..680203c86 --- /dev/null +++ b/apps/ai-game-creator-shell/src/components/game-distribution/GameDistributionPublishFormView.tsx @@ -0,0 +1,513 @@ +import { Eye, Trash2 } from 'lucide-react'; + +import { GAME_DISTRIBUTION_CATEGORIES } from '../../../../../packages/shared/src/contracts/gameDistribution'; +import { + type GameDistributionPublishMetadata, + MAX_AGC_GAME_SCREENSHOTS, +} from '../../services/gameDistributionPublish'; +import { ThemedModal } from '../modal/ThemedModal'; +import { + type GameDistributionPublishFormState, + PANEL_IMAGE_ACCEPT, +} from './useGameDistributionPublishForm'; + +/** + * 发布资料表单的表现层:弹窗与工作台内联共用同一份 DOM 结构。 + * + * 状态全部来自 `form`(`useGameDistributionPublishForm` 的返回值);内联形态把主行动换成 + * 内容末尾整行橙色的「打包并发布」。 + */ +export function GameDistributionPublishFormView({ + form, + inline = false, + open, + onClose, + packaging = false, +}: { + form: GameDistributionPublishFormState; + inline?: boolean; + open: boolean; + onClose: () => void; + packaging?: boolean; +}) { + const { + packageResult, + title, + setTitle, + summary, + setSummary, + category, + setCategory, + busy, + error, + result, + cover, + setCover, + screenshots, + previewScreenshot, + setPreviewScreenshot, + uploadingLabel, + metadataSuggestionPending, + metadataSuggestionReady, + coverConfirmOpen, + setCoverConfirmOpen, + generatingCover, + coverGenerationPrice, + coverGenerationDetail, + coverInputRef, + screenshotInputRef, + summaryTouchedRef, + categoryTouchedRef, + activeScreenshotCount, + screenshotsUploading, + coverPriceLabel, + handleCoverSelected, + handleGenerateCover, + handleScreenshotsSelected, + removeScreenshot, + handleSubmit, + handlePackageAndPublish, + } = form; + + const fieldsAndMedia = ( + <> +
+ +