- {selectedDocs?.name || ''}
+ {selectedDocs?.name || 'None'}
{selectedDocs?.version}
@@ -57,7 +59,7 @@ function SourceDropdown({
/>
{isDocsListOpen && (
-
+
{options ? (
options.map((option: any, index: number) => {
if (option.model === embeddingsName) {
@@ -104,7 +106,7 @@ function SourceDropdown({
onClick={handleEmptyDocumentSelect}
>
- Empty
+ None
diff --git a/frontend/src/conversation/ConversationTile.tsx b/frontend/src/conversation/ConversationTile.tsx
index 4b037a8..b9d2301 100644
--- a/frontend/src/conversation/ConversationTile.tsx
+++ b/frontend/src/conversation/ConversationTile.tsx
@@ -32,15 +32,6 @@ export default function ConversationTile({
const [isDarkTheme] = useDarkTheme();
const [isEdit, setIsEdit] = useState(false);
const [conversationName, setConversationsName] = useState('');
- // useOutsideAlerter(
- // tileRef,
- // () =>
- // handleSaveConversation({
- // id: conversationId || conversation.id,
- // name: conversationName,
- // }),
- // [conversationName],
- // );
useEffect(() => {
setConversationsName(conversation.name);
@@ -69,9 +60,9 @@ export default function ConversationTile({
onClick={() => {
selectConversation(conversation.id);
}}
- className={`my-auto mx-4 mt-4 flex h-9 cursor-pointer items-center justify-between gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-purple-taupe ${
+ className={`my-auto mx-4 mt-4 flex h-9 cursor-pointer items-center justify-between gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-[#28292E] ${
conversationId === conversation.id
- ? 'bg-gray-100 dark:bg-purple-taupe'
+ ? 'bg-gray-100 dark:bg-[#28292E]'
: ''
}`}
>
diff --git a/frontend/src/index.css b/frontend/src/index.css
index b35385b..c47b442 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -398,3 +398,13 @@ template {
padding: 16px;
}
}
+
+@font-face {
+ font-family: 'Inter';
+ font-weight: 100 200 300 400 500 600 700 800 900;
+ src: url('/fonts/Inter-Variable.ttf');
+}
+
+::-webkit-scrollbar {
+ width: 0;
+}
diff --git a/frontend/src/modals/ConfirmationModal.tsx b/frontend/src/modals/ConfirmationModal.tsx
new file mode 100644
index 0000000..c5b4cf4
--- /dev/null
+++ b/frontend/src/modals/ConfirmationModal.tsx
@@ -0,0 +1,68 @@
+import Exit from '../assets/exit.svg';
+import { ActiveState } from '../models/misc';
+
+function ConfirmationModal({
+ message,
+ modalState,
+ setModalState,
+ submitLabel,
+ handleSubmit,
+ cancelLabel,
+ handleCancel,
+}: {
+ message: string;
+ modalState: ActiveState;
+ setModalState: (state: ActiveState) => void;
+ submitLabel: string;
+ handleSubmit: () => void;
+ cancelLabel?: string;
+ handleCancel?: () => void;
+}) {
+ return (
+
+
+
+
+
+
+ {message}
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+export default ConfirmationModal;
diff --git a/frontend/src/preferences/DeleteConvModal.tsx b/frontend/src/modals/DeleteConvModal.tsx
similarity index 57%
rename from frontend/src/preferences/DeleteConvModal.tsx
rename to frontend/src/modals/DeleteConvModal.tsx
index ba7ed06..4371fc1 100644
--- a/frontend/src/preferences/DeleteConvModal.tsx
+++ b/frontend/src/modals/DeleteConvModal.tsx
@@ -1,8 +1,9 @@
-import { useRef } from 'react';
-import { ActiveState } from '../models/misc';
-import { useMediaQuery, useOutsideAlerter } from './../hooks';
-import Modal from '../Modal';
+import React from 'react';
import { useDispatch } from 'react-redux';
+import { ActiveState } from '../models/misc';
+import { useMediaQuery, useOutsideAlerter } from '../hooks';
+import ConfirmationModal from './ConfirmationModal';
+
import { Action } from '@reduxjs/toolkit';
export default function DeleteConvModal({
@@ -14,8 +15,8 @@ export default function DeleteConvModal({
setModalState: (val: ActiveState) => Action;
handleDeleteAllConv: () => void;
}) {
+ const modalRef = React.useRef(null);
const dispatch = useDispatch();
- const modalRef = useRef(null);
const { isMobile } = useMediaQuery();
useOutsideAlerter(
@@ -38,25 +39,13 @@ export default function DeleteConvModal({
}
return (
-
{
- return (
-
-
- Are you sure you want to delete all the conversations?
-
-
- );
- }}
+ handleCancel={handleCancel}
/>
);
}
diff --git a/frontend/src/Modal/index.tsx b/frontend/src/modals/index.tsx
similarity index 100%
rename from frontend/src/Modal/index.tsx
rename to frontend/src/modals/index.tsx
diff --git a/frontend/src/preferences/APIKeyModal.tsx b/frontend/src/preferences/APIKeyModal.tsx
index 7aeeadb..dd7a1b8 100644
--- a/frontend/src/preferences/APIKeyModal.tsx
+++ b/frontend/src/preferences/APIKeyModal.tsx
@@ -3,7 +3,7 @@ import { useDispatch, useSelector } from 'react-redux';
import { ActiveState } from '../models/misc';
import { selectApiKey, setApiKey } from './preferenceSlice';
import { useMediaQuery, useOutsideAlerter } from './../hooks';
-import Modal from '../Modal';
+import Modal from '../modals';
export default function APIKeyModal({
modalState,
diff --git a/frontend/src/preferences/PromptsModal.tsx b/frontend/src/preferences/PromptsModal.tsx
index da95dc0..c16ddd2 100644
--- a/frontend/src/preferences/PromptsModal.tsx
+++ b/frontend/src/preferences/PromptsModal.tsx
@@ -37,7 +37,7 @@ function AddPrompt({
setNewPromptName(e.target.value)}
>
@@ -52,7 +52,7 @@ function AddPrompt({