refactor: 收口公开详情改造意图

This commit is contained in:
2026-06-04 00:32:10 +08:00
parent 872d741fdc
commit 37a35daddb
6 changed files with 166 additions and 47 deletions

View File

@@ -533,6 +533,7 @@ import {
resolvePlatformPublicWorkDetailOpenDecision,
resolvePlatformPublicWorkDetailOpenStrategy,
resolvePlatformPublicWorkLikeIntent,
resolvePlatformPublicWorkRemixIntent,
resolveVisiblePuzzleDetailCoverCount,
} from './platformPublicWorkDetailFlow';
import {
@@ -13460,12 +13461,14 @@ export function PlatformEntryFlowShellImpl({
setIsPublicWorkDetailBusy(true);
setPublicWorkDetailError(null);
if (isBigFishGalleryEntry(entry)) {
void remixBigFishGalleryWork(entry.profileId)
const intent = resolvePlatformPublicWorkRemixIntent(entry);
if (intent.type === 'remix-big-fish') {
void remixBigFishGalleryWork(intent.profileId)
.then((response) => {
bigFishFlow.setSession(response.session);
enterCreateTab();
setSelectionStage('big-fish-result');
setSelectionStage(intent.selectionStage);
})
.catch((error) => {
setPublicWorkDetailError(
@@ -13478,14 +13481,14 @@ export function PlatformEntryFlowShellImpl({
return;
}
if (isPuzzleGalleryEntry(entry)) {
void remixPuzzleGalleryWork(entry.profileId)
if (intent.type === 'remix-puzzle') {
void remixPuzzleGalleryWork(intent.profileId)
.then((response) => {
resetRecommendRuntimeSelection();
puzzleFlow.setSession(response.session);
setPuzzleOperation(null);
enterCreateTab();
setSelectionStage('puzzle-result');
setSelectionStage(intent.selectionStage);
})
.catch((error) => {
setPublicWorkDetailError(
@@ -13498,49 +13501,13 @@ export function PlatformEntryFlowShellImpl({
return;
}
if (isMatch3DGalleryEntry(entry)) {
setPublicWorkDetailError('抓大鹅作品改造将在后续版本开放。');
if (intent.type === 'unsupported') {
setPublicWorkDetailError(intent.errorMessage);
setIsPublicWorkDetailBusy(false);
return;
}
if (isSquareHoleGalleryEntry(entry)) {
setPublicWorkDetailError('方洞挑战作品改造将在后续版本开放。');
setIsPublicWorkDetailBusy(false);
return;
}
if (isJumpHopGalleryEntry(entry)) {
setPublicWorkDetailError('跳一跳作品改造将在后续版本开放。');
setIsPublicWorkDetailBusy(false);
return;
}
if (isWoodenFishGalleryEntry(entry)) {
setPublicWorkDetailError('敲木鱼作品改造将在后续版本开放。');
setIsPublicWorkDetailBusy(false);
return;
}
if (isVisualNovelGalleryEntry(entry)) {
setPublicWorkDetailError('视觉小说作品改造将在后续版本开放。');
setIsPublicWorkDetailBusy(false);
return;
}
if (isEdutainmentGalleryEntry(entry)) {
setPublicWorkDetailError('宝贝识物作品改造将在创作链路接入后开放。');
setIsPublicWorkDetailBusy(false);
return;
}
if (isBarkBattleGalleryEntry(entry)) {
setPublicWorkDetailError('汪汪声浪作品改造将在后续版本开放。');
setIsPublicWorkDetailBusy(false);
return;
}
void remixRpgEntryWorldGallery(entry.ownerUserId, entry.profileId)
void remixRpgEntryWorldGallery(intent.ownerUserId, intent.profileId)
.then((response) => {
const nextEntry = response.entry;
setSelectedDetailEntry(nextEntry);