mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): add input
el for workflow upload button
Need this to select the file
This commit is contained in:
parent
3ecb1e580f
commit
1d9801e7be
@ -22,22 +22,25 @@ const UploadWorkflowButton = () => {
|
|||||||
[loadWorkflowFromFile]
|
[loadWorkflowFromFile]
|
||||||
);
|
);
|
||||||
|
|
||||||
const { getRootProps } = useDropzone({
|
const { getInputProps, getRootProps } = useDropzone({
|
||||||
accept: { 'application/json': ['.json'] },
|
accept: { 'application/json': ['.json'] },
|
||||||
onDropAccepted,
|
onDropAccepted,
|
||||||
noDrag: true,
|
noDrag: true,
|
||||||
multiple: false,
|
multiple: false,
|
||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
<Button
|
<>
|
||||||
aria-label={t('workflows.uploadWorkflow')}
|
<Button
|
||||||
tooltip={t('workflows.uploadWorkflow')}
|
aria-label={t('workflows.uploadWorkflow')}
|
||||||
leftIcon={<PiUploadSimpleBold />}
|
tooltip={t('workflows.uploadWorkflow')}
|
||||||
{...getRootProps()}
|
leftIcon={<PiUploadSimpleBold />}
|
||||||
pointerEvents="auto"
|
{...getRootProps()}
|
||||||
>
|
pointerEvents="auto"
|
||||||
{t('workflows.uploadWorkflow')}
|
>
|
||||||
</Button>
|
{t('workflows.uploadWorkflow')}
|
||||||
|
</Button>
|
||||||
|
<input {...getInputProps()} />
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user