This commit is contained in:
2026-04-26 20:50:58 +08:00
parent a3a9bfa194
commit 67161bd6d1
142 changed files with 3349 additions and 10674 deletions

View File

@@ -29,9 +29,17 @@ export interface RpgCreationResultViewProps {
onOpenCoverEditor?: () => void;
onPublishWorld?: () => Promise<void> | void;
onTestWorld?: () => void;
onDeleteEntities?: (kind: 'story' | 'landmark', ids: string[]) => Promise<void> | void;
onDeleteEntities?: (
kind: 'story' | 'landmark',
ids: string[],
) => Promise<void> | void;
onGenerateEntity?:
| ((kind: EntityGenerationKind) => Promise<{ profile?: CustomWorldProfile | null } | void> | { profile?: CustomWorldProfile | null } | void)
| ((
kind: EntityGenerationKind,
) =>
| Promise<{ profile?: CustomWorldProfile | null } | void>
| { profile?: CustomWorldProfile | null }
| void)
| undefined;
onProfileChange: (profile: CustomWorldProfile) => void;
readOnly?: boolean;
@@ -126,7 +134,7 @@ export function RpgCreationResultView({
: handleDeleteLandmarks;
return (
<div className="platform-remap-surface flex h-full min-h-0 flex-col">
<div className="platform-remap-surface mx-auto flex h-full min-h-0 w-full flex-col xl:max-w-[min(100%,98rem)] xl:px-1 2xl:max-w-[min(100%,112rem)]">
<RpgCreationResultHeader
autoSaveState={autoSaveState}
backLabel={backLabel}
@@ -150,7 +158,9 @@ export function RpgCreationResultView({
: createLabel
}
onCreateAction={
readOnly || (compactAgentResultMode && !onGenerateEntity) || !createTarget
readOnly ||
(compactAgentResultMode && !onGenerateEntity) ||
!createTarget
? undefined
: () => {
if (activeTab === 'playable') {
@@ -168,9 +178,7 @@ export function RpgCreationResultView({
setEditorTarget(createTarget);
}
}
createActionDisabled={Boolean(
isGenerating || pendingGeneratedEntity,
)}
createActionDisabled={Boolean(isGenerating || pendingGeneratedEntity)}
pendingGeneratedEntity={pendingGeneratedEntity}
recentGeneratedIds={recentGeneratedIds}
readOnly={readOnly}
@@ -206,7 +214,12 @@ export function RpgCreationResultView({
publishBlockers.length <= 0 &&
qualityFindings.some((entry) => entry.severity === 'warning') ? (
<div className="platform-banner platform-banner--info mt-3 rounded-2xl text-sm leading-6">
{qualityFindings.filter((entry) => entry.severity === 'warning').length} warning
{' '}
{
qualityFindings.filter((entry) => entry.severity === 'warning')
.length
}{' '}
warning
</div>
) : null}
{!error && localGenerationError ? (
@@ -214,7 +227,9 @@ export function RpgCreationResultView({
{localGenerationError}
</div>
) : null}
{assetDebugEnabled ? <RpgCreationAssetDebugPanel profile={profile} /> : null}
{assetDebugEnabled ? (
<RpgCreationAssetDebugPanel profile={profile} />
) : null}
<RpgCreationResultActionBar
editActionLabel={editActionLabel}