diff --git a/web/containers/Layout/TopBar/index.tsx b/web/containers/Layout/TopBar/index.tsx index 9ef03dd11..af310a60d 100644 --- a/web/containers/Layout/TopBar/index.tsx +++ b/web/containers/Layout/TopBar/index.tsx @@ -1,20 +1,22 @@ import { useState } from 'react' import { getUserSpace, joinPath, openFileExplorer } from '@janhq/core' -import { useAtomValue, useSetAtom } from 'jotai' +import { useAtom, useAtomValue } from 'jotai' import { - PanelLeftIcon, PenSquareIcon, - PanelRightIcon, MoreVerticalIcon, FolderOpenIcon, Code2Icon, + PanelLeftCloseIcon, + PanelRightCloseIcon, } from 'lucide-react' import { twMerge } from 'tailwind-merge' import CommandSearch from '@/containers/Layout/TopBar/CommandSearch' +import { showLeftSideBarAtom } from '@/containers/Providers/KeyListener' + import { MainViewState } from '@/constants/screens' import { useClickOutside } from '@/hooks/useClickOutside' @@ -31,7 +33,8 @@ const TopBar = () => { const { mainViewState } = useMainViewState() const { requestCreateNewThread } = useCreateNewThread() const { assistants } = useGetAssistants() - const setShowRightSideBar = useSetAtom(showRightSideBarAtom) + const [showRightSideBar, setShowRightSideBar] = useAtom(showRightSideBarAtom) + const [showLeftSideBar, setShowLeftSideBar] = useAtom(showLeftSideBarAtom) const showing = useAtomValue(showRightSideBarAtom) const threadStates = useAtomValue(threadStatesAtom) const [more, setMore] = useState(false) @@ -105,10 +108,16 @@ const TopBar = () => {
-
- setShowLeftSideBar((show) => !show)} + > +
{ className="unset-drag absolute right-4 cursor-pointer" onClick={() => setShowRightSideBar((show) => !show)} > - +
)} diff --git a/web/screens/Settings/Advanced/index.tsx b/web/screens/Settings/Advanced/index.tsx index f0b58b984..8c8eb1a7a 100644 --- a/web/screens/Settings/Advanced/index.tsx +++ b/web/screens/Settings/Advanced/index.tsx @@ -149,7 +149,7 @@ const Advanced = () => {

- + @@ -207,6 +207,30 @@ const Advanced = () => {
+
+
+
+ +
+
+
+
+

Toogle collapsible left panel

+
+
+
+
+
+
+ +
+
+
+
+

Navigate to setting page

+
+
+