Skip to content

Commit

Permalink
menu bar
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushKun committed Jul 1, 2024
1 parent d73ba47 commit 9e90795
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
36 changes: 34 additions & 2 deletions next_app/src/components/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ import AllProjects from "./ao/all-projects";
import Packages from "./ao/packages";
import { specialFileTabs } from "@/lib/utils";

import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu"
import Link from "next/link";



const Plot = dynamic(
() =>
Expand Down Expand Up @@ -822,9 +833,30 @@ export default function Layout() {
<title>{`BetterIDEa ${globalState.activeProject && ("| " + globalState.activeProject)}`}</title>
</Head>

<TopBar />
{/* <TopBar /> */}
<div className="h-[25px] border-b border-border/50 px-1 text-sm flex items-center overflow-clip">
{/* <Button variant="ghost" className="p-1.5">Project</Button>
<div className="grow"/>
<Button variant="ghost" className="p-1.5">Help</Button> */}
<Link href="/">
<Image src="/icon.svg" alt="BetterIDEa" width={15} height={15} className="mx-1 h-[20px]" />
</Link>
<DropdownMenu>
<DropdownMenuTrigger>
<Button variant="ghost" className="p-1.5">Project</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="ml-1 -mt-2">
<DropdownMenuLabel>{project.name || <span className="text-muted">No Project Selected</span>}</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuItem>Share</DropdownMenuItem>
<DropdownMenuItem>Download</DropdownMenuItem>
<DropdownMenuItem>Load Blueprint</DropdownMenuItem>
<DropdownMenuItem onClick={()=>globalState.setActiveProject("")}>Close</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</div>

<main className="h-[calc(100vh-89px)] flex flex-row">
<main className="h-[calc(100vh-50px)] flex flex-row">
{/* <div className="w-fit border-r"> */}
<SideBar collapsed={sidebarCollapsed} manager={manager} setCollapsed={setSidebarCollapsed} />
{/* </div> */}
Expand Down
2 changes: 1 addition & 1 deletion next_app/src/components/side-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function SideBar({ collapsed, setCollapsed, manager }: { collapse
};

return (
<div data-collapsed={collapsed} className="absolute py-2 flex flex-col gap-1 truncate justify-center left-0 z-50 transition-all duration-200 w-[50px] data-[collapsed=false]:w-[250px] border-r border-border/40 bg-[#ececef] h-[calc(100vh-89px)]"
<div data-collapsed={collapsed} className="absolute py-2 flex flex-col gap-1 truncate justify-center left-0 z-50 transition-all duration-200 w-[50px] data-[collapsed=false]:w-[250px] border-r border-border/40 bg-[#ececef] h-[calc(100vh-50px)]"
onMouseEnter={() => setCollapsed(false)} onMouseLeave={() => setCollapsed(true)}>
{globalState.activeMode == "AO" ? <NewAOProjectDialog collapsed={collapsed} manager={manager} setCollapsed={setCollapsed} /> : <NewWarpProjectDialog collapsed={collapsed} manager={manager} />}
{/* <div className="h-[1px] w-[90%] my-2 bg-border mx-auto"></div> */}
Expand Down

0 comments on commit 9e90795

Please sign in to comment.