mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-08 21:29:12 +00:00
Weird spacing issue resolve (it was because of the footer in the collapsed state still having some width)
This commit is contained in:
@@ -192,7 +192,7 @@ function ChatSidebarInternal({ ...props }: ChatSideBarProps) {
|
|||||||
className={`ml-auto opacity-30 rounded-lg p-2 transition-all transform duration-300 ease-in-out
|
className={`ml-auto opacity-30 rounded-lg p-2 transition-all transform duration-300 ease-in-out
|
||||||
${props.isOpen
|
${props.isOpen
|
||||||
? "translate-x-0 opacity-100 w-[300px] relative"
|
? "translate-x-0 opacity-100 w-[300px] relative"
|
||||||
: "translate-x-full opacity-0 w-0 p-0 m-0"}
|
: "translate-x-full opacity-100 w-0 p-0 m-0"}
|
||||||
`}
|
`}
|
||||||
variant="floating">
|
variant="floating">
|
||||||
<SidebarContent>
|
<SidebarContent>
|
||||||
@@ -356,60 +356,64 @@ function ChatSidebarInternal({ ...props }: ChatSideBarProps) {
|
|||||||
</SidebarGroupContent>
|
</SidebarGroupContent>
|
||||||
</SidebarGroup>
|
</SidebarGroup>
|
||||||
</SidebarContent>
|
</SidebarContent>
|
||||||
<SidebarFooter key={"actions"}>
|
{
|
||||||
<SidebarMenu className="p-0 m-0">
|
props.isOpen && (
|
||||||
|
<SidebarFooter key={"actions"}>
|
||||||
|
<SidebarMenu className="p-0 m-0">
|
||||||
|
|
||||||
{
|
{
|
||||||
(agentData && !isEditable && agentData.is_creator) ? (
|
(agentData && !isEditable && agentData.is_creator) ? (
|
||||||
<SidebarMenuItem>
|
<SidebarMenuItem>
|
||||||
<SidebarMenuButton asChild>
|
<SidebarMenuButton asChild>
|
||||||
<Button
|
<Button
|
||||||
className="w-full"
|
className="w-full"
|
||||||
variant={"ghost"}
|
variant={"ghost"}
|
||||||
onClick={() => window.location.href = `/agents?agent=${agentData?.slug}`}
|
onClick={() => window.location.href = `/agents?agent=${agentData?.slug}`}
|
||||||
>
|
>
|
||||||
Manage
|
Manage
|
||||||
</Button>
|
</Button>
|
||||||
</SidebarMenuButton>
|
</SidebarMenuButton>
|
||||||
</SidebarMenuItem>
|
</SidebarMenuItem>
|
||||||
) :
|
) :
|
||||||
<>
|
<>
|
||||||
<SidebarMenuItem>
|
<SidebarMenuItem>
|
||||||
<SidebarMenuButton asChild>
|
<SidebarMenuButton asChild>
|
||||||
<Button
|
<Button
|
||||||
className="w-full"
|
className="w-full"
|
||||||
onClick={() => handleReset()}
|
onClick={() => handleReset()}
|
||||||
variant={"ghost"}
|
variant={"ghost"}
|
||||||
disabled={!isEditable || !hasModified}
|
disabled={!isEditable || !hasModified}
|
||||||
>
|
>
|
||||||
Reset
|
Reset
|
||||||
</Button>
|
</Button>
|
||||||
</SidebarMenuButton>
|
</SidebarMenuButton>
|
||||||
</SidebarMenuItem>
|
</SidebarMenuItem>
|
||||||
<SidebarMenuItem>
|
<SidebarMenuItem>
|
||||||
<SidebarMenuButton asChild>
|
<SidebarMenuButton asChild>
|
||||||
<Button
|
<Button
|
||||||
className="w-full"
|
className="w-full"
|
||||||
variant={"secondary"}
|
variant={"secondary"}
|
||||||
onClick={() => handleSave()}
|
onClick={() => handleSave()}
|
||||||
disabled={!isEditable || !hasModified || isSaving}
|
disabled={!isEditable || !hasModified || isSaving}
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
isSaving ?
|
isSaving ?
|
||||||
<CircleNotch className="animate-spin" />
|
<CircleNotch className="animate-spin" />
|
||||||
:
|
:
|
||||||
<ArrowsDownUp />
|
<ArrowsDownUp />
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
isSaving ? "Saving" : "Save"
|
isSaving ? "Saving" : "Save"
|
||||||
}
|
}
|
||||||
</Button>
|
</Button>
|
||||||
</SidebarMenuButton>
|
</SidebarMenuButton>
|
||||||
</SidebarMenuItem>
|
</SidebarMenuItem>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
</SidebarMenu>
|
</SidebarMenu>
|
||||||
</SidebarFooter>
|
</SidebarFooter>
|
||||||
|
)
|
||||||
|
}
|
||||||
</Sidebar>
|
</Sidebar>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user