diff --git a/ee/tabby-ui/app/(home)/page.tsx b/ee/tabby-ui/app/(home)/page.tsx index 1f453c3130f8..c3f0e5185732 100644 --- a/ee/tabby-ui/app/(home)/page.tsx +++ b/ee/tabby-ui/app/(home)/page.tsx @@ -210,7 +210,7 @@ function MainPanel() { : { height: '100vh' } return (
-
+
{isSearch && ( )}
-
+
- +
diff --git a/ee/tabby-ui/components/user-panel.tsx b/ee/tabby-ui/components/user-panel.tsx index bb3464cf55be..7900006decd5 100644 --- a/ee/tabby-ui/components/user-panel.tsx +++ b/ee/tabby-ui/components/user-panel.tsx @@ -1,4 +1,5 @@ import React from 'react' +import { useRouter } from 'next/navigation' import { useMe } from '@/lib/hooks/use-me' import { useIsChatEnabled } from '@/lib/hooks/use-server-info' @@ -16,16 +17,22 @@ import { IconBackpack, IconChat, IconCode, + IconGear, IconHome, IconLogout, IconSpinner } from './ui/icons' export default function UserPanel({ - children + children, + showHome = true, + showSetting = false }: { children?: React.ReactNode + showHome?: boolean + showSetting?: boolean }) { + const router = useRouter() const signOut = useSignOut() const [{ data }] = useMe() const user = data?.me @@ -59,13 +66,24 @@ export default function UserPanel({ )} {!user.name && {user.email}} - window.open('/')} - className="cursor-pointer" - > - - Home - + {showHome && ( + router.push('/')} + className="cursor-pointer" + > + + Home + + )} + {showSetting && ( + router.push('/profile')} + className="cursor-pointer" + > + + Settings + + )} {isChatEnabled && ( window.open('/playground')}