diff --git a/frontend/src/About.tsx b/frontend/src/About.tsx
deleted file mode 100644
index d2bbaac4..00000000
--- a/frontend/src/About.tsx
+++ /dev/null
@@ -1,99 +0,0 @@
-//TODO - Add hyperlinks to text
-//TODO - Styling
-import DocsGPT3 from './assets/cute_docsgpt3.svg';
-
-export default function About() {
- return (
-
-
-
-
About DocsGPT
-
-
-
- Find the information in your documentation through AI-powered
-
- {' '}
- open-source{' '}
-
- chatbot. Powered by GPT-3, Faiss and LangChain.
-
-
-
-
- If you want to add your own documentation, please follow the
- instruction below:
-
-
- 1. Navigate to{' '}
-
- {' '}
- /application
- {' '}
- folder
-
-
- 2. Install dependencies from{' '}
-
- pip install -r requirements.txt
-
-
-
- 3. Prepare a{' '}
- .env {' '}
- file. Copy{' '}
-
- .env_sample
- {' '}
- and create{' '}
- .env {' '}
- with your OpenAI API token
-
-
- 4. Run the app with{' '}
-
- python app.py
-
-
-
-
-
- Currently It uses{' '}
- DocsGPT {' '}
- documentation, so it will respond to information relevant to{' '}
- DocsGPT . If you
- want to train it on different documentation - please follow
-
- {' '}
- this guide
-
- .
-
-
-
- If you want to launch it on your own server - follow
-
- {' '}
- this guide
-
- .
-
-
-
- );
-}
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 1bba5f44..0d1166b7 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -2,8 +2,6 @@ import './locale/i18n';
import { useState } from 'react';
import { Outlet, Route, Routes } from 'react-router-dom';
-
-import About from './About';
import Spinner from './components/Spinner';
import Conversation from './conversation/Conversation';
import { SharedConversation } from './conversation/SharedConversation';
@@ -29,8 +27,8 @@ function AuthWrapper({ children }: { children: React.ReactNode }) {
}
function MainLayout() {
- const { isMobile } = useMediaQuery();
- const [navOpen, setNavOpen] = useState(!isMobile);
+ const { isMobile, isTablet } = useMediaQuery();
+ const [navOpen, setNavOpen] = useState(!(isMobile || isTablet));
return (
@@ -38,7 +36,7 @@ function MainLayout() {
} />
- } />
} />
} />
diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx
index f545d38c..57c5de45 100644
--- a/frontend/src/Navigation.tsx
+++ b/frontend/src/Navigation.tsx
@@ -71,7 +71,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
const sharedAgents = useSelector(selectSharedAgents);
const selectedAgent = useSelector(selectSelectedAgent);
- const { isMobile } = useMediaQuery();
+ const { isMobile, isTablet } = useMediaQuery();
const [isDarkTheme] = useDarkTheme();
const { showTokenModal, handleTokenSubmit } = useTokenAuth();
@@ -162,7 +162,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
const handleAgentClick = (agent: Agent) => {
resetConversation();
dispatch(setSelectedAgent(agent));
- if (isMobile) setNavOpen(!navOpen);
+ if (isMobile || isTablet) setNavOpen(!navOpen);
navigate('/');
};
@@ -197,6 +197,9 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
query: { conversationId: index },
}),
);
+ if (isMobile || isTablet) {
+ setNavOpen(false);
+ }
if (data.agent_id) {
if (data.is_shared_usage) {
userService
@@ -271,8 +274,8 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
}
useEffect(() => {
- setNavOpen(!isMobile);
- }, [isMobile]);
+ setNavOpen(!(isMobile || isTablet));
+ }, [isMobile, isTablet]);
useDefaultDocument();
return (
@@ -352,7 +355,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
{
- if (isMobile) {
+ if (isMobile || isTablet) {
setNavOpen(!navOpen);
}
resetConversation();
@@ -415,7 +418,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
{
dispatch(setSelectedAgent(null));
+ if (isMobile || isTablet) {
+ setNavOpen(false);
+ }
navigate('/agents');
}}
>
@@ -448,7 +454,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
/>
- Manage Agents
+ {t('manageAgents')}
@@ -456,7 +462,13 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
) : (
navigate('/agents')}
+ onClick={() => {
+ if (isMobile || isTablet) {
+ setNavOpen(false);
+ }
+ dispatch(setSelectedAgent(null));
+ navigate('/agents');
+ }}
>
- Manage Agents
+ {t('manageAgents')}
)}
@@ -502,8 +514,8 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {