From 0e1567e3bc615af728583b9b08a67d1e1d5e7bfb Mon Sep 17 00:00:00 2001 From: bflatastic Date: Thu, 2 Apr 2026 12:22:38 +0700 Subject: [PATCH] modal width and height update --- .../promptbox/src/lib/CharactersModal.tsx | 135 +++++++++--------- 1 file changed, 70 insertions(+), 65 deletions(-) diff --git a/frontend/libs/components/promptbox/src/lib/CharactersModal.tsx b/frontend/libs/components/promptbox/src/lib/CharactersModal.tsx index 0f1b6928b7..06444c1292 100644 --- a/frontend/libs/components/promptbox/src/lib/CharactersModal.tsx +++ b/frontend/libs/components/promptbox/src/lib/CharactersModal.tsx @@ -5,7 +5,6 @@ import { faPlus, faArrowLeft, faUpload, - faTrash, faUserGroup, faSpinnerThird, faImages, @@ -54,8 +53,7 @@ export const CharactersModal = ({ isOpen={isOpen} onClose={handleClose} title={view === "list" ? "Characters" : undefined} - width={680} - className="max-h-[80vh] flex flex-col overflow-hidden" + className="max-w-[800px] min-h-[600px] max-h-[60vh] flex flex-col overflow-hidden" >
{view === "list" ? ( @@ -155,69 +153,66 @@ const CharacterListView = ({ return (
- {loading && characters.length === 0 ? ( -
- -

Loading characters...

-
- ) : ( -
- {/* Create New card */} + {loading && characters.length === 0 ? ( +
+ +

Loading characters...

+
+ ) : ( +
+ {/* Create New card */} + + + {characters.map((character) => ( + ))} +
+ )} - {characters.map((character) => ( - - ))} -
- )} - - {/* Sentinel for infinite scroll */} - {hasMore && ( -
- -
- )} + {/* Sentinel for infinite scroll */} + {hasMore && ( +
+ +
+ )}
); }; @@ -243,7 +238,9 @@ const NewCharacterView = ({ const dropZoneRef = useRef(null); const [isDragging, setIsDragging] = useState(false); const [isGalleryOpen, setIsGalleryOpen] = useState(false); - const [selectedGalleryImages, setSelectedGalleryImages] = useState([]); + const [selectedGalleryImages, setSelectedGalleryImages] = useState( + [], + ); const processFiles = useCallback( async (files: FileList | File[]) => { @@ -257,7 +254,9 @@ const NewCharacterView = ({ // Only keep the first file (single image) const file = imageFiles[0]!; - const newImages: UploadedImage[] = [{ file, url: URL.createObjectURL(file) }]; + const newImages: UploadedImage[] = [ + { file, url: URL.createObjectURL(file) }, + ]; // Replace any existing image setImages((prev) => { @@ -428,7 +427,10 @@ const NewCharacterView = ({ onClick={() => fileInputRef.current?.click()} > {images.length > 0 ? ( -
e.stopPropagation()}> +
e.stopPropagation()} + > Reference Click or drag an image here

-
e.stopPropagation()}> +
e.stopPropagation()} + >