拆分规则阻断与搜索未命中状态弹窗
CustomWorldEntityCatalog 改用共享状态弹窗承接 minimum-playable 提示 PlatformEntryFlowShellImpl 将公开编号搜索未命中分支改用共享状态弹窗 保留命中用户摘要弹层布局并补充相关测试与文档记录
This commit is contained in:
@@ -29,6 +29,7 @@ import { PlatformMediaFrame } from './common/PlatformMediaFrame';
|
||||
import { PlatformPillBadge } from './common/PlatformPillBadge';
|
||||
import { PlatformProgressBar } from './common/PlatformProgressBar';
|
||||
import { PlatformStatGrid } from './common/PlatformStatGrid';
|
||||
import { PlatformStatusDialog } from './common/PlatformStatusDialog';
|
||||
import { PlatformStatusMessage } from './common/PlatformStatusMessage';
|
||||
import { PlatformSubpanel } from './common/PlatformSubpanel';
|
||||
import { PlatformTextField } from './common/PlatformTextField';
|
||||
@@ -934,20 +935,10 @@ export function CustomWorldEntityCatalog({
|
||||
};
|
||||
|
||||
const confirmDialogConfig = (() => {
|
||||
if (!confirmState) {
|
||||
if (!confirmState || confirmState.kind === 'minimum-playable') {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (confirmState.kind === 'minimum-playable') {
|
||||
return {
|
||||
title: '无法删除',
|
||||
confirmLabel: '知道了',
|
||||
confirmTone: 'primary' as const,
|
||||
showCancel: false,
|
||||
body: '至少保留一个可扮演角色,才能正常进入自定义世界。',
|
||||
};
|
||||
}
|
||||
|
||||
if (confirmState.kind === 'delete-playable') {
|
||||
return {
|
||||
title: '删除角色',
|
||||
@@ -1450,11 +1441,24 @@ export function CustomWorldEntityCatalog({
|
||||
confirmLabel={confirmDialogConfig.confirmLabel}
|
||||
confirmTone={confirmDialogConfig.confirmTone}
|
||||
showCancel={confirmDialogConfig.showCancel}
|
||||
closeOnBackdrop={confirmState?.kind !== 'minimum-playable'}
|
||||
>
|
||||
{confirmDialogConfig.body}
|
||||
</UnifiedConfirmDialog>
|
||||
) : null}
|
||||
{confirmState?.kind === 'minimum-playable' ? (
|
||||
<PlatformStatusDialog
|
||||
status="error"
|
||||
title="无法删除"
|
||||
description="至少保留一个可扮演角色,才能正常进入自定义世界。"
|
||||
onClose={closeConfirmDialog}
|
||||
closeOnBackdrop={false}
|
||||
action={{
|
||||
label: '知道了',
|
||||
onClick: closeConfirmDialog,
|
||||
surface: 'platform',
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user