feat: workflow remove preview mode (#3941)

This commit is contained in:
zxhlyh
2024-04-28 17:09:56 +08:00
committed by GitHub
parent 0940f01634
commit 8e4989ed03
33 changed files with 549 additions and 309 deletions

View File

@@ -21,6 +21,7 @@ type Props = {
value: any
onChange: (value: any) => void
className?: string
autoFocus?: boolean
}
const FormItem: FC<Props> = ({
@@ -28,6 +29,7 @@ const FormItem: FC<Props> = ({
value,
onChange,
className,
autoFocus,
}) => {
const { t } = useTranslation()
const { type } = payload
@@ -87,6 +89,7 @@ const FormItem: FC<Props> = ({
value={value || ''}
onChange={e => onChange(e.target.value)}
placeholder={t('appDebug.variableConig.inputPlaceholder')!}
autoFocus={autoFocus}
/>
)
}
@@ -99,6 +102,7 @@ const FormItem: FC<Props> = ({
value={value || ''}
onChange={e => onChange(e.target.value)}
placeholder={t('appDebug.variableConig.inputPlaceholder')!}
autoFocus={autoFocus}
/>
)
}
@@ -110,6 +114,7 @@ const FormItem: FC<Props> = ({
value={value || ''}
onChange={e => onChange(e.target.value)}
placeholder={t('appDebug.variableConig.inputPlaceholder')!}
autoFocus={autoFocus}
/>
)
}
@@ -141,9 +146,9 @@ const FormItem: FC<Props> = ({
type === InputVarType.files && (
<TextGenerationImageUploader
settings={{
...fileSettings.image,
...fileSettings?.image,
detail: Resolution.high,
}}
} as any}
onFilesChange={files => onChange(files.filter(file => file.progress !== -1).map(fileItem => ({
type: 'image',
transfer_method: fileItem.type,