diff --git a/client/src/components/Chat/Header.tsx b/client/src/components/Chat/Header.tsx index bf04a2e4f3..5025307020 100644 --- a/client/src/components/Chat/Header.tsx +++ b/client/src/components/Chat/Header.tsx @@ -11,6 +11,7 @@ import BookmarkMenu from './Menus/BookmarkMenu'; import { TemporaryChat } from './TemporaryChat'; import AddMultiConvo from './AddMultiConvo'; import { useHasAccess } from '~/hooks'; +import { AnimatePresence, motion } from 'framer-motion'; const defaultInterface = getConfigDefaults().interface; @@ -38,24 +39,24 @@ export default function Header() { return (
-
-
- - -
-
+
+ + {!navVisible && ( + + + + + )} + + +
{interfaceConfig.presets === true && interfaceConfig.modelSelect && } {hasAccessToBookmarks === true && } diff --git a/client/src/components/Nav/MobileNav.tsx b/client/src/components/Nav/MobileNav.tsx index 6f11b327ce..7a508a28eb 100644 --- a/client/src/components/Nav/MobileNav.tsx +++ b/client/src/components/Nav/MobileNav.tsx @@ -9,8 +9,10 @@ import { clearMessagesCache } from '~/utils'; import store from '~/store'; export default function MobileNav({ + navVisible, setNavVisible, }: { + navVisible: boolean; setNavVisible: Dispatch>; }) { const localize = useLocalize(); @@ -25,7 +27,7 @@ export default function MobileNav({ type="button" data-testid="mobile-header-new-chat-button" aria-label={localize('com_nav_open_sidebar')} - className="m-1 inline-flex size-10 items-center justify-center rounded-full hover:bg-surface-hover" + className={`m-1 inline-flex size-10 items-center justify-center rounded-full hover:bg-surface-hover ${navVisible ? 'invisible' : ''}`} onClick={() => setNavVisible((prev) => { localStorage.setItem('navVisible', JSON.stringify(!prev)); diff --git a/client/src/components/Nav/Nav.tsx b/client/src/components/Nav/Nav.tsx index ecea9c3d14..e449904143 100644 --- a/client/src/components/Nav/Nav.tsx +++ b/client/src/components/Nav/Nav.tsx @@ -1,5 +1,6 @@ import { useCallback, useEffect, useState, useMemo, memo, lazy, Suspense, useRef } from 'react'; import { useRecoilValue } from 'recoil'; +import { AnimatePresence, motion } from 'framer-motion'; import { useMediaQuery } from '@librechat/client'; import { PermissionTypes, Permissions } from 'librechat-data-provider'; import type { ConversationListResponse } from 'librechat-data-provider'; @@ -190,22 +191,21 @@ const Nav = memo( return ( <> -
-
-
-
+ + {navVisible && ( + +
-
-
-
+ + )} + {isSmallScreen && } ); diff --git a/client/src/components/SidePanel/SidePanelGroup.tsx b/client/src/components/SidePanel/SidePanelGroup.tsx index 5a81f088df..14473127b5 100644 --- a/client/src/components/SidePanel/SidePanelGroup.tsx +++ b/client/src/components/SidePanel/SidePanelGroup.tsx @@ -147,11 +147,13 @@ const SidePanelGroup = memo( {artifacts != null && isSmallScreen && (
{artifacts}
)} -