diff --git a/plane-src/apps/web/core/components/core/image-picker-popover.tsx b/plane-src/apps/web/core/components/core/image-picker-popover.tsx index 431143a..0927b6e 100644 --- a/plane-src/apps/web/core/components/core/image-picker-popover.tsx +++ b/plane-src/apps/web/core/components/core/image-picker-popover.tsx @@ -12,6 +12,7 @@ import type { Control } from "react-hook-form"; import { Controller } from "react-hook-form"; import useSWR from "swr"; import { Popover } from "@headlessui/react"; +import { Check, UploadCloud } from "lucide-react"; // plane imports import { ACCEPTED_COVER_IMAGE_MIME_TYPES_FOR_REACT_DROPZONE, MAX_FILE_SIZE } from "@plane/constants"; import { useOutsideClickDetector } from "@plane/hooks"; @@ -113,6 +114,7 @@ export const ImagePickerPopover = observer(function ImagePickerPopover(props: Pr ); const imagePickerRef = useRef(null); + const selectedCoverImageUrl = value ? getCoverImageDisplayURL(value, null) : null; const onDrop = useCallback((acceptedFiles: File[]) => { setImage(acceptedFiles[0]); @@ -215,17 +217,17 @@ export const ImagePickerPopover = observer(function ImagePickerPopover(props: Pr {isOpen && (
- + {enabledTabs.map((tab) => ( - + {tab.title} ))} @@ -273,7 +275,7 @@ export const ImagePickerPopover = observer(function ImagePickerPopover(props: Pr {unsplashImages.map((image) => (
{ setIsOpen(false); onChange(image.urls.regular); @@ -282,7 +284,7 @@ export const ImagePickerPopover = observer(function ImagePickerPopover(props: Pr {image.alt_description}
))} @@ -308,17 +310,25 @@ export const ImagePickerPopover = observer(function ImagePickerPopover(props: Pr
{Object.values(STATIC_COVER_IMAGES).map((imageUrl, index) => ( -
handleStaticImageSelect(imageUrl)} > {t("image_picker.cover_image_alt", -
+
+ {selectedCoverImageUrl === imageUrl && ( +
+ +
+ )} + ))}
@@ -327,9 +337,9 @@ export const ImagePickerPopover = observer(function ImagePickerPopover(props: Pr
@@ -348,10 +358,16 @@ export const ImagePickerPopover = observer(function ImagePickerPopover(props: Pr /> ) : ( -
- +
+
+ +
+ {isDragActive ? t("image_picker.drop_here_to_upload") : t("image_picker.drag_and_drop_here")} + + {t("image_picker.supported_formats")} +
)} @@ -368,7 +384,7 @@ export const ImagePickerPopover = observer(function ImagePickerPopover(props: Pr

{t("image_picker.supported_formats")}

-
+