mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-10 05:39:11 +00:00
Improve the nav menu in the not logged in experience
This commit is contained in:
@@ -664,7 +664,7 @@ export default function SidePanel(props: SidePanelProps) {
|
|||||||
<div className={`${styles.panel} ${enabled ? styles.expanded : styles.collapsed} ${props.isMobileWidth ? 'mt-0' : 'mt-1'}`}>
|
<div className={`${styles.panel} ${enabled ? styles.expanded : styles.collapsed} ${props.isMobileWidth ? 'mt-0' : 'mt-1'}`}>
|
||||||
<div className={`flex justify-between flex-row`}>
|
<div className={`flex justify-between flex-row`}>
|
||||||
{
|
{
|
||||||
authenticatedData && props.isMobileWidth ?
|
props.isMobileWidth ?
|
||||||
<Drawer open={enabled} onOpenChange={(open) => {
|
<Drawer open={enabled} onOpenChange={(open) => {
|
||||||
if (!enabled) setEnabled(false);
|
if (!enabled) setEnabled(false);
|
||||||
setEnabled(open);
|
setEnabled(open);
|
||||||
@@ -676,18 +676,27 @@ export default function SidePanel(props: SidePanelProps) {
|
|||||||
<DrawerTitle>Sessions and Files</DrawerTitle>
|
<DrawerTitle>Sessions and Files</DrawerTitle>
|
||||||
<DrawerDescription>View all conversation sessions and manage conversation file filters</DrawerDescription>
|
<DrawerDescription>View all conversation sessions and manage conversation file filters</DrawerDescription>
|
||||||
</DrawerHeader>
|
</DrawerHeader>
|
||||||
<div className={`${styles.panelWrapper}`}>
|
{
|
||||||
<SessionsAndFiles
|
authenticatedData ?
|
||||||
setEnabled={setEnabled}
|
<div className={`${styles.panelWrapper}`}>
|
||||||
subsetOrganizedData={subsetOrganizedData}
|
<SessionsAndFiles
|
||||||
organizedData={organizedData}
|
setEnabled={setEnabled}
|
||||||
data={data}
|
subsetOrganizedData={subsetOrganizedData}
|
||||||
uploadedFiles={props.uploadedFiles}
|
organizedData={organizedData}
|
||||||
userProfile={authenticatedData}
|
data={data}
|
||||||
conversationId={props.conversationId}
|
uploadedFiles={props.uploadedFiles}
|
||||||
isMobileWidth={props.isMobileWidth}
|
userProfile={authenticatedData}
|
||||||
/>
|
conversationId={props.conversationId}
|
||||||
</div>
|
isMobileWidth={props.isMobileWidth}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
:
|
||||||
|
<div className={`${styles.panelWrapper}`}>
|
||||||
|
<Link href={`/login?next=${encodeURIComponent(window.location.pathname)}`} className="text-center"> {/* Redirect to login page */}
|
||||||
|
<Button variant="default"><UserCirclePlus className="h-4 w-4 mr-1" />Sign Up</Button>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
<DrawerFooter>
|
<DrawerFooter>
|
||||||
<DrawerClose>
|
<DrawerClose>
|
||||||
<Button variant="outline">Done</Button>
|
<Button variant="outline">Done</Button>
|
||||||
@@ -740,7 +749,7 @@ export default function SidePanel(props: SidePanelProps) {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
!authenticatedData && enabled &&
|
!authenticatedData && enabled && !props.isMobileWidth &&
|
||||||
<div className={`${styles.panelWrapper}`}>
|
<div className={`${styles.panelWrapper}`}>
|
||||||
<Link href="/" className="flex flex-col content-start items-start no-underline">
|
<Link href="/" className="flex flex-col content-start items-start no-underline">
|
||||||
<Button variant="ghost"><House className="h-4 w-4 mr-1" />Home</Button>
|
<Button variant="ghost"><House className="h-4 w-4 mr-1" />Home</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user