[refactor] Refactor and type image upload options (#4185)

This commit is contained in:
Christian Byrne
2025-06-15 12:07:26 -07:00
committed by GitHub
parent a6bd04f951
commit 3211875084
6 changed files with 40 additions and 17 deletions

View File

@@ -1,7 +1,11 @@
import { LGraphNode } from '@comfyorg/litegraph'
import { defineStore } from 'pinia'
import { ExecutedWsMessage, ResultItem } from '@/schemas/apiSchema'
import {
ExecutedWsMessage,
ResultItem,
ResultItemType
} from '@/schemas/apiSchema'
import { api } from '@/scripts/api'
import { app } from '@/scripts/app'
import { parseFilePath } from '@/utils/formatUtil'
@@ -9,7 +13,7 @@ import { isVideoNode } from '@/utils/litegraphUtil'
const createOutputs = (
filenames: string[],
type: string,
type: ResultItemType,
isAnimated: boolean
): ExecutedWsMessage['output'] => {
return {
@@ -88,7 +92,7 @@ export const useNodeOutputStore = defineStore('nodeOutput', () => {
{
folder = 'input',
isAnimated = false
}: { folder?: string; isAnimated?: boolean } = {}
}: { folder?: ResultItemType; isAnimated?: boolean } = {}
) {
if (!filenames || !node) return