From 6487b52b31e1da9e2352cb67403273a4f3afb33c 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:37:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=BC=B9=E7=AA=97=E5=AE=9A?= =?UTF-8?q?=E8=89=B2=E6=8F=90=E5=88=B0=E6=A8=A1=E5=9D=97=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GameDistributionPublishFormView.tsx:封面确认与截图预览两个 panelStyle 提取为模块级常量,不再每次渲染新建对象;按仓库约定保持内联样式,不新建 CSS 文件。 --- .../GameDistributionPublishFormView.tsx | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 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 13b3143c2..ee9d6ac0a 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 @@ -13,6 +13,23 @@ import { publicationVersionStatusLabel, } from './useGameDistributionPublishForm'; +/** + * 两个弹窗面板的定色。 + * + * 仓库的样式约定是内联(Tailwind / JSX 内联样式),不为这种一次性定色新建 CSS 文件;提到模块级 + * 常量是为了不再每次渲染都新建一个样式对象。`ThemedModal` 的默认背景会用内联样式写死,所以 + * 这两处只能继续走 `panelStyle` 覆盖,不能只加 Tailwind 类。 + */ +const COVER_CONFIRM_PANEL_STYLE = { + background: '#fffaf7', + color: '#4f362d', +} as const; + +const SCREENSHOT_PREVIEW_PANEL_STYLE = { + background: '#1d1714', + color: '#fffaf7', +} as const; + /** * 主行动按钮文案:先按发布绑定状态(检查中 / 不可用 / 更新)选路,再按打包与上传阶段选路。 */ @@ -393,7 +410,7 @@ export function GameDistributionPublishFormView({ ariaLabel="确认生成游戏封面" onClose={() => setCoverConfirmOpen(false)} panelClassName="game-publish-progress-dialog game-publish-cover-confirm-dialog" - panelStyle={{ background: '#fffaf7', color: '#4f362d' }} + panelStyle={COVER_CONFIRM_PANEL_STYLE} >