diff --git a/src/components/Chat/AddContextFiltersModal.tsx b/src/components/Chat/AddContextFiltersModal.tsx index aa668230..ce829344 100644 --- a/src/components/Chat/AddContextFiltersModal.tsx +++ b/src/components/Chat/AddContextFiltersModal.tsx @@ -120,7 +120,7 @@ const AddContextFiltersModal: React.FC = ({ return ( -
+

Choose specific context files or customise the RAG search

diff --git a/src/components/Common/IndexingProgress.tsx b/src/components/Common/IndexingProgress.tsx index fe37a27a..05ec42ea 100644 --- a/src/components/Common/IndexingProgress.tsx +++ b/src/components/Common/IndexingProgress.tsx @@ -35,7 +35,6 @@ const IndexingProgress: React.FC = ({ isOpen={true} onClose={() => console.log("Not allowing a close for now")} hideCloseButton={true} - widthType="indexingProgress" >
diff --git a/src/components/Common/Modal.tsx b/src/components/Common/Modal.tsx index ba06fd3f..230e5d01 100644 --- a/src/components/Common/Modal.tsx +++ b/src/components/Common/Modal.tsx @@ -6,58 +6,17 @@ interface ModalProps { children: React.ReactNode; hideCloseButton?: boolean; tailwindStylesOnBackground?: string; - widthType?: ModalWidthType; } -/* - * Modal is used in many places for different functions. The dimensions that newNote window - * should display is different than what settings should be. This is a wrapper to select the width - * that should be displayed. - */ -type ModalWidthType = - | "newNote" - | "newDirectory" - | "renameNote" - | "renameDirectory" - | "flashcardMode" - | "flashcardReviewMode" - | "newEmbeddingModel" - | "localLLMSetting" - | "remoteLLMSetting" - | "indexingProgress"; - -type Dimension = "[500px]" | "[750px]" | "[300px]" | "full" | "[850px]"; - -const customDimensionsMap: Record = { - newNote: "[500px]", - newDirectory: "[500px]", - renameNote: "[500px]", - renameDirectory: "[500px]", - flashcardMode: "[750px]", - flashcardReviewMode: "[300px]", - newEmbeddingModel: "[500px]", - localLLMSetting: "[500px]", - remoteLLMSetting: "[500px]", - indexingProgress: "[850px]", -}; - -const getDimension = (name: ModalWidthType | undefined): Dimension => { - if (name === undefined) { - return "full"; - } - return customDimensionsMap[name] || "full"; -}; - const ReorModal: React.FC = ({ isOpen, onClose, children, hideCloseButton, tailwindStylesOnBackground, - widthType, }) => { const modalRef = useRef(null); - const widthClass = getDimension(widthType as ModalWidthType); + // const widthClass = getDimension(widthType as ModalWidthType); const handleOffClick = (event: MouseEvent) => { if (modalRef.current && !modalRef.current.contains(event.target as Node)) { @@ -78,11 +37,11 @@ const ReorModal: React.FC = ({ return (
{!hideCloseButton && ( diff --git a/src/components/Common/Select.tsx b/src/components/Common/Select.tsx index 953a70a3..3855ef28 100644 --- a/src/components/Common/Select.tsx +++ b/src/components/Common/Select.tsx @@ -60,9 +60,9 @@ const CustomSelect: React.FC = ({ }; return ( -
+
{centerText ? : null} @@ -76,7 +76,7 @@ const CustomSelect: React.FC = ({
{isOpen && (
= ({ }; return ( - +

New Directory

= ({ }; return ( - +

New Note

= ({ }; return ( - +

Rename Directory diff --git a/src/components/File/RenameNote.tsx b/src/components/File/RenameNote.tsx index 5d287c63..d89bbfa1 100644 --- a/src/components/File/RenameNote.tsx +++ b/src/components/File/RenameNote.tsx @@ -98,7 +98,7 @@ const RenameNoteModal: React.FC = ({ }; return ( - +

Rename Note

= ({ return ( -
+

Select a file to generate flashcards for: = ({
diff --git a/src/components/Flashcard/FlashcardReviewModal.tsx b/src/components/Flashcard/FlashcardReviewModal.tsx index a67cce2f..d5786491 100644 --- a/src/components/Flashcard/FlashcardReviewModal.tsx +++ b/src/components/Flashcard/FlashcardReviewModal.tsx @@ -53,17 +53,13 @@ const FlashcardReviewModal: React.FC = ({ }, [selectedFlashcardFile]); return ( - -
+ +

Flashcard Review Mode

-
+
{ return { label: file, value: file }; @@ -73,6 +69,7 @@ const FlashcardReviewModal: React.FC = ({ setCurrentSelectedFlashcard(0); setSelectedFlashcardFile(value); }} + // className="w-full" />
diff --git a/src/components/Flashcard/FlashcardsCore.tsx b/src/components/Flashcard/FlashcardsCore.tsx index 7a17af8f..b9c5abc9 100644 --- a/src/components/Flashcard/FlashcardsCore.tsx +++ b/src/components/Flashcard/FlashcardsCore.tsx @@ -42,8 +42,8 @@ export const FlashcardCore = ({ flipDirection="vertical" > {flashcardQAPairs[currentSelectedFlashcard].isFlipped && ( // this boolean is required to ensure that we check the flipped boolean to prevent the answer from leaking