收口前端平台组件能力
新增 PlatformAsyncStatePanel 统一 profile 异步状态骨架 扩展 PlatformSegmentedTabs 支持滚动 tab 并接入创作入口与发现页 统一 PixelCloseButton 复用 PlatformModalCloseButton 像素关闭能力 抽取平台入口泥点前置提示弹层并收紧阻断语义 补充组件收口文档与共享决策记录
This commit is contained in:
@@ -498,6 +498,10 @@ import {
|
||||
EDUTAINMENT_HIDDEN_MESSAGE,
|
||||
filterGeneralPublicWorks,
|
||||
} from './platformEdutainmentVisibility';
|
||||
import {
|
||||
PlatformDraftGenerationPointNoticeDialog,
|
||||
type DraftGenerationPointNotice,
|
||||
} from './PlatformDraftGenerationPointNoticeDialog';
|
||||
import { PlatformEntryCreationTypeModal } from './PlatformEntryCreationTypeModal';
|
||||
import type { PlatformCreationTypeId } from './platformEntryCreationTypes';
|
||||
import {
|
||||
@@ -1419,10 +1423,8 @@ export function PlatformEntryFlowShellImpl({
|
||||
: 'platform-theme--light';
|
||||
const isDesktopLayout = usePlatformDesktopLayout();
|
||||
const [showCreationTypeModal, setShowCreationTypeModal] = useState(false);
|
||||
const [draftGenerationPointNotice, setDraftGenerationPointNotice] = useState<{
|
||||
title: string;
|
||||
message: string;
|
||||
} | null>(null);
|
||||
const [draftGenerationPointNotice, setDraftGenerationPointNotice] =
|
||||
useState<DraftGenerationPointNotice | null>(null);
|
||||
const [selectedDetailEntry, setSelectedDetailEntry] =
|
||||
useState<CustomWorldLibraryEntry<CustomWorldProfile> | null>(null);
|
||||
const [selectedPublicWorkDetail, setSelectedPublicWorkDetail] =
|
||||
@@ -2246,14 +2248,14 @@ export function PlatformEntryFlowShellImpl({
|
||||
}
|
||||
|
||||
setDraftGenerationPointNotice({
|
||||
title: '泥点不足',
|
||||
message: `本次需要 ${pointsCost} 泥点,当前 ${walletBalance} 泥点。`,
|
||||
kind: 'insufficient-points',
|
||||
requiredPoints: pointsCost,
|
||||
currentPoints: walletBalance,
|
||||
});
|
||||
return false;
|
||||
} catch {
|
||||
setDraftGenerationPointNotice({
|
||||
title: '读取泥点余额失败',
|
||||
message: '请稍后重试。',
|
||||
kind: 'balance-load-failed',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
@@ -4364,11 +4366,6 @@ export function PlatformEntryFlowShellImpl({
|
||||
barkBattleDraftGenerationPointCost,
|
||||
ensureEnoughDraftGenerationPointsFromServer,
|
||||
]);
|
||||
const draftGenerationPointNoticeDescription = draftGenerationPointNotice
|
||||
? draftGenerationPointNotice.title === '读取泥点余额失败'
|
||||
? '当前表单不会丢失,关闭后可继续编辑,稍后再试。'
|
||||
: '当前表单不会丢失,关闭后可继续编辑或补足泥点再继续。'
|
||||
: undefined;
|
||||
const recoverCompletedPuzzleDraftGeneration = useCallback(
|
||||
async ({
|
||||
sessionId,
|
||||
@@ -16997,25 +16994,12 @@ export function PlatformEntryFlowShellImpl({
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
<PlatformAcknowledgeStatusDialog
|
||||
open={Boolean(draftGenerationPointNotice)}
|
||||
status="error"
|
||||
title={draftGenerationPointNotice?.title ?? '泥点提示'}
|
||||
description={draftGenerationPointNoticeDescription}
|
||||
<PlatformDraftGenerationPointNoticeDialog
|
||||
notice={draftGenerationPointNotice}
|
||||
onClose={() => setDraftGenerationPointNotice(null)}
|
||||
showHeader
|
||||
showCloseButton
|
||||
closeOnBackdrop
|
||||
overlayClassName={`platform-theme ${platformThemeClass} !items-center`}
|
||||
panelClassName="platform-remap-surface rounded-[1.75rem]"
|
||||
iconClassName={
|
||||
draftGenerationPointNotice?.title === '读取泥点余额失败'
|
||||
? undefined
|
||||
: 'bg-amber-100/80 text-amber-600'
|
||||
}
|
||||
>
|
||||
{draftGenerationPointNotice?.message}
|
||||
</PlatformAcknowledgeStatusDialog>
|
||||
/>
|
||||
<PublishShareModal
|
||||
open={Boolean(publishSharePayload)}
|
||||
payload={publishSharePayload}
|
||||
|
||||
Reference in New Issue
Block a user