mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
9ad4c03277
1) Downgrade numpy to avoid dependency conflict with numba 2) Move all non ldm/invoke files into `invokeai`. This includes assets, backend, frontend, and configs. 3) Fix up way that the backend finds the frontend and the generator finds the NSFW caution.png icon.
40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
import { Heading } from '@chakra-ui/react';
|
|
import { useHotkeys } from 'react-hotkeys-hook';
|
|
|
|
type ImageUploadOverlayProps = {
|
|
isDragAccept: boolean;
|
|
isDragReject: boolean;
|
|
overlaySecondaryText: string;
|
|
setIsHandlingUpload: (isHandlingUpload: boolean) => void;
|
|
};
|
|
|
|
const ImageUploadOverlay = (props: ImageUploadOverlayProps) => {
|
|
const {
|
|
isDragAccept,
|
|
isDragReject,
|
|
overlaySecondaryText,
|
|
setIsHandlingUpload,
|
|
} = props;
|
|
|
|
useHotkeys('esc', () => {
|
|
setIsHandlingUpload(false);
|
|
});
|
|
|
|
return (
|
|
<div className="dropzone-container">
|
|
{isDragAccept && (
|
|
<div className="dropzone-overlay is-drag-accept">
|
|
<Heading size={'lg'}>Upload Image{overlaySecondaryText}</Heading>
|
|
</div>
|
|
)}
|
|
{isDragReject && (
|
|
<div className="dropzone-overlay is-drag-reject">
|
|
<Heading size={'lg'}>Invalid Upload</Heading>
|
|
<Heading size={'md'}>Must be single JPEG or PNG image</Heading>
|
|
</div>
|
|
)}
|
|
</div>
|
|
);
|
|
};
|
|
export default ImageUploadOverlay;
|