继续收口平台分段与泥点确认

新增泥点确认状态机共享 hook 并接入拼图与抓大鹅工作台

将首页发现页与个人中心剩余切换条收口到 PlatformSegmentedTabs

统一平台弹窗 header 关闭入口并补齐相关测试

更新前端组件收口文档与团队决策记录
This commit is contained in:
2026-06-11 01:30:13 +08:00
parent 94122583ac
commit 0a4ccdf45c
19 changed files with 511 additions and 242 deletions

View File

@@ -70,6 +70,7 @@ import { PlatformSubpanel } from '../common/PlatformSubpanel';
import { PlatformTagEditor } from '../common/PlatformTagEditor';
import { PlatformTextField } from '../common/PlatformTextField';
import { PlatformUploadPreviewCard } from '../common/PlatformUploadPreviewCard';
import { useMudPointConfirmController } from '../common/useMudPointConfirmController';
import {
MATCH3D_RUNTIME_BOARD_BASE_CLASS,
MATCH3D_RUNTIME_BOARD_FALLBACK_CLASS,
@@ -2308,7 +2309,7 @@ function Match3DBatchAddItemsPanel({
const parsedNames = normalizeMatch3DItemNameList(values);
const isGenerating = generationState.phase === 'generating';
const pointsCost = calculateMatch3DItemAssetsPointsCost(parsedNames.length);
const [isCostConfirmOpen, setIsCostConfirmOpen] = useState(false);
const costConfirm = useMudPointConfirmController(onSubmit);
return (
<Match3DModalShell title="批量新增物品" onClose={onClose}>
@@ -2357,7 +2358,7 @@ function Match3DBatchAddItemsPanel({
<PlatformActionButton
disabled={parsedNames.length <= 0 || isGenerating}
onClick={() => setIsCostConfirmOpen(true)}
onClick={costConfirm.requestOpen}
size="md"
fullWidth
className="min-h-11 gap-2"
@@ -2371,13 +2372,10 @@ function Match3DBatchAddItemsPanel({
</PlatformActionButton>
<PlatformMudPointConfirmDialog
open={isCostConfirmOpen}
open={costConfirm.open}
points={pointsCost}
onClose={() => setIsCostConfirmOpen(false)}
onConfirm={() => {
setIsCostConfirmOpen(false);
onSubmit();
}}
onClose={costConfirm.close}
onConfirm={costConfirm.confirm}
confirmDisabled={parsedNames.length <= 0 || isGenerating}
showCloseButton={false}
portal={false}
@@ -2410,7 +2408,7 @@ function Match3DBatchRegenerateItemsPanel({
const pointsCost = calculateMatch3DItemAssetsPointsCost(
targetItemNames.length,
);
const [isCostConfirmOpen, setIsCostConfirmOpen] = useState(false);
const costConfirm = useMudPointConfirmController(onSubmit);
return (
<Match3DModalShell title="批量重新生成物品" onClose={onClose}>
@@ -2448,7 +2446,7 @@ function Match3DBatchRegenerateItemsPanel({
<PlatformActionButton
disabled={targetItemNames.length <= 0 || isGenerating}
onClick={() => setIsCostConfirmOpen(true)}
onClick={costConfirm.requestOpen}
size="md"
fullWidth
className="min-h-11 gap-2"
@@ -2462,13 +2460,10 @@ function Match3DBatchRegenerateItemsPanel({
</PlatformActionButton>
<PlatformMudPointConfirmDialog
open={isCostConfirmOpen}
open={costConfirm.open}
points={pointsCost}
onClose={() => setIsCostConfirmOpen(false)}
onConfirm={() => {
setIsCostConfirmOpen(false);
onSubmit();
}}
onClose={costConfirm.close}
onConfirm={costConfirm.confirm}
confirmDisabled={targetItemNames.length <= 0 || isGenerating}
showCloseButton={false}
portal={false}