The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Reoreder sidebar menu items
Terry Sutton46182ac4ba5c
diff --git a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsxindex 8cf5d5aaaf8..331bcb8b521 100644--- a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx+++ b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx@@ -7,7 +7,11 @@ import { Button, Dropdown, IconHome, IconSettings, IconUser } from '@supabase/uiimport { useFlag, useStore } from 'hooks'import { IS_PLATFORM } from 'lib/constants'-import { generateOtherRoutes, generateProductRoutes } from './NavigationBar.utils'+import {+ generateOtherRoutes,+ generateProductRoutes,+ generateToolRoutes,+} from './NavigationBar.utils'import NavigationIconButton from './NavigationIconButton'import { useParams } from 'hooks/misc/useParams'@@ -22,6 +26,7 @@ const NavigationBar: FC<Props> = ({}) => {const ongoingIncident = useFlag('ongoingIncident')const activeRoute = router.pathname.split('/')[3]+ const toolRoutes = generateToolRoutes(projectRef, projectBaseInfo)const productRoutes = generateProductRoutes(projectRef, projectBaseInfo)const otherRoutes = generateOtherRoutes(projectRef, projectBaseInfo)@@ -53,6 +58,15 @@ const NavigationBar: FC<Props> = ({}) => {}}/><div className="bg-scale-500 h-px w-full"></div>+ {toolRoutes.map((route) => (+ <NavigationIconButton+ key={route.key}+ route={route}+ isActive={activeRoute === route.key}+ />+ ))}+ <div className="bg-scale-500 h-px w-full"></div>+{productRoutes.map((route) => (<NavigationIconButtonkey={route.key}diff --git a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsxindex 95726be4e96..106a3b7980a 100644--- a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx+++ b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx@@ -14,7 +14,7 @@ import { ProjectBase } from 'types'import { Route } from 'components/ui/ui.types'import { IS_PLATFORM, PROJECT_STATUS } from 'lib/constants'-export const generateProductRoutes = (ref?: string, project?: ProjectBase): Route[] => {+export const generateToolRoutes = (ref?: string, project?: ProjectBase): Route[] => {const isProjectBuilding = project?.status !== PROJECT_STATUS.ACTIVE_HEALTHYconst buildingUrl = `/project/${ref}/building`@@ -31,22 +31,6 @@ export const generateProductRoutes = (ref?: string, project?: ProjectBase): Rout),link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/editor`),},- {- key: 'auth',- label: 'Authentication',- icon: <IconUsers size={18} strokeWidth={2} />,- link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/auth/users`),- },- ...(IS_PLATFORM- ? [- {- key: 'storage',- label: 'Storage',- icon: <IconArchive size={18} strokeWidth={2} />,- link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/storage/buckets`),- },- ]- : []),{key: 'sql',label: 'SQL Editor',@@ -59,12 +43,36 @@ export const generateProductRoutes = (ref?: string, project?: ProjectBase): Rout),link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/sql`),},+ ]+}+export const generateProductRoutes = (ref?: string, project?: ProjectBase): Route[] => {+ const isProjectBuilding = project?.status !== PROJECT_STATUS.ACTIVE_HEALTHY+ const buildingUrl = `/project/${ref}/building`++ return [{key: 'database',label: 'Database',icon: <IconDatabase size={18} strokeWidth={2} />,link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/database/tables`),},+ {+ key: 'auth',+ label: 'Authentication',+ icon: <IconUsers size={18} strokeWidth={2} />,+ link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/auth/users`),+ },+ ...(IS_PLATFORM+ ? [+ {+ key: 'storage',+ label: 'Storage',+ icon: <IconArchive size={18} strokeWidth={2} />,+ link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/storage/buckets`),+ },+ ]+ : []),+...(IS_PLATFORM? [{@@ -86,20 +94,20 @@ export const generateOtherRoutes = (ref?: string, project?: ProjectBase): Route[...(IS_PLATFORM? [{- key: 'logs-explorer',- label: 'Logs Explorer',- icon: <IconList size={18} strokeWidth={2} />,- link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/logs-explorer`),+ key: 'reports',+ label: 'Reports',+ icon: <IconBarChart size={18} strokeWidth={2} />,+ link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/reports`),},]: []),...(IS_PLATFORM? [{- key: 'reports',- label: 'Reports',- icon: <IconBarChart size={18} strokeWidth={2} />,- link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/reports`),+ key: 'logs-explorer',+ label: 'Logs',+ icon: <IconList size={18} strokeWidth={2} />,+ link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/logs-explorer`),},]: []),@@ -113,7 +121,7 @@ export const generateOtherRoutes = (ref?: string, project?: ProjectBase): Route[? [{key: 'settings',- label: 'Settings',+ label: 'Project Settings',icon: <IconSettings size={18} strokeWidth={2} />,link: ref && `/project/${ref}/settings/general`,},