|
|
@ -9,7 +9,7 @@ import { useWorkflowStore } from "@/store/workflowStore"; |
|
|
import { SmartVideoNodeData } from "@/types"; |
|
|
import { SmartVideoNodeData } from "@/types"; |
|
|
import { uploadFileToGatewayMedia } from "@/utils/gatewayMediaUpload"; |
|
|
import { uploadFileToGatewayMedia } from "@/utils/gatewayMediaUpload"; |
|
|
import { isSmartGenerateUploadEnabled } from "@/utils/smartGenerateUpload"; |
|
|
import { isSmartGenerateUploadEnabled } from "@/utils/smartGenerateUpload"; |
|
|
import { deriveSmartVideoMode } from "@/utils/smartMediaMode"; |
|
|
import { deriveSmartVideoMode, hasSmartVideoGenerationArtifact } from "@/utils/smartMediaMode"; |
|
|
import { getPopiVideoAssetPreview, resolvePopiVideoAsset } from "@/lib/popiAssetApi"; |
|
|
import { getPopiVideoAssetPreview, resolvePopiVideoAsset } from "@/lib/popiAssetApi"; |
|
|
import { GenerateVideoNodeView } from "./GenerateVideoNode"; |
|
|
import { GenerateVideoNodeView } from "./GenerateVideoNode"; |
|
|
import { VideoInputNodeView } from "./VideoInputNode"; |
|
|
import { VideoInputNodeView } from "./VideoInputNode"; |
|
|
@ -341,23 +341,27 @@ function SmartVideoNeutralView({ |
|
|
data, |
|
|
data, |
|
|
selected, |
|
|
selected, |
|
|
addToGenerationHistory = false, |
|
|
addToGenerationHistory = false, |
|
|
|
|
|
hideUploadToolbar = false, |
|
|
}: { |
|
|
}: { |
|
|
id: string; |
|
|
id: string; |
|
|
data: SmartVideoNodeData; |
|
|
data: SmartVideoNodeData; |
|
|
selected?: boolean; |
|
|
selected?: boolean; |
|
|
addToGenerationHistory?: boolean; |
|
|
addToGenerationHistory?: boolean; |
|
|
|
|
|
hideUploadToolbar?: boolean; |
|
|
}) { |
|
|
}) { |
|
|
const isUploading = data.uploadStatus === "loading"; |
|
|
const isUploading = data.uploadStatus === "loading"; |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<div className="relative h-full w-full"> |
|
|
<div className="relative h-full w-full"> |
|
|
<GenerateVideoNodeView id={id} data={data} selected={selected} suppressEmptyStateDelete /> |
|
|
<GenerateVideoNodeView id={id} data={data} selected={selected} suppressEmptyStateDelete={!hideUploadToolbar} /> |
|
|
<SmartVideoUploadToolbar |
|
|
{!hideUploadToolbar && ( |
|
|
id={id} |
|
|
<SmartVideoUploadToolbar |
|
|
selected={selected} |
|
|
id={id} |
|
|
isUploading={isUploading} |
|
|
selected={selected} |
|
|
addToGenerationHistory={addToGenerationHistory} |
|
|
isUploading={isUploading} |
|
|
/> |
|
|
addToGenerationHistory={addToGenerationHistory} |
|
|
|
|
|
/> |
|
|
|
|
|
)} |
|
|
{isUploading && ( |
|
|
{isUploading && ( |
|
|
<div className="nodrag nopan absolute inset-0 z-[10003] flex items-center justify-center rounded-lg bg-black/45 backdrop-blur-[1px]"> |
|
|
<div className="nodrag nopan absolute inset-0 z-[10003] flex items-center justify-center rounded-lg bg-black/45 backdrop-blur-[1px]"> |
|
|
<Spin /> |
|
|
<Spin /> |
|
|
@ -379,7 +383,15 @@ export function SmartVideoNode({ id, data, selected }: NodeProps<SmartVideoNodeT |
|
|
|
|
|
|
|
|
if (mode === "generate") { |
|
|
if (mode === "generate") { |
|
|
if (isSmartGenerateUploadEnabled(providerEnvStatus)) { |
|
|
if (isSmartGenerateUploadEnabled(providerEnvStatus)) { |
|
|
return <SmartVideoNeutralView id={id} data={data} selected={selected} addToGenerationHistory />; |
|
|
return ( |
|
|
|
|
|
<SmartVideoNeutralView |
|
|
|
|
|
id={id} |
|
|
|
|
|
data={data} |
|
|
|
|
|
selected={selected} |
|
|
|
|
|
addToGenerationHistory |
|
|
|
|
|
hideUploadToolbar={hasSmartVideoGenerationArtifact(data)} |
|
|
|
|
|
/> |
|
|
|
|
|
); |
|
|
} |
|
|
} |
|
|
return <GenerateVideoNodeView id={id} data={data} selected={selected} />; |
|
|
return <GenerateVideoNodeView id={id} data={data} selected={selected} />; |
|
|
} |
|
|
} |
|
|
|