This commit is contained in:
2026-04-21 10:30:12 +08:00
parent ae28dab032
commit 13bc79306f
49 changed files with 3691 additions and 1357 deletions

View File

@@ -17,7 +17,7 @@ const baseDraftItem: CustomWorldWorkSummary = {
updatedAt: new Date('2026-04-14T10:00:00.000Z').toISOString(),
publishedAt: null,
stage: 'object_refining',
stageLabel: '精修对象',
stageLabel: '待完善草稿',
playableNpcCount: 3,
landmarkCount: 4,
sessionId: 'session-1',
@@ -35,7 +35,7 @@ test('creation hub reflects updated draft title summary and counts after rerende
onBack={() => {}}
onRetry={() => {}}
onCreateNew={() => {}}
onResumeDraft={() => {}}
onOpenDraft={() => {}}
onEnterPublished={() => {}}
/>,
);
@@ -62,7 +62,7 @@ test('creation hub reflects updated draft title summary and counts after rerende
onBack={() => {}}
onRetry={() => {}}
onCreateNew={() => {}}
onResumeDraft={() => {}}
onOpenDraft={() => {}}
onEnterPublished={() => {}}
/>,
);

View File

@@ -33,7 +33,7 @@ test('creation hub draft card renders compiled work summary fields', () => {
onBack={() => {}}
onRetry={() => {}}
onCreateNew={() => {}}
onResumeDraft={() => {}}
onOpenDraft={() => {}}
onEnterPublished={() => {}}
/>,
);

View File

@@ -15,7 +15,7 @@ type CustomWorldCreationHubProps = {
onBack: () => void;
onRetry: () => void;
onCreateNew: () => void;
onResumeDraft: (sessionId: string) => void;
onOpenDraft: (item: CustomWorldWorkSummary) => void;
onEnterPublished: (profileId: string) => void;
};
@@ -36,7 +36,7 @@ export function CustomWorldCreationHub({
onBack,
onRetry,
onCreateNew,
onResumeDraft,
onOpenDraft,
onEnterPublished,
}: CustomWorldCreationHubProps) {
const [activeFilter, setActiveFilter] =
@@ -129,7 +129,7 @@ export function CustomWorldCreationHub({
item={item}
onClick={() => {
if (item.sourceType === 'agent_session' && item.sessionId) {
onResumeDraft(item.sessionId);
onOpenDraft(item);
return;
}

View File

@@ -27,6 +27,11 @@ export function CustomWorldWorkCard({
const isDraft = item.status === 'draft';
const hasFoundationDraft =
item.playableNpcCount > 0 || item.landmarkCount > 0;
const actionLabel = isDraft
? hasFoundationDraft
? '继续完善'
: '继续创作'
: '进入世界';
const roleCountLabel = isDraft ? '角色' : '可扮演角色';
return (
@@ -104,7 +109,7 @@ export function CustomWorldWorkCard({
onClick={onClick}
className="platform-button platform-button--primary min-h-0 shrink-0 rounded-full px-4 py-2 text-sm"
>
{isDraft ? (hasFoundationDraft ? '继续精修' : '继续创作') : '进入世界'}
{actionLabel}
</button>
</div>
</div>