support multiple image upload
This commit is contained in:
parent
1f61d02da6
commit
ed27184f5a
@ -269,8 +269,7 @@ function App() {
|
|||||||
doGenerateCode(
|
doGenerateCode(
|
||||||
{
|
{
|
||||||
generationType: "create",
|
generationType: "create",
|
||||||
image: referenceImages[0],
|
images: referenceImages,
|
||||||
inputMode,
|
|
||||||
},
|
},
|
||||||
currentVersion
|
currentVersion
|
||||||
);
|
);
|
||||||
@ -303,8 +302,7 @@ function App() {
|
|||||||
doGenerateCode(
|
doGenerateCode(
|
||||||
{
|
{
|
||||||
generationType: "update",
|
generationType: "update",
|
||||||
inputMode,
|
images: referenceImages,
|
||||||
image: referenceImages[0],
|
|
||||||
resultImage: resultImage,
|
resultImage: resultImage,
|
||||||
history: updatedHistory,
|
history: updatedHistory,
|
||||||
isImportedFromCode,
|
isImportedFromCode,
|
||||||
@ -315,8 +313,7 @@ function App() {
|
|||||||
doGenerateCode(
|
doGenerateCode(
|
||||||
{
|
{
|
||||||
generationType: "update",
|
generationType: "update",
|
||||||
inputMode,
|
images: referenceImages,
|
||||||
image: referenceImages[0],
|
|
||||||
history: updatedHistory,
|
history: updatedHistory,
|
||||||
isImportedFromCode,
|
isImportedFromCode,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -69,8 +69,7 @@ function ImageUpload({ setReferenceImages }: Props) {
|
|||||||
|
|
||||||
const { getRootProps, getInputProps, isFocused, isDragAccept, isDragReject } =
|
const { getRootProps, getInputProps, isFocused, isDragAccept, isDragReject } =
|
||||||
useDropzone({
|
useDropzone({
|
||||||
maxFiles: 1,
|
maxSize: 1024 * 1024 * 5, // 5 MB
|
||||||
maxSize: 1024 * 1024 * 20, // 20 MB
|
|
||||||
accept: {
|
accept: {
|
||||||
// Image formats
|
// Image formats
|
||||||
"image/png": [".png"],
|
"image/png": [".png"],
|
||||||
|
|||||||
@ -32,8 +32,7 @@ export enum ScreenRecorderState {
|
|||||||
|
|
||||||
export interface CodeGenerationParams {
|
export interface CodeGenerationParams {
|
||||||
generationType: "create" | "update";
|
generationType: "create" | "update";
|
||||||
inputMode: "image" | "video";
|
images: string[];
|
||||||
image: string;
|
|
||||||
resultImage?: string;
|
resultImage?: string;
|
||||||
history?: string[];
|
history?: string[];
|
||||||
isImportedFromCode?: boolean;
|
isImportedFromCode?: boolean;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user