合并主分支
解决合并冲突
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
import {
|
||||
CUSTOM_EDITOR_SCENE_STYLE_PRESET,
|
||||
getEditorSceneStylePresetLabel,
|
||||
} from '../../../packages/shared/src/contracts/editorScene';
|
||||
import { ApiClientError } from '../../services/apiClient';
|
||||
import type { EditorGenerationPricingConfig } from '../../services/image-editor/editorProjectClient';
|
||||
import type {
|
||||
@@ -753,6 +757,9 @@ export function getLayerKindLabel(layer: CanvasLayer) {
|
||||
if (layer.assetKind === 'ui-design') {
|
||||
return 'UI设计';
|
||||
}
|
||||
if (layer.assetKind === 'scene') {
|
||||
return '游戏场景';
|
||||
}
|
||||
if (layer.assetKind === 'video' || layer.mediaType === 'video') {
|
||||
return '视频';
|
||||
}
|
||||
@@ -834,6 +841,9 @@ export function formatLayerImageType(layer: CanvasLayer) {
|
||||
if (layer.assetKind === 'ui-design') {
|
||||
return 'UI设计图';
|
||||
}
|
||||
if (layer.assetKind === 'scene') {
|
||||
return '游戏场景';
|
||||
}
|
||||
if (layer.assetKind === 'video' || layer.mediaType === 'video') {
|
||||
return '生成视频';
|
||||
}
|
||||
@@ -1615,6 +1625,27 @@ export function buildImageGenerationInputs(
|
||||
);
|
||||
}
|
||||
|
||||
export function buildSceneGenerationInputs(
|
||||
sceneContent: string,
|
||||
stylePreset: NonNullable<GenerateDialogState['sceneStylePreset']>,
|
||||
customStyle: string | null | undefined,
|
||||
references?: CharacterReferenceImage[],
|
||||
): CanvasGenerationInputs {
|
||||
const styleLabel = getEditorSceneStylePresetLabel(stylePreset);
|
||||
return {
|
||||
fields: [
|
||||
...createGenerationInputField('画面内容', sceneContent),
|
||||
...createGenerationInputField('视觉风格', styleLabel),
|
||||
...(stylePreset === CUSTOM_EDITOR_SCENE_STYLE_PRESET
|
||||
? createGenerationInputField('自定义画风', customStyle)
|
||||
: []),
|
||||
],
|
||||
references: (references ?? []).flatMap((reference, index) =>
|
||||
createGenerationInputReference(`场景参考图 ${index + 1}`, reference),
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
export function buildVideoGenerationInputs(
|
||||
prompt: string,
|
||||
references?: CharacterReferenceImage[],
|
||||
@@ -2122,7 +2153,8 @@ export function isCanvasGenerationDialog(
|
||||
return Boolean(
|
||||
dialog?.id &&
|
||||
(dialog.mode === 'generate' ||
|
||||
dialog.mode === 'spec' ||
|
||||
dialog.mode === 'scene' ||
|
||||
dialog.mode === 'spec' ||
|
||||
dialog.mode === 'character' ||
|
||||
dialog.mode === 'icon' ||
|
||||
dialog.mode === 'publication' ||
|
||||
@@ -2141,6 +2173,9 @@ export function getGenerationFrameAriaLabel(
|
||||
if (dialog.mode === 'character') {
|
||||
return '角色生成占位图';
|
||||
}
|
||||
if (dialog.mode === 'scene') {
|
||||
return '游戏场景生成占位图';
|
||||
}
|
||||
if (dialog.mode === 'spec') {
|
||||
return '规范生成占位图';
|
||||
}
|
||||
@@ -2175,6 +2210,9 @@ export function getGenerationFrameLabel(dialog: CanvasGenerationDialogState) {
|
||||
if (dialog.mode === 'character') {
|
||||
return 'Character Generator';
|
||||
}
|
||||
if (dialog.mode === 'scene') {
|
||||
return 'Scene Generator';
|
||||
}
|
||||
if (dialog.mode === 'spec') {
|
||||
return 'Spec Generator';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user