diff --git a/apps/studio/components/interfaces/sidebar-open-top-banner.tsx b/apps/studio/components/interfaces/sidebar-open-top-banner.tsx index b355f362bf5..d08835e28e0 100644 --- a/apps/studio/components/interfaces/sidebar-open-top-banner.tsx +++ b/apps/studio/components/interfaces/sidebar-open-top-banner.tsx @@ -13,9 +13,29 @@ import { IS_PLATFORM } from 'lib/constants' import { CornerLeftUp } from 'lucide-react' import { useRouter } from 'next/router' import { useAppStateSnapshot } from 'state/app-state' -import { useSidebar } from 'ui' +import { cn, useSidebar } from 'ui' import Connect from './Connect/Connect' import BranchDropdown from 'components/layouts/AppLayout/BranchDropdown' +import Image from 'next/image' +import Link from 'next/link' + +const LayoutHeaderDivider = () => ( + + + + + +) export function SidebarOpenTopBanner() { const connectDialogUpdate = useFlag('connectDialogUpdate') @@ -49,10 +69,34 @@ export function SidebarOpenTopBanner() { // paddingLeft: open ? '16px' : '8px', // paddingRight: open ? '16px' : '8px', // }} - className="relative items-center flex w-full gap-5 pt-[6px] pb-[1px] px-2" + className="relative items-center flex w-full gap-4 pt-[6px] pb-[1px] px-4" > + + + + {open && ( + + supabase + + )} + + {/* */} - + {/* {project && ( router.push(`/org/${org?.slug}`)} @@ -70,13 +114,13 @@ export function SidebarOpenTopBanner() { Organization )} - - + */} + {project && ( + {isBranchingEnabled && ( + )} - {connectDialogUpdate && } - {!isBranchingEnabled && } + + {connectDialogUpdate && } + {!isBranchingEnabled && } + )} diff --git a/apps/studio/components/layouts/AppLayout/OrganizationDropdown.tsx b/apps/studio/components/layouts/AppLayout/OrganizationDropdown.tsx index 72163bf92f7..84509f0b98e 100644 --- a/apps/studio/components/layouts/AppLayout/OrganizationDropdown.tsx +++ b/apps/studio/components/layouts/AppLayout/OrganizationDropdown.tsx @@ -46,81 +46,72 @@ const OrganizationDropdown = () => { } return ( - - - } - icon={} - > - {orgName} - {/* */} - {/* {orgName} */} - {/* {isSuccess && ( - - {subscription?.plan.name} - - )} */} - {/* */} - - - - - - - No organizations found - - 7 ? 'h-[210px]' : ''}> - {organizations?.map((org) => { - const href = `/org/${org.slug}` - return ( + <> + + + {orgName} + + + + }> + + + + + + No organizations found + + 7 ? 'h-[210px]' : ''}> + {organizations?.map((org) => { + const href = `/org/${org.slug}` + return ( + { + setOpen(false) + router.push(href) + }} + onClick={() => setOpen(false)} + > + + + {org.name} + + + {org.slug === slug && } + + + ) + })} + + + {organizationCreationEnabled && ( + <> + + { + onSelect={(e) => { setOpen(false) - router.push(href) + router.push(`/new`) }} onClick={() => setOpen(false)} > - - - {org.name} - - - {org.slug === slug && } + + + New organization - ) - })} - - - {organizationCreationEnabled && ( - <> - - - { - setOpen(false) - router.push(`/new`) - }} - onClick={() => setOpen(false)} - > - - - New organization - - - - > - )} - - - - + + > + )} + + + + + > ) } diff --git a/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx b/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx index 25423e20e2d..0db86904817 100644 --- a/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx +++ b/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx @@ -119,65 +119,66 @@ const ProjectDropdown = ({ isNewNav = false }: ProjectDropdownProps) => { } return IS_PLATFORM ? ( - - - } - block - icon={} - > - {selectedProject?.name} - - - - - - - No projects found - - 7 ? 'h-[210px]' : ''}> - {projects?.map((project) => ( - - ))} - - - {projectCreationEnabled && ( - <> - - - { - setOpen(false) - router.push(`/new/${selectedOrganization?.slug}`) - }} - onClick={() => setOpen(false)} - > - { + <> + + + {project?.name} + + + + } + > + + + + + + No projects found + + 7 ? 'h-[210px]' : ''}> + {projects?.map((project) => ( + + ))} + + + {projectCreationEnabled && ( + <> + + + { setOpen(false) + router.push(`/new/${selectedOrganization?.slug}`) }} - className="w-full flex items-center gap-2" + onClick={() => setOpen(false)} > - - New project - - - - > - )} - - - - + { + setOpen(false) + }} + className="w-full flex items-center gap-2" + > + + New project + + + + > + )} + + + + + > ) : ( {selectedProject?.name} diff --git a/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx b/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx index 069968f4271..7c102183644 100644 --- a/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx +++ b/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx @@ -178,7 +178,7 @@ const ProjectLayout = forwardRef} */} diff --git a/packages/ui/src/components/shadcn/ui/sidebar.tsx b/packages/ui/src/components/shadcn/ui/sidebar.tsx index 309626ef1b7..05e1474c24a 100644 --- a/packages/ui/src/components/shadcn/ui/sidebar.tsx +++ b/packages/ui/src/components/shadcn/ui/sidebar.tsx @@ -224,9 +224,9 @@ const Sidebar = React.forwardRef< />
{orgName}
New organization
New project