refactor: 收口公开详情改造意图
This commit is contained in:
@@ -100,6 +100,27 @@ export type PlatformPublicWorkLikeIntent =
|
||||
errorMessage: string;
|
||||
};
|
||||
|
||||
export type PlatformPublicWorkRemixIntent =
|
||||
| {
|
||||
type: 'remix-big-fish';
|
||||
profileId: string;
|
||||
selectionStage: 'big-fish-result';
|
||||
}
|
||||
| {
|
||||
type: 'remix-puzzle';
|
||||
profileId: string;
|
||||
selectionStage: 'puzzle-result';
|
||||
}
|
||||
| {
|
||||
type: 'remix-rpg-gallery';
|
||||
ownerUserId: string;
|
||||
profileId: string;
|
||||
}
|
||||
| {
|
||||
type: 'unsupported';
|
||||
errorMessage: string;
|
||||
};
|
||||
|
||||
export type PlatformPublicWorkDetailOpenDecision =
|
||||
| {
|
||||
type: 'blocked';
|
||||
@@ -526,6 +547,81 @@ export function resolvePlatformPublicWorkLikeIntent(
|
||||
};
|
||||
}
|
||||
|
||||
export function resolvePlatformPublicWorkRemixIntent(
|
||||
entry: PlatformPublicGalleryCard,
|
||||
): PlatformPublicWorkRemixIntent {
|
||||
if (isBigFishGalleryEntry(entry)) {
|
||||
return {
|
||||
type: 'remix-big-fish',
|
||||
profileId: entry.profileId,
|
||||
selectionStage: 'big-fish-result',
|
||||
};
|
||||
}
|
||||
|
||||
if (isPuzzleGalleryEntry(entry)) {
|
||||
return {
|
||||
type: 'remix-puzzle',
|
||||
profileId: entry.profileId,
|
||||
selectionStage: 'puzzle-result',
|
||||
};
|
||||
}
|
||||
|
||||
if (isMatch3DGalleryEntry(entry)) {
|
||||
return {
|
||||
type: 'unsupported',
|
||||
errorMessage: '抓大鹅作品改造将在后续版本开放。',
|
||||
};
|
||||
}
|
||||
|
||||
if (isSquareHoleGalleryEntry(entry)) {
|
||||
return {
|
||||
type: 'unsupported',
|
||||
errorMessage: '方洞挑战作品改造将在后续版本开放。',
|
||||
};
|
||||
}
|
||||
|
||||
if (isJumpHopGalleryEntry(entry)) {
|
||||
return {
|
||||
type: 'unsupported',
|
||||
errorMessage: '跳一跳作品改造将在后续版本开放。',
|
||||
};
|
||||
}
|
||||
|
||||
if (isWoodenFishGalleryEntry(entry)) {
|
||||
return {
|
||||
type: 'unsupported',
|
||||
errorMessage: '敲木鱼作品改造将在后续版本开放。',
|
||||
};
|
||||
}
|
||||
|
||||
if (isVisualNovelGalleryEntry(entry)) {
|
||||
return {
|
||||
type: 'unsupported',
|
||||
errorMessage: '视觉小说作品改造将在后续版本开放。',
|
||||
};
|
||||
}
|
||||
|
||||
if (isEdutainmentGalleryEntry(entry)) {
|
||||
return {
|
||||
type: 'unsupported',
|
||||
errorMessage: '宝贝识物作品改造将在创作链路接入后开放。',
|
||||
};
|
||||
}
|
||||
|
||||
if (isBarkBattleGalleryEntry(entry)) {
|
||||
return {
|
||||
type: 'unsupported',
|
||||
errorMessage: '汪汪声浪作品改造将在后续版本开放。',
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
type: 'remix-rpg-gallery',
|
||||
ownerUserId: entry.ownerUserId,
|
||||
profileId: entry.profileId,
|
||||
};
|
||||
}
|
||||
|
||||
export function resolvePlatformPublicWorkDetailOpenDecision(
|
||||
entry: PlatformPublicGalleryCard,
|
||||
deps: PlatformPublicWorkDetailOpenDecisionDeps = {},
|
||||
|
||||
Reference in New Issue
Block a user