diff --git a/frontend/src/Hero.tsx b/frontend/src/Hero.tsx index 644848dc..9fe965a1 100644 --- a/frontend/src/Hero.tsx +++ b/frontend/src/Hero.tsx @@ -37,12 +37,14 @@ export default function Hero({ ), diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index c29aaf20..bba83037 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -21,11 +21,10 @@ import { handleAbort, } from './conversation/conversationSlice'; import ConversationTile from './conversation/ConversationTile'; -import { useDarkTheme, useMediaQuery, useOutsideAlerter } from './hooks'; +import { useDarkTheme, useMediaQuery } from './hooks'; import useDefaultDocument from './hooks/useDefaultDocument'; import DeleteConvModal from './modals/DeleteConvModal'; import { ActiveState, Doc } from './models/misc'; -import APIKeyModal from './preferences/APIKeyModal'; import { getConversations, getDocs } from './preferences/preferenceApi'; import { selectApiKeyStatus, @@ -68,8 +67,6 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { const [isDocsListOpen, setIsDocsListOpen] = useState(false); const { t } = useTranslation(); const isApiKeySet = useSelector(selectApiKeyStatus); - const [apiKeyModalState, setApiKeyModalState] = - useState('INACTIVE'); const [uploadModalState, setUploadModalState] = useState('INACTIVE'); @@ -192,12 +189,6 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { console.error(err); }); } - useOutsideAlerter(navRef, () => { - if (isMobile && navOpen && apiKeyModalState === 'INACTIVE') { - setNavOpen(false); - setIsDocsListOpen(false); - } - }, [navOpen, isDocsListOpen, apiKeyModalState]); /* Needed to fix bug where if mobile nav was closed and then window was resized to desktop, nav would still be closed but the button to open would be gone, as per #1 on issue #146 @@ -220,7 +211,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { > menu toggle open new chat icon @@ -263,7 +254,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { }} > - + DocsGPT Logo

DocsGPT

@@ -275,7 +266,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { > menu toggle new

@@ -314,7 +305,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { Loading... )} @@ -365,6 +356,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { Upload document { setUploadModalState('ACTIVE'); if (isMobile) { @@ -392,7 +384,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { > icon

@@ -414,7 +406,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { > discord @@ -427,7 +419,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { > x @@ -440,7 +432,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { > github @@ -457,18 +449,13 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { > menu toggle

DocsGPT
- {
@@ -67,16 +68,22 @@ const SettingsBar = ({ setActiveTab, activeTab }: SettingsBarProps) => {
{tabs.map((tab, index) => ( @@ -85,7 +92,8 @@ const SettingsBar = ({ setActiveTab, activeTab }: SettingsBarProps) => {
diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index 8a36ea5f..e1888e25 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -386,9 +386,15 @@ export default function Conversation() { {...getRootProps()} className="flex w-full items-center rounded-[40px] border border-silver bg-white dark:bg-raisin-black" > - + + + {status === 'loading' ? ( + alt={t('loading')} + /> ) : (
- handleQuestionSubmission()} - src={isDarkTheme ? SendDark : Send} - > + aria-label={t('send')} + className="flex items-center justify-center" + > + {t('send')} +
)}
diff --git a/frontend/src/locale/en.json b/frontend/src/locale/en.json index 070deba6..9f9cbb21 100644 --- a/frontend/src/locale/en.json +++ b/frontend/src/locale/en.json @@ -166,6 +166,8 @@ "copied": "Copied", "speak": "Speak", "answer": "Answer", + "send": "Send message", + "loading": "Loading response", "edit": { "placeholder": "Type the updated query..." }, diff --git a/frontend/src/preferences/PromptsModal.tsx b/frontend/src/preferences/PromptsModal.tsx index 3aa8c54c..3a1f9bfa 100644 --- a/frontend/src/preferences/PromptsModal.tsx +++ b/frontend/src/preferences/PromptsModal.tsx @@ -29,8 +29,9 @@ function AddPrompt({ setNewPromptName(''); setNewPromptContent(''); }} + aria-label="Close add prompt modal" > - + Close modal

@@ -40,7 +41,11 @@ function AddPrompt({ Add your custom prompt and save it to DocsGPT

+
+
@@ -104,8 +114,9 @@ function EditPrompt({ onClick={() => { setModalState('INACTIVE'); }} + aria-label="Close edit prompt modal" > - + Close modal

@@ -115,13 +126,17 @@ function EditPrompt({ Edit your custom prompt and save it to DocsGPT

+ setEditPromptName(e.target.value)} - > + />
Prompt Name @@ -132,10 +147,15 @@ function EditPrompt({ Prompt Text
+
diff --git a/frontend/src/settings/APIKeys.tsx b/frontend/src/settings/APIKeys.tsx index 6775ba87..038e4bbb 100644 --- a/frontend/src/settings/APIKeys.tsx +++ b/frontend/src/settings/APIKeys.tsx @@ -115,12 +115,20 @@ export default function APIKeys() { - - + - - + + @@ -146,7 +154,7 @@ export default function APIKeys() {
{t('settings.apiKeys.name')} + + {t('settings.apiKeys.name')} + {t('settings.apiKeys.sourceDoc')} {t('settings.apiKeys.key')} + {t('settings.apiKeys.key')} +
Delete handleDeleteKey(element.id)} diff --git a/frontend/src/settings/Analytics.tsx b/frontend/src/settings/Analytics.tsx index 8baad361..ccb5ffcb 100644 --- a/frontend/src/settings/Analytics.tsx +++ b/frontend/src/settings/Analytics.tsx @@ -164,7 +164,7 @@ export default function Analytics() {
-

+

Filter by chatbot

diff --git a/frontend/src/settings/General.tsx b/frontend/src/settings/General.tsx index 227b0a6e..216ec1e0 100644 --- a/frontend/src/settings/General.tsx +++ b/frontend/src/settings/General.tsx @@ -81,9 +81,9 @@ export default function General() { return (
-

+

+
-

+

+ @@ -115,9 +115,9 @@ export default function General() { />
-

+

+
-

+

+ ({ value: value, @@ -163,16 +163,14 @@ export default function General() { />
-

+

+
diff --git a/frontend/src/settings/Prompts.tsx b/frontend/src/settings/Prompts.tsx index 6e1810e5..611b0b90 100644 --- a/frontend/src/settings/Prompts.tsx +++ b/frontend/src/settings/Prompts.tsx @@ -168,7 +168,7 @@ export default function Prompts({ />