Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Feat/ Org layout (#33150)

Jonathan Summers-Muirfb24d913051f
diff --git a/apps/studio/components/interface/Organization/exhaustion.constants.ts b/apps/studio/components/interface/Organization/exhaustion.constants.ts
new file mode 100644
index 00000000000..1decddf2f48
--- /dev/null
+++ b/apps/studio/components/interface/Organization/exhaustion.constants.ts
@@ -0,0 +1,19 @@
+const EXHAUSTION_MESSAGES = {
+ GRACE_PERIOD: {
+ title: 'Your organization has exceeded its quota',
+ message: (date: string) => `You are given a grace period until ${date}`,
+ },
+ GRACE_PERIOD_OVER: {
+ title: 'Grace period is over',
+ message: 'Your project will not be able to serve requests when you used up your quota.',
+ },
+ RESTRICTED: {
+ title: 'Services Restricted',
+ message:
+ 'Your project is unable to serve any requests as your organization has used up its quota.',
+ },
+ OVERDUE_INVOICES: {
+ title: 'Outstanding Invoices',
+ message: 'Please pay invoices to avoid service disruption.',
+ },
+} as const
diff --git a/apps/studio/components/interfaces/Account/NewAccessTokenButton.tsx b/apps/studio/components/interfaces/Account/NewAccessTokenButton.tsx
index a9e90325b41..360546f9f4a 100644
--- a/apps/studio/components/interfaces/Account/NewAccessTokenButton.tsx
+++ b/apps/studio/components/interfaces/Account/NewAccessTokenButton.tsx
@@ -82,7 +82,6 @@ const NewAccessTokenButton = ({ onCreateToken }: NewAccessTokenButtonProps) => {
</div>
<Modal
- closable
hideFooter
size="small"
visible={isOpen}
diff --git a/apps/studio/components/interfaces/App/AppBannerWrapper.tsx b/apps/studio/components/interfaces/App/AppBannerWrapper.tsx
index d54189d2d38..302ec30aa97 100644
--- a/apps/studio/components/interfaces/App/AppBannerWrapper.tsx
+++ b/apps/studio/components/interfaces/App/AppBannerWrapper.tsx
@@ -6,6 +6,7 @@ import { NoticeBanner } from 'components/layouts/AppLayout/NoticeBanner'
import { RestrictionBanner } from 'components/layouts/AppLayout/RestrictionBanner'
import { useFlag } from 'hooks/ui/useFlag'
import { useProfile } from 'lib/profile'
+import { OrganizationResourceBanner } from '../Organization/HeaderBanner'
const AppBannerWrapper = ({ children }: PropsWithChildren<{}>) => {
const { profile } = useProfile()
@@ -20,6 +21,7 @@ const AppBannerWrapper = ({ children }: PropsWithChildren<{}>) => {
{ongoingIncident && <IncidentBanner />}
{showNoticeBanner && <NoticeBanner />}
{profile !== undefined && <RestrictionBanner />}
+ <OrganizationResourceBanner />
{clockSkewBanner && <ClockSkewBanner />}
</div>
{children}
diff --git a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx
index e6bebb185d8..3e8df33e903 100644
--- a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx
+++ b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx
@@ -6,10 +6,18 @@ import { PropsWithChildren, createContext, useContext, useEffect, useState } fro
import { APISidePanelPreview } from './APISidePanelPreview'
import { CLSPreview } from './CLSPreview'
import { InlineEditorPreview } from './InlineEditorPreview'
+import { LayoutUpdatePreview } from './LayoutUpdatePreview'
import { SqlEditorTabsPreview } from './SqlEditorTabs'
import { TableEditorTabsPreview } from './TableEditorTabs'
export const FEATURE_PREVIEWS = [
+ {
+ key: LOCAL_STORAGE_KEYS.UI_NEW_LAYOUT_PREVIEW,
+ name: 'Layout Update for Organizations',
+ content: <LayoutUpdatePreview />,
+ discussionsUrl: 'https://github.com/orgs/supabase/discussions/18038',
+ isNew: false,
+ },
{
key: LOCAL_STORAGE_KEYS.UI_PREVIEW_INLINE_EDITOR,
name: 'Inline SQL Editor',
@@ -114,3 +122,8 @@ export const useIsSQLEditorTabsEnabled = () => {
const { flags } = useFeaturePreviewContext()
return flags[LOCAL_STORAGE_KEYS.UI_SQL_EDITOR_TABS]
}
+
+export const useNewLayout = (): boolean => {
+ const { flags } = useFeaturePreviewContext()
+ return flags[LOCAL_STORAGE_KEYS.UI_NEW_LAYOUT_PREVIEW]
+}
diff --git a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx
index 2555c74562f..c0de9d4034f 100644
--- a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx
+++ b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx
@@ -19,6 +19,7 @@ const FeaturePreviewModal = () => {
const featurePreviewContext = useFeaturePreviewContext()
const { mutate: sendEvent } = useSendEventMutation()
+ const enableNewLayoutPreview = useFlag('newLayoutPreview')
const isFeaturePreviewTabsTableEditorFlag = useFlag('featurePreviewTabsTableEditor')
const isFeaturePreviewTabsSqlEditorFlag = useFlag('featurePreviewSqlEditorTabs')
@@ -58,6 +59,8 @@ const FeaturePreviewModal = () => {
return isFeaturePreviewTabsTableEditorFlag
case LOCAL_STORAGE_KEYS.UI_SQL_EDITOR_TABS:
return isFeaturePreviewTabsSqlEditorFlag
+ case LOCAL_STORAGE_KEYS.UI_NEW_LAYOUT_PREVIEW:
+ return enableNewLayoutPreview
default:
return true
}
diff --git a/apps/studio/components/interfaces/App/FeaturePreview/LayoutUpdatePreview.tsx b/apps/studio/components/interfaces/App/FeaturePreview/LayoutUpdatePreview.tsx
new file mode 100644
index 00000000000..0c143b92305
--- /dev/null
+++ b/apps/studio/components/interfaces/App/FeaturePreview/LayoutUpdatePreview.tsx
@@ -0,0 +1,39 @@
+import { BASE_PATH } from 'lib/constants'
+import Image from 'next/image'
+
+export const LayoutUpdatePreview = () => {
+ return (
+ <div className="space-y-2">
+ <Image
+ src={`${BASE_PATH}/img/previews/layout-update.png`}
+ width={1860}
+ height={970}
+ alt="api-docs-side-panel-preview"
+ className="rounded border"
+ />
+ <p className="text-foreground-light text-sm">
+ The layout out of the dashboard is now scoped to the organization that you're currently on
+ instead of all organizations that you are a member of, in hopes to provide a clearer
+ navigation to your organization settings.
+ </p>
+ <p className="text-foreground-light text-sm">
+ This feature preview only updates the layout for the home page, organization settings pages,
+ and account pages. Layout for project pages will not have any changes.
+ </p>
+ <div className="space-y-2 !mt-4">
+ <p className="text-sm">Enabling this preview will:</p>
+ <ul className="list-disc pl-6 text-sm text-foreground-light space-y-1">
+ <li>
+ Display only the projects from the organization you are currently viewing on the home
+ page
+ </li>
+ <li>Update homepage sidebar links to go directly to the settings for the organization</li>
+ <li>
+ Access to account preferences, access tokens, security settings, and audit logs are
+ available via the user dropdown in the top navigation bar
+ </li>
+ </ul>
+ </div>
+ </div>
+ )
+}
diff --git a/apps/studio/components/interfaces/App/RouteValidationWrapper.tsx b/apps/studio/components/interfaces/App/RouteValidationWrapper.tsx
index 561aae84fbf..1447e364f4d 100644
--- a/apps/studio/components/interfaces/App/RouteValidationWrapper.tsx
+++ b/apps/studio/components/interfaces/App/RouteValidationWrapper.tsx
@@ -7,6 +7,7 @@ import { useOrganizationsQuery } from 'data/organizations/organizations-query'
import { useProjectsQuery } from 'data/projects/projects-query'
import useLatest from 'hooks/misc/useLatest'
import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage'
+import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
import { DEFAULT_HOME, IS_PLATFORM, LOCAL_STORAGE_KEYS } from 'lib/constants'
import { useAppStateSnapshot } from 'state/app-state'
@@ -18,11 +19,18 @@ const RouteValidationWrapper = ({ children }: PropsWithChildren<{}>) => {
const isLoggedIn = useIsLoggedIn()
const snap = useAppStateSnapshot()
+ const organization = useSelectedOrganization()
+
const [dashboardHistory, _, { isSuccess: isSuccessStorage }] = useLocalStorageQuery(
LOCAL_STORAGE_KEYS.DASHBOARD_HISTORY(ref ?? ''),
{ editor: undefined, sql: undefined }
)
+ const [__, setLastVisitedOrganization] = useLocalStorageQuery(
+ LOCAL_STORAGE_KEYS.LAST_VISITED_ORGANIZATION,
+ ''
+ )
+
/**
* Array of urls/routes that should be ignored
*/
@@ -108,8 +116,14 @@ const RouteValidationWrapper = ({ children }: PropsWithChildren<{}>) => {
snap.setDashboardHistory(ref, 'editor', dashboardHistory.editor)
snap.setDashboardHistory(ref, 'sql', dashboardHistory.sql)
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [isSuccessStorage, ref])
+ useEffect(() => {
+ if (organization) setLastVisitedOrganization(organization.slug)
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [organization])
+
return <>{children}</>
}
diff --git a/apps/studio/components/interfaces/Auth/EmailTemplates/EmailTemplates.tsx b/apps/studio/components/interfaces/Auth/EmailTemplates/EmailTemplates.tsx
index 0fb588f4594..e37f390953d 100644
--- a/apps/studio/components/interfaces/Auth/EmailTemplates/EmailTemplates.tsx
+++ b/apps/studio/components/interfaces/Auth/EmailTemplates/EmailTemplates.tsx
@@ -1,19 +1,8 @@
import { useParams } from 'common'
import AlertError from 'components/ui/AlertError'
-import { DocsButton } from 'components/ui/DocsButton'
-import { FormHeader } from 'components/ui/Forms/FormHeader'
-import { FormPanel } from 'components/ui/Forms/FormPanel'
import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useAuthConfigQuery } from 'data/auth/auth-config-query'
-import {
- Card,
- CardContent,
- ScrollArea,
- Tabs_Shadcn_,
- TabsContent_Shadcn_,
- TabsList_Shadcn_,
- TabsTrigger_Shadcn_,
-} from 'ui'
+import { Card, Tabs_Shadcn_, TabsContent_Shadcn_, TabsList_Shadcn_, TabsTrigger_Shadcn_ } from 'ui'
import { TEMPLATES_SCHEMAS } from '../AuthTemplatesValidation'
import EmailRateLimitsAlert from '../EmailRateLimitsAlert'
import TemplateEditor from './TemplateEditor'
@@ -55,7 +44,10 @@ const EmailTemplates = () => {
<TabsList_Shadcn_ className="pt-2 px-6 gap-5 mb-0 overflow-x-scroll no-scrollbar mb-4">
{TEMPLATES_SCHEMAS.map((template) => {
return (
- <TabsTrigger_Shadcn_ value={template.title.trim().replace(/\s+/g, '-')}>
+ <TabsTrigger_Shadcn_
+ key={`${template.id}`}
+ value={template.title.trim().replace(/\s+/g, '-')}
+ >
{template.title}
</TabsTrigger_Shadcn_>
)
@@ -64,7 +56,7 @@ const EmailTemplates = () => {
{TEMPLATES_SCHEMAS.map((template) => {
const panelId = template.title.trim().replace(/\s+/g, '-')
return (
- <TabsContent_Shadcn_ value={panelId} key={panelId} className="mt-0">
+ <TabsContent_Shadcn_ key={panelId} value={panelId} className="mt-0">
<TemplateEditor key={template.title} template={template} />
</TabsContent_Shadcn_>
)
diff --git a/apps/studio/components/interfaces/DiskManagement/fields/StorageTypeField.tsx b/apps/studio/components/interfaces/DiskManagement/fields/StorageTypeField.tsx
index db30e3931ce..266fd36f46b 100644
--- a/apps/studio/components/interfaces/DiskManagement/fields/StorageTypeField.tsx
+++ b/apps/studio/components/interfaces/DiskManagement/fields/StorageTypeField.tsx
@@ -101,7 +101,7 @@ export function StorageTypeField({ form, disableInput }: StorageTypeFieldProps)
{DISK_TYPE_OPTIONS.map((item) => {
const disableIo2 = item.type === 'io2' && !isIo2Supported
return (
- <Tooltip>
+ <Tooltip key={item.type}>
<TooltipTrigger asChild>
<SelectItem_Shadcn_
key={item.type}
diff --git a/apps/studio/components/interfaces/Docs/GeneralContent.tsx b/apps/studio/components/interfaces/Docs/GeneralContent.tsx
index 4be9860fdcb..da63210858d 100644
--- a/apps/studio/components/interfaces/Docs/GeneralContent.tsx
+++ b/apps/studio/components/interfaces/Docs/GeneralContent.tsx
@@ -1,8 +1,8 @@
-import Introduction from 'components/interfaces/Docs/Introduction'
import Authentication from 'components/interfaces/Docs/Authentication'
+import Introduction from 'components/interfaces/Docs/Introduction'
+import RpcIntroduction from 'components/interfaces/Docs/Pages/Rpc/Introduction'
import TablesIntroduction from 'components/interfaces/Docs/Pages/Tables/Introduction'
import UserManagement from 'components/interfaces/Docs/Pages/UserManagement'
-import RpcIntroduction from 'components/interfaces/Docs/Pages/Rpc/Introduction'
interface GeneralContentProps {
page?: string
@@ -15,7 +15,7 @@ const GeneralContent = ({ selectedLang, page, showApiKey }: GeneralContentProps)
if (selected == 'intro' || selected == null) return <Introduction selectedLang={selectedLang} />
if (selected == 'auth')
return <Authentication selectedLang={selectedLang} showApiKey={showApiKey} />
- if (selected == 'users')
+ if (selected == 'users-management')
return <UserManagement selectedLang={selectedLang} showApiKey={showApiKey} />
if (selected == 'tables-intro') return <TablesIntroduction selectedLang={selectedLang} />
if (selected == 'rpc-intro') return <RpcIntroduction />
diff --git a/apps/studio/components/interfaces/Home/ProjectList/ProjectList.tsx b/apps/studio/components/interfaces/Home/ProjectList/ProjectList.tsx
index d3411fa11d6..fb343f02dc8 100644
--- a/apps/studio/components/interfaces/Home/ProjectList/ProjectList.tsx
+++ b/apps/studio/components/interfaces/Home/ProjectList/ProjectList.tsx
@@ -2,6 +2,7 @@ import { groupBy } from 'lodash'
import { Plus } from 'lucide-react'
import Link from 'next/link'
+import { useParams } from 'common'
import AlertError from 'components/ui/AlertError'
import NoSearchResults from 'components/ui/NoSearchResults'
import PartnerIcon from 'components/ui/PartnerIcon'
@@ -16,7 +17,7 @@ import { usePermissionsQuery } from 'data/permissions/permissions-query'
import { ProjectInfo, useProjectsQuery } from 'data/projects/projects-query'
import { ResourceWarning, useResourceWarningsQuery } from 'data/usage/resource-warnings-query'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
-import { IS_PLATFORM, PROJECT_STATUS } from 'lib/constants'
+import { IS_PLATFORM } from 'lib/constants'
import { makeRandomString } from 'lib/helpers'
import type { Organization, ResponseError } from 'types'
import { Button, cn } from 'ui'
@@ -25,17 +26,21 @@ import ShimmeringCard from './ShimmeringCard'
export interface ProjectListProps {
rewriteHref?: (projectRef: string) => string
- search: string
+ search?: string
filterStatus?: string[]
resetFilterStatus?: () => void
+ // if true, only show projects for the current organization
+ filterToSlug?: boolean
}
const ProjectList = ({
- search,
+ search = '',
rewriteHref,
filterStatus,
resetFilterStatus,
+ filterToSlug,
}: ProjectListProps) => {
+ const { slug } = useParams()
const { data: organizations, isLoading, isSuccess } = useOrganizationsQuery()
const {
data: allProjects,
@@ -109,9 +114,13 @@ const ProjectList = ({
)
}
+ const filteredOrganizations = filterToSlug
+ ? organizations?.filter((org) => org.slug === slug)
+ : organizations
+
return isSuccess && organizations && organizations?.length > 0 ? (
<>
- {organizations?.map((organization) => {
+ {filteredOrganizations?.map((organization) => {
return (
<OrganizationProjects
key={organization.slug}
@@ -130,6 +139,7 @@ const ProjectList = ({
projectsError={projectsError}
search={search}
filterStatus={filterStatus}
+ filterToSlug={filterToSlug}
/>
)
})}
@@ -155,6 +165,7 @@ type OrganizationProjectsProps = {
rewriteHref?: (projectRef: string) => string
search: string
filterStatus?: string[]
+ filterToSlug?: boolean
}
const OrganizationProjects = ({
@@ -171,6 +182,7 @@ const OrganizationProjects = ({
rewriteHref,
search,
filterStatus,
+ filterToSlug,
}: OrganizationProjectsProps) => {
const isEmpty = !projects || projects.length === 0
const sortedProjects = [...(projects || [])].sort((a, b) => a.name.localeCompare(b.name))
@@ -222,41 +234,42 @@ const OrganizationProjects = ({
return (
<div className="space-y-3" key={organization.slug}>
- <div className="flex space-x-4 items-center">
- <div className="flex items-center gap-2">
- <h4 className="text-lg flex items-center">{organization.name}</h4>{' '}
- <PartnerIcon organization={organization} />
- </div>
- {!!overdueInvoices.length && (
- <div>
- <Button asChild type="danger">
- <Link href={`/org/${organization.slug}/invoices`}>Outstanding Invoices</Link>
- </Button>
- </div>
- )}
- {organization?.restriction_status === 'grace_period' && (
- <div>
- <Button asChild type="warning">
- <Link href={`/org/${organization.slug}/billing`}>Grace Period</Link>
- </Button>
+ {!filterToSlug && (
+ <div className="flex space-x-4 items-center">
+ <div className="flex items-center gap-2">
+ <h4 className="text-lg flex items-center">{organization.name}</h4>{' '}
+ <PartnerIcon organization={organization} />
</div>
- )}
- {organization?.restriction_status === 'grace_period_over' && (
- <div>
- <Button asChild type="warning">
- <Link href={`/org/${organization.slug}/billing`}>Grace Period Over</Link>
- </Button>
- </div>
- )}
- {organization?.restriction_status === 'restricted' && (
- <div>
- <Button asChild type="danger">
- <Link href={`/org/${organization.slug}/billing`}>Services Restricted</Link>
- </Button>
- </div>
- )}
- </div>
-
+ {!!overdueInvoices.length && (
+ <div>
+ <Button asChild type="danger">
+ <Link href={`/org/${organization.slug}/invoices`}>Outstanding Invoices</Link>
+ </Button>
+ </div>
+ )}
+ {organization?.restriction_status === 'grace_period' && (
+ <div>
+ <Button asChild type="warning">
+ <Link href={`/org/${organization.slug}/billing`}>Grace Period</Link>
+ </Button>
+ </div>
+ )}
+ {organization?.restriction_status === 'grace_period_over' && (
+ <div>
+ <Button asChild type="warning">
+ <Link href={`/org/${organization.slug}/billing`}>Grace Period Over</Link>
+ </Button>
+ </div>
+ )}
+ {organization?.restriction_status === 'restricted' && (
+ <div>
+ <Button asChild type="danger">
+ <Link href={`/org/${organization.slug}/billing`}>Services Restricted</Link>
+ </Button>
+ </div>
+ )}
+ </div>
+ )}
{isLoadingPermissions || isLoadingProjects ? (
<ul className="mx-auto grid grid-cols-1 gap-4 sm:grid-cols-1 md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3">
<ShimmeringCard />
diff --git a/apps/studio/components/interfaces/HomePageActions.tsx b/apps/studio/components/interfaces/HomePageActions.tsx
index 05a35690955..1394e95d383 100644
--- a/apps/studio/components/interfaces/HomePageActions.tsx
+++ b/apps/studio/components/interfaces/HomePageActions.tsx
@@ -2,9 +2,11 @@ import { Filter, Search } from 'lucide-react'
import Link from 'next/link'
import { useRouter } from 'next/router'
-import { IS_PLATFORM } from 'common'
+import { IS_PLATFORM, useParams } from 'common'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import { useOrganizationsQuery } from 'data/organizations/organizations-query'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
+import { useFlag } from 'hooks/ui/useFlag'
import { PROJECT_STATUS } from 'lib/constants'
import { EMPTY_ARR } from 'lib/void'
import {
@@ -14,6 +16,7 @@ import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
+ DropdownMenuSeparator,
DropdownMenuTrigger,
Input,
Label_Shadcn_,
@@ -21,10 +24,9 @@ import {
PopoverTrigger_Shadcn_,
Popover_Shadcn_,
} from 'ui'
-import { useFlag } from 'hooks/ui/useFlag'
interface HomePageActionsProps {
- organizations: { name: string; slug: string }[]
+ organizations?: { name: string; slug: string }[]
search: string
filterStatus: string[]
setSearch: (value: string) => void
@@ -38,8 +40,12 @@ const HomePageActions = ({
setSearch,
setFilterStatus,
}: HomePageActionsProps) => {
+ const newLayoutPreview = useNewLayout()
+
const router = useRouter()
+ const { slug } = useParams()
+ const projectCreationEnabled = useIsFeatureEnabled('projects:create')
const organizationCreationEnabled = useIsFeatureEnabled('organizations:create')
const { isSuccess: orgsLoaded } = useOrganizationsQuery()
@@ -48,30 +54,39 @@ const HomePageActions = ({
return (
<div className="flex flex-col gap-2 md:gap-3 md:flex-row">
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <Button type="primary">
- <span>New project</span>
- </Button>
- </DropdownMenuTrigger>
- <DropdownMenuContent side="bottom" align="center">
- <>
- <DropdownMenuLabel>Choose organization</DropdownMenuLabel>
- {organizations
- .sort((a, b) => a.name.localeCompare(b.name))
- .map((x) => (
- <DropdownMenuItem
- key={x.slug}
- onClick={() => router.push(`${newProjectPath}/${x.slug}`)}
- >
- {x.name}
- </DropdownMenuItem>
- ))}
- </>
- </DropdownMenuContent>
- </DropdownMenu>
+ {newLayoutPreview ? (
+ projectCreationEnabled ? (
+ <Link href={`/new/${slug}`}>
+ <Button type="primary">New project</Button>
+ </Link>
+ ) : null
+ ) : (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button type="primary">
+ <span>New project</span>
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent side="bottom" align="start">
+ <>
+ <DropdownMenuLabel>Choose organization</DropdownMenuLabel>
+ <DropdownMenuSeparator />
+ {organizations
+ .sort((a, b) => a.name.localeCompare(b.name))
+ .map((x) => (
+ <DropdownMenuItem
+ key={x.slug}
+ onClick={() => router.push(`${newProjectPath}/${x.slug}`)}
+ >
+ {x.name}
+ </DropdownMenuItem>
+ ))}
+ </>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ )}
- {IS_PLATFORM && organizationCreationEnabled && orgsLoaded && (
+ {IS_PLATFORM && organizationCreationEnabled && orgsLoaded && !newLayoutPreview && (
<Button type="default" asChild>
<Link href="/new" className="flex items-center gap-2">
New organization
diff --git a/apps/studio/components/interfaces/Integrations/Vault/Keys/EncryptionKeysManagement.tsx b/apps/studio/components/interfaces/Integrations/Vault/Keys/EncryptionKeysManagement.tsx
index 3c4ed829a41..ef7a070cb40 100644
--- a/apps/studio/components/interfaces/Integrations/Vault/Keys/EncryptionKeysManagement.tsx
+++ b/apps/studio/components/interfaces/Integrations/Vault/Keys/EncryptionKeysManagement.tsx
@@ -233,7 +233,6 @@ export const EncryptionKeysManagement = () => {
</div>
<Modal
- closable
size="medium"
alignFooter="right"
visible={selectedKeyToRemove !== undefined}
@@ -264,7 +263,6 @@ export const EncryptionKeysManagement = () => {
</Modal>
<Modal
- closable
hideFooter
size="medium"
visible={showAddKeyModal}
diff --git a/apps/studio/components/interfaces/Integrations/Vault/Secrets/AddNewSecretModal.tsx b/apps/studio/components/interfaces/Integrations/Vault/Secrets/AddNewSecretModal.tsx
index 8b5be3d6a66..4b005caa51e 100644
--- a/apps/studio/components/interfaces/Integrations/Vault/Secrets/AddNewSecretModal.tsx
+++ b/apps/studio/components/interfaces/Integrations/Vault/Secrets/AddNewSecretModal.tsx
@@ -85,14 +85,7 @@ const AddNewSecretModal = ({ visible, onClose }: AddNewSecretModalProps) => {
}
return (
- <Modal
- closable
- hideFooter
- size="medium"
- visible={visible}
- onCancel={onClose}
- header="Add new secret"
- >
+ <Modal hideFooter size="medium" visible={visible} onCancel={onClose} header="Add new secret">
{isLoading ? (
<Modal.Content>
<GenericSkeletonLoader />
diff --git a/apps/studio/components/interfaces/Integrations/Vault/Secrets/DeleteSecretModal.tsx b/apps/studio/components/interfaces/Integrations/Vault/Secrets/DeleteSecretModal.tsx
index 3ccc854b739..45643cb06ec 100644
--- a/apps/studio/components/interfaces/Integrations/Vault/Secrets/DeleteSecretModal.tsx
+++ b/apps/studio/components/interfaces/Integrations/Vault/Secrets/DeleteSecretModal.tsx
@@ -35,7 +35,6 @@ const DeleteSecretModal = ({ selectedSecret, onClose }: DeleteSecretModalProps)
return (
<Modal
- closable
size="small"
alignFooter="right"
visible={selectedSecret !== undefined}
diff --git a/apps/studio/components/interfaces/Integrations/VercelGithub/IntegrationPanels.tsx b/apps/studio/components/interfaces/Integrations/VercelGithub/IntegrationPanels.tsx
index 8af175bded5..2d350fad2af 100644
--- a/apps/studio/components/interfaces/Integrations/VercelGithub/IntegrationPanels.tsx
+++ b/apps/studio/components/interfaces/Integrations/VercelGithub/IntegrationPanels.tsx
@@ -1,6 +1,6 @@
import dayjs from 'dayjs'
import Image from 'next/legacy/image'
-import React from 'react'
+import { forwardRef, HTMLAttributes, ReactNode, RefAttributes } from 'react'
import { Markdown } from 'components/interfaces/Markdown'
import { ButtonTooltip } from 'components/ui/ButtonTooltip'
@@ -18,7 +18,7 @@ import { Badge, Button, cn } from 'ui'
const ICON_STROKE_WIDTH = 2
const ICON_SIZE = 14
-export interface IntegrationInstallationProps extends React.RefAttributes<HTMLLIElement> {
+export interface IntegrationInstallationProps extends RefAttributes<HTMLLIElement> {
title: string
integration: Integration
disabled?: boolean
@@ -72,7 +72,7 @@ const Avatar = ({ src }: { src: string | undefined }) => {
)
}
-const IntegrationInstallation = React.forwardRef<HTMLLIElement, IntegrationInstallationProps>(
+const IntegrationInstallation = forwardRef<HTMLLIElement, IntegrationInstallationProps>(
({ integration, disabled, ...props }, ref) => {
const IntegrationIconBlock = () => {
return (
@@ -136,15 +136,15 @@ const IntegrationInstallation = React.forwardRef<HTMLLIElement, IntegrationInsta
}
)
-export interface IntegrationConnectionProps extends React.HTMLAttributes<HTMLLIElement> {
+export interface IntegrationConnectionProps extends HTMLAttributes<HTMLLIElement> {
connection: IntegrationProjectConnection
type: Integration['integration']['name']
- actions?: React.ReactNode
+ actions?: ReactNode
showNode?: boolean
orientation?: 'horizontal' | 'vertical'
}
-const IntegrationConnection = React.forwardRef<HTMLLIElement, IntegrationConnectionProps>(
+const IntegrationConnection = forwardRef<HTMLLIElement, IntegrationConnectionProps>(
(
{ connection, type, actions, showNode = true, orientation = 'horizontal', className, ...props },
ref
@@ -234,7 +234,7 @@ const IntegrationConnection = React.forwardRef<HTMLLIElement, IntegrationConnect
}
)
-const IntegrationConnectionOption = React.forwardRef<HTMLLIElement, IntegrationConnectionProps>(
+const IntegrationConnectionOption = forwardRef<HTMLLIElement, IntegrationConnectionProps>(
({ connection, type, ...props }, ref) => {
const { data: projects } = useProjectsQuery()
const project = projects?.find((project) => project.ref === connection.supabase_project_ref)
@@ -268,11 +268,10 @@ const IntegrationConnectionOption = React.forwardRef<HTMLLIElement, IntegrationC
}
)
-const EmptyIntegrationConnection = React.forwardRef<
+const EmptyIntegrationConnection = forwardRef<
HTMLDivElement,
- React.HTMLAttributes<HTMLDivElement> & {
+ HTMLAttributes<HTMLDivElement> & {
showNode?: boolean
- orgSlug?: string
onClick: () => void
disabled?: boolean
}
@@ -322,7 +321,7 @@ interface IntegrationConnectionHeader extends React.HTMLAttributes<HTMLDivElemen
showNode?: boolean
}
-const IntegrationConnectionHeader = React.forwardRef<HTMLDivElement, IntegrationConnectionHeader>(
+const IntegrationConnectionHeader = forwardRef<HTMLDivElement, IntegrationConnectionHeader>(
({ className, markdown = '', showNode = true, ...props }, ref) => {
return (
<div
diff --git a/apps/studio/components/interfaces/Organization/GeneralSettings/DeleteOrganizationButton.tsx b/apps/studio/components/interfaces/Organization/GeneralSettings/DeleteOrganizationButton.tsx
index 6c409622f6d..66942babb99 100644
--- a/apps/studio/components/interfaces/Organization/GeneralSettings/DeleteOrganizationButton.tsx
+++ b/apps/studio/components/interfaces/Organization/GeneralSettings/DeleteOrganizationButton.tsx
@@ -52,7 +52,6 @@ const DeleteOrganizationButton = () => {
</Button>
</div>
<Modal
- closable
hideFooter
size="small"
visible={isOpen}
diff --git a/apps/studio/components/interfaces/Organization/HeaderBanner.tsx b/apps/studio/components/interfaces/Organization/HeaderBanner.tsx
new file mode 100644
index 00000000000..0754cc2c2c5
--- /dev/null
+++ b/apps/studio/components/interfaces/Organization/HeaderBanner.tsx
@@ -0,0 +1,114 @@
+import { AnimatePresence, motion } from 'framer-motion'
+import Link from 'next/link'
+
+import { useOrganizationRestrictions } from 'hooks/misc/useOrganizationRestrictions'
+import { cn, CriticalIcon, WarningIcon } from 'ui'
+
+const bannerMotionProps = {
+ initial: { height: 0, opacity: 0 },
+ animate: { height: 'auto', opacity: 1 },
+ exit: { height: 0, opacity: 0 },
+ transition: { duration: 0.2, delay: 0.5 },
+} as const
+
+export const OrganizationResourceBanner = () => {
+ const { warnings } = useOrganizationRestrictions()
+
+ return (
+ <AnimatePresence initial={false}>
+ {warnings.map((warning, i) => (
+ <HeaderBanner key={i} {...warning} />
+ ))}
+ </AnimatePresence>
+ )
+}
+
+export const HeaderBanner = ({
+ type,
+ title,
+ message,
+ link,
+}: {
+ type: 'danger' | 'warning' | 'note' | 'incident'
+ title: string
+ message: string
+ link?: string
+}) => {
+ const bannerStyles =
+ type === 'danger'
+ ? 'bg-destructive-300 dark:bg-destructive-200'
+ : type === 'incident'
+ ? 'bg-brand-400'
+ : 'bg-warning-300 dark:bg-warning-200'
+ const Icon = type === 'danger' ? CriticalIcon : WarningIcon
+
+ return (
+ <motion.div
+ {...bannerMotionProps}
+ className={cn(
+ `relative ${bannerStyles} border-b border-muted py-1 flex items-center justify-center flex-shrink-0 px-0`,
+ type === 'incident' && 'hover:bg-brand-300',
+ 'flex-shrink-0'
+ )}
+ >
+ <div className={cn('items-center flex flex-row gap-3')}>
+ <div className="absolute inset-y-0 left-0 right-0 overflow-hidden z-0">
+ <div
+ className="absolute inset-0 opacity-[0.8%]"
+ style={{
+ background: `repeating-linear-gradient(
+ 45deg,
+ currentColor,
+ currentColor 10px,
+ transparent 10px,
+ transparent 20px
+ )`,
+ maskImage: 'linear-gradient(to top, black, transparent)',
+ WebkitMaskImage: 'linear-gradient(to top, black, transparent)',
+ }}
+ />
+ </div>
+ <Icon
+ className={cn('z-[1] flex-shrink-0', type === 'incident' && 'bg-brand text-brand-200')}
+ />
+ <div className="flex flex-col md:flex-row gap-0 md:gap-3">
+ <span
+ className={cn(
+ 'text-xs sm:text-sm z-[1]',
+ type === 'danger'
+ ? 'text-destructive'
+ : type === 'incident'
+ ? 'text-foreground'
+ : 'text-warning'
+ )}
+ >
+ {title}
+ </span>
+ <span
+ className={cn(
+ 'text-xs sm:text-sm z-[1] opacity-75',
+ type === 'danger'
+ ? 'text-destructive'
+ : type === 'incident'
+ ? 'text-foreground'
+ : 'text-warning'
+ )}
+ >
+ {message}
+ </span>
+ </div>
+ {link && (
+ <button
+ className={cn(
+ 'lg:block hidden',
+ 'text-foreground-lighter text-sm z-[1] m-0',
+ type === 'danger' ? 'text-destructive' : 'text-warning'
+ )}
+ >
+ <Link href={link}>View Details</Link>
+ </button>
+ )}
+ </div>
+ </motion.div>
+ )
+}
diff --git a/apps/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsx b/apps/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsx
index 22786201d4f..951978507eb 100644
--- a/apps/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsx
+++ b/apps/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsx
@@ -2,15 +2,18 @@ import { PermissionAction } from '@supabase/shared-types/out/constants'
import { useCallback } from 'react'
import { toast } from 'sonner'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import { EmptyIntegrationConnection } from 'components/interfaces/Integrations/VercelGithub/IntegrationPanels'
import { Markdown } from 'components/interfaces/Markdown'
import VercelSection from 'components/interfaces/Settings/Integrations/VercelIntegration/VercelSection'
import {
ScaffoldContainer,
+ ScaffoldContainerLegacy,
ScaffoldDivider,
ScaffoldSection,
ScaffoldSectionContent,
ScaffoldSectionDetail,
+ ScaffoldTitle,
} from 'components/layouts/Scaffold'
import NoPermission from 'components/ui/NoPermission'
import { useGitHubAuthorizationQuery } from 'data/integrations/github-authorization-query'
@@ -40,6 +43,8 @@ const IntegrationImageHandler = ({ title }: { title: 'vercel' | 'github' }) => {
}
const IntegrationSettings = () => {
+ const newLayoutPreview = useNewLayout()
+
const org = useSelectedOrganization()
const canReadGithubConnection = useCheckPermissions(
@@ -150,7 +155,6 @@ The GitHub app will watch for changes in your repository such as file changes, b
<EmptyIntegrationConnection
onClick={onAddGitHubConnection}
- orgSlug={org?.slug}
showNode={false}
disabled={!canCreateGitHubConnection}
>
@@ -173,6 +177,11 @@ The GitHub app will watch for changes in your repository such as file changes, b
return (
<>
+ {newLayoutPreview && (
+ <ScaffoldContainerLegacy>
+ <ScaffoldTitle>Integrations</ScaffoldTitle>
+ </ScaffoldContainerLegacy>
+ )}
<GitHubSection />
<ScaffoldDivider />
<VercelSection isProjectScoped={false} />
diff --git a/apps/studio/components/interfaces/Organization/TeamSettings/TeamSettings.tsx b/apps/studio/components/interfaces/Organization/TeamSettings/TeamSettings.tsx
index 8bd83885993..181a93cca60 100644
--- a/apps/studio/components/interfaces/Organization/TeamSettings/TeamSettings.tsx
+++ b/apps/studio/components/interfaces/Organization/TeamSettings/TeamSettings.tsx
@@ -3,12 +3,14 @@ import { useState } from 'react'
import { toast } from 'sonner'
import { useParams } from 'common'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import {
ScaffoldActionsContainer,
ScaffoldActionsGroup,
ScaffoldContainerLegacy,
ScaffoldFilterAndContent,
ScaffoldSectionContent,
+ ScaffoldTitle,
} from 'components/layouts/Scaffold'
import { ButtonTooltip } from 'components/ui/ButtonTooltip'
import { useOrganizationRolesV2Query } from 'data/organization-members/organization-roles-query'
@@ -19,13 +21,15 @@ import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
import { BASE_PATH } from 'lib/constants'
import { useProfile } from 'lib/profile'
-import { Input } from 'ui'
+import { Input } from 'ui-patterns/DataInputs/Input'
import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
import { InviteMemberButton } from './InviteMemberButton'
import MembersView from './MembersView'
import { hasMultipleOwners, useGetRolesManagementPermissions } from './TeamSettings.utils'
const TeamSettings = () => {
+ const newLayoutPreview = useNewLayout()
+
const {
organizationMembersCreate: organizationMembersCreationEnabled,
organizationMembersDelete: organizationMembersDeletionEnabled,
@@ -78,13 +82,13 @@ const TeamSettings = () => {
return (
<>
<ScaffoldContainerLegacy>
+ {newLayoutPreview && <ScaffoldTitle>Team</ScaffoldTitle>}
<ScaffoldFilterAndContent>
<ScaffoldActionsContainer className="w-full flex-col md:flex-row gap-2 justify-between">
<Input
+ size="tiny"
autoComplete="off"
icon={<Search size={12} />}
- size="small"
- className="w-full md:w-auto"
value={searchString}
onChange={(e: any) => setSearchString(e.target.value)}
name="email"
diff --git a/apps/studio/components/interfaces/Organization/Usage/Usage.tsx b/apps/studio/components/interfaces/Organization/Usage/Usage.tsx
index f7cddfb465f..4dda95390e2 100644
--- a/apps/studio/components/interfaces/Organization/Usage/Usage.tsx
+++ b/apps/studio/components/interfaces/Organization/Usage/Usage.tsx
@@ -3,9 +3,14 @@ import dayjs from 'dayjs'
import { useEffect, useMemo, useState } from 'react'
import { useParams } from 'common'
-import { ScaffoldContainer, ScaffoldContainerLegacy } from 'components/layouts/Scaffold'
+import {
+ ScaffoldContainer,
+ ScaffoldContainerLegacy,
+ ScaffoldTitle,
+} from 'components/layouts/Scaffold'
+
import AlertError from 'components/ui/AlertError'
-import { DateRangePicker } from 'components/ui/DateRangePicker'
+import DateRangePicker from 'components/ui/DateRangePicker'
import { DocsButton } from 'components/ui/DocsButton'
import NoPermission from 'components/ui/NoPermission'
import ShimmeringLoader from 'components/ui/ShimmeringLoader'
@@ -13,6 +18,7 @@ import { useProjectsQuery } from 'data/projects/projects-query'
import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query'
import { useCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import { TIME_PERIODS_BILLING, TIME_PERIODS_REPORTS } from 'lib/constants/metrics'
import { cn, Listbox } from 'ui'
import { Admonition } from 'ui-patterns'
@@ -24,6 +30,8 @@ import SizeAndCounts from './SizeAndCounts'
import TotalUsage from './TotalUsage'
const Usage = () => {
+ const newLayoutPreview = useNewLayout()
+
const { slug, projectRef } = useParams()
const [dateRange, setDateRange] = useState<any>()
const [selectedProjectRef, setSelectedProjectRef] = useState<string>()
@@ -112,72 +120,79 @@ const Usage = () => {
return (
<>
- <ScaffoldContainer className="sticky top-0 border-b bg-studio z-10 overflow-hidden">
- <div className="py-4 flex flex-col md:flex-row md:items-center gap-4">
- {isLoadingSubscription && <ShimmeringLoader className="w-[250px]" />}
-
- {isErrorSubscription && (
- <AlertError
- className="w-full"
- subject="Failed to retrieve usage data"
- error={subscriptionError}
- />
- )}
-
- {isSuccessSubscription && (
- <>
- <DateRangePicker
- onChange={setDateRange}
- value={TIME_PERIODS_BILLING[0].key}
- options={[...TIME_PERIODS_BILLING, ...TIME_PERIODS_REPORTS]}
- loading={isLoadingSubscription}
- currentBillingPeriodStart={subscription?.current_period_start}
- currentBillingPeriodEnd={subscription?.current_period_end}
+ {newLayoutPreview && (
+ <ScaffoldContainerLegacy>
+ <ScaffoldTitle>Usage</ScaffoldTitle>
+ </ScaffoldContainerLegacy>
+ )}
+ <div className="sticky top-0 border-b bg-studio z-[1] overflow-hidden ">
+ <ScaffoldContainer className="">
+ <div className="py-4 flex items-center space-x-4">
+ {isLoadingSubscription && <ShimmeringLoader className="w-[250px]" />}
+
+ {isErrorSubscription && (
+ <AlertError
+ className="w-full"
+ subject="Failed to retrieve usage data"
+ error={subscriptionError}
/>
+ )}
+
+ {isSuccessSubscription && (
+ <>
+ <DateRangePicker
+ onChange={setDateRange}
+ value={TIME_PERIODS_BILLING[0].key}
+ options={[...TIME_PERIODS_BILLING, ...TIME_PERIODS_REPORTS]}
+ loading={isLoadingSubscription}
+ currentBillingPeriodStart={subscription?.current_period_start}
+ currentBillingPeriodEnd={subscription?.current_period_end}
+ />
- <Listbox
- size="tiny"
- name="schema"
- className="w-full md:w-[180px]"
- value={selectedProjectRef}
- onChange={(value: any) => {
- if (value === 'all-projects') setSelectedProjectRef(undefined)
- else setSelectedProjectRef(value)
- }}
- >
- <Listbox.Option
- key="all-projects"
- id="all-projects"
- label="All projects"
- value="all-projects"
+ <Listbox
+ size="tiny"
+ name="schema"
+ className="w-[180px]"
+ value={selectedProjectRef}
+ onChange={(value: any) => {
+ if (value === 'all-projects') setSelectedProjectRef(undefined)
+ else setSelectedProjectRef(value)
+ }}
>
- All projects
- </Listbox.Option>
- {orgProjects?.map((project) => (
<Listbox.Option
- key={project.ref}
- id={project.ref}
- value={project.ref}
- label={project.name}
+ key="all-projects"
+ id="all-projects"
+ label="All projects"
+ value="all-projects"
>
- {project.name}
+ All projects
</Listbox.Option>
- ))}
- </Listbox>
-
- <div className="flex flex-col xl:flex-row xl:gap-3">
- <p className={cn('text-sm transition', isLoadingSubscription && 'opacity-50')}>
- Organization is on the {subscription.plan.name} plan
- </p>
- <p className="text-sm text-foreground-light">
- {billingCycleStart.format('DD MMM YYYY')} -{' '}
- {billingCycleEnd.format('DD MMM YYYY')}
- </p>
- </div>
- </>
- )}
- </div>
- </ScaffoldContainer>
+ {orgProjects?.map((project) => (
+ <Listbox.Option
+ key={project.ref}
+ id={project.ref}
+ value={project.ref}
+ label={project.name}
+ >
+ {project.name}
+ </Listbox.Option>
+ ))}
+ </Listbox>
+
+ <div className="flex flex-col xl:flex-row xl:gap-3">
+ <p className={cn('text-sm transition', isLoadingSubscription && 'opacity-50')}>
+ Organization is on the {subscription.plan.name} plan
+ </p>
+ <p className="text-sm text-foreground-light">
+ {billingCycleStart.format('DD MMM YYYY')} -{' '}
+ {billingCycleEnd.format('DD MMM YYYY')}
+ </p>
+ </div>
+ </>
+ )}
+ </div>
+ </ScaffoldContainer>
+ </div>
{selectedProjectRef ? (
<ScaffoldContainer className="mt-5">
diff --git a/apps/studio/components/interfaces/Organization/restriction.constants.ts b/apps/studio/components/interfaces/Organization/restriction.constants.ts
new file mode 100644
index 00000000000..5efa8882d27
--- /dev/null
+++ b/apps/studio/components/interfaces/Organization/restriction.constants.ts
@@ -0,0 +1,24 @@
+// Add at the top of the file, with other imports
+export const RESTRICTION_MESSAGES = {
+ GRACE_PERIOD: {
+ title: 'Organization plan has exceeded its quota',
+ message: (date: string) => `You are given a grace period until ${date}`,
+ },
+ GRACE_PERIOD_OVER: {
+ title: 'Grace period is over',
+ message: 'Your Projects will not be able to serve requests when you used up your quota.',
+ },
+ RESTRICTED: {
+ title: 'Services Restricted',
+ message:
+ 'Your Projects are unable to serve any requests as your Organization plan has used up its quota.',
+ },
+ OVERDUE_INVOICES: {
+ title: 'Outstanding Invoices',
+ message: 'Please pay invoices to avoid service disruption.',
+ },
+ OVERDUE_INVOICES_FROM_OTHER_ORGS: {
+ title: 'Outstanding Invoices in other Organization',
+ message: 'Please pay invoices for other Organization to avoid service disruption.',
+ },
+} as const
diff --git a/apps/studio/components/interfaces/ProjectAPIDocs/ProjectAPIDocs.Commands.tsx b/apps/studio/components/interfaces/ProjectAPIDocs/ProjectAPIDocs.Commands.tsx
index b64290d75ce..ab6ecb60372 100644
--- a/apps/studio/components/interfaces/ProjectAPIDocs/ProjectAPIDocs.Commands.tsx
+++ b/apps/studio/components/interfaces/ProjectAPIDocs/ProjectAPIDocs.Commands.tsx
@@ -25,7 +25,7 @@ export function useApiDocsGotoCommands(options?: CommandOptions) {
{
id: 'nav-api-user-management',
name: 'User Management Docs',
- route: `/project/${ref}/api?page=users`,
+ route: `/project/${ref}/api?page=users-management`,
defaultHidden: true,
},
{
diff --git a/apps/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx b/apps/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx
index 31724e689f6..da1ac4be568 100644
--- a/apps/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx
+++ b/apps/studio/components/interfaces/Reports/renderers/ApiRenderers.tsx
@@ -175,7 +175,7 @@ export const TopApiRoutesRenderer = (
body={
<>
{props.data.map((datum, index) => (
- <Fragment key={datum.method + datum.path + (datum.search || '')}>
+ <Fragment key={index + datum.method + datum.path + (datum.search || '')}>
<Table.tr
className={[
'p-0 transition transform cursor-pointer hover:bg-surface-200',
diff --git a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/AllowAllModal.tsx b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/AllowAllModal.tsx
index 6ab6806e6e6..cd58fddf142 100644
--- a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/AllowAllModal.tsx
+++ b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/AllowAllModal.tsx
@@ -26,7 +26,6 @@ const AllowAllModal = ({ visible, onClose }: AllowAllModalProps) => {
return (
<Modal
- closable
hideFooter
size="small"
visible={visible}
diff --git a/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GithubSection.tsx b/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GithubSection.tsx
index 81d8460c339..ee471a1b3dd 100644
--- a/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GithubSection.tsx
+++ b/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GithubSection.tsx
@@ -167,7 +167,6 @@ const GitHubSection = () => {
) : (
<EmptyIntegrationConnection
onClick={onAddGitHubConnection}
- orgSlug={org?.slug}
showNode={false}
disabled={isBranch || !canCreateGitHubConnection}
>
diff --git a/apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelSection.tsx b/apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelSection.tsx
index c1cd262bba6..599729956ce 100644
--- a/apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelSection.tsx
+++ b/apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelSection.tsx
@@ -31,11 +31,9 @@ import { useSelectedProject } from 'hooks/misc/useSelectedProject'
import { pluralize } from 'lib/helpers'
import { getIntegrationConfigurationUrl } from 'lib/integration-utils'
import { useSidePanelsStateSnapshot } from 'state/side-panels'
-import { Alert_Shadcn_, AlertTitle_Shadcn_, Button, cn } from 'ui'
+import { Button, cn } from 'ui'
import { IntegrationImageHandler } from '../IntegrationsSettings'
import VercelIntegrationConnectionForm from './VercelIntegrationConnectionForm'
-import PartnerManagedResource from 'components/ui/PartnerManagedResource'
-import PartnerIcon from 'components/ui/PartnerIcon'
const VercelSection = ({ isProjectScoped }: { isProjectScoped: boolean }) => {
const project = useSelectedProject()
@@ -216,7 +214,6 @@ You can change the scope of the access for Supabase by configuring
/>
)}
<EmptyIntegrationConnection
- orgSlug={org?.slug}
disabled={isBranch || !canCreateVercelConnection}
onClick={() => onAddVercelConnection(vercelIntegration.id)}
>
diff --git a/apps/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx b/apps/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx
index c5cc8b3f471..be49b0132bb 100644
--- a/apps/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx
+++ b/apps/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx
@@ -16,7 +16,6 @@ const UpgradePrompt: React.FC<Props> = ({ show, setShowUpgradePrompt }) => {
<Modal
hideFooter
visible={show}
- closable
size="medium"
header="Log retention"
onCancel={() => setShowUpgradePrompt(false)}
diff --git a/apps/studio/components/interfaces/Sidebar.tsx b/apps/studio/components/interfaces/Sidebar.tsx
index 38f729f83b6..4e9e176a5d7 100644
--- a/apps/studio/components/interfaces/Sidebar.tsx
+++ b/apps/studio/components/interfaces/Sidebar.tsx
@@ -1,6 +1,6 @@
import { AnimatePresence, motion, MotionProps } from 'framer-motion'
import { isUndefined } from 'lodash'
-import { Blocks, Boxes, ChartArea, Command, PanelLeftDashed, Settings, Users } from 'lucide-react'
+import { Blocks, Boxes, ChartArea, PanelLeftDashed, Settings, Users } from 'lucide-react'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { ComponentProps, ComponentPropsWithoutRef, FC, useEffect } from 'react'
@@ -20,7 +20,7 @@ import { useLints } from 'hooks/misc/useLints'
import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage'
import { useFlag } from 'hooks/ui/useFlag'
import { Home } from 'icons'
-import { IS_PLATFORM, LOCAL_STORAGE_KEYS } from 'lib/constants'
+import { LOCAL_STORAGE_KEYS } from 'lib/constants'
import { useAppStateSnapshot } from 'state/app-state'
import {
Button,
@@ -46,9 +46,8 @@ import { useSetCommandMenuOpen } from 'ui-patterns'
import {
useIsAPIDocsSidePanelEnabled,
useIsSQLEditorTabsEnabled,
+ useNewLayout,
} from './App/FeaturePreview/FeaturePreviewContext'
-import { ThemeDropdown } from './ThemeDropdown'
-import { UserDropdown } from './UserDropdown'
export const ICON_SIZE = 32
export const ICON_STROKE_WIDTH = 1.5
@@ -64,6 +63,10 @@ const SidebarMotion = motion(SidebarPrimitive) as FC<
export interface SidebarProps extends ComponentPropsWithoutRef<typeof SidebarPrimitive> {}
export const Sidebar = ({ className, ...props }: SidebarProps) => {
+ const newLayoutPreview = useNewLayout()
+
+ const { ref } = useParams()
+
const { setOpen } = useSidebar()
const hideSideBar = useHideSidebar()
@@ -78,6 +81,10 @@ export const Sidebar = ({ className, ...props }: SidebarProps) => {
if (sidebarBehaviour === 'closed') setOpen(false)
}, [sidebarBehaviour, setOpen])
+ if (!newLayoutPreview && !ref) {
+ return null
+ }
+
return (
<>
<AnimatePresence>
@@ -134,6 +141,7 @@ export const Sidebar = ({ className, ...props }: SidebarProps) => {
export function SidebarContent({ footer }: { footer?: React.ReactNode }) {
const setCommandMenuOpen = useSetCommandMenuOpen()
+ const { ref: projectRef } = useParams()
// temporary logic to show settings route in sidebar footer
// this will be removed once we move to an updated org/project nav
@@ -147,13 +155,11 @@ export function SidebarContent({ footer }: { footer?: React.ReactNode }) {
<>
<AnimatePresence mode="wait">
<SidebarContentPrimitive>
- {/* Org sidebar to be added in with project/org nav */}
- {/* {project ? ( */}
- <motion.div key="project-links">
- <ProjectLinks />
- </motion.div>
- {/* Org sidebar to be added in with project/org nav */}
- {/* ) : (
+ {projectRef ? (
+ <motion.div key="project-links">
+ <ProjectLinks />
+ </motion.div>
+ ) : (
<motion.div
key="org-links"
initial={{ opacity: 0, y: -20 }}
@@ -163,37 +169,10 @@ export function SidebarContent({ footer }: { footer?: React.ReactNode }) {
>
<OrganizationLinks />
</motion.div>
- )} */}
+ )}
</SidebarContentPrimitive>
</AnimatePresence>
<SidebarFooter>
- <SidebarMenu className="group-data-[state=expanded]:p-0">
- <SidebarGroup className="p-0 gap-0.5">
- {settingsRoutes.map((route) => (
- <SideBarNavLink
- key={`settings-routes-${route.key}`}
- route={route}
- active={activeRoute === route.key}
- />
- ))}
- </SidebarGroup>
- <SidebarGroup className="p-0">
- <SideBarNavLink
- key="cmdk"
- route={{
- key: 'cmdk',
- label: 'Command Menu',
- icon: <Command size={ICON_SIZE} strokeWidth={ICON_STROKE_WIDTH} />,
- }}
- onClick={() => setCommandMenuOpen(true)}
- />
- </SidebarGroup>
- </SidebarMenu>
- <SidebarMenu className="group-data-[state=expanded]:p-0">
- <SidebarGroup className="p-0">
- {IS_PLATFORM ? <UserDropdown /> : <ThemeDropdown />}
- </SidebarGroup>
- </SidebarMenu>
<SidebarGroup className="p-0">{footer}</SidebarGroup>
</SidebarFooter>
</>
@@ -295,9 +274,7 @@ function ProjectLinks() {
realtime: realtimeEnabled,
})
const otherRoutes = generateOtherRoutes(ref, project)
-
- /* Settings routes to be added in with project/org nav */
- // const settingsRoutes = generateSettingsRoutes(ref, project)
+ const settingsRoutes = generateSettingsRoutes(ref, project)
return (
<SidebarMenu>
@@ -382,20 +359,19 @@ function ProjectLinks() {
})}
</SidebarGroup>
{/* Settings routes to be added in with project/org nav */}
- {/* <SidebarGroup className="gap-0.5">
- {settingsRoutes.map((route, i) => (
- <SideBarNavLink
- key={`settings-routes-${i}`}
- route={route}
- active={activeRoute === route.key}
- />
- ))}
- </SidebarGroup> */}
+ <SidebarGroup className="gap-0.5">
+ {settingsRoutes.map((route, i) => (
+ <SideBarNavLink
+ key={`settings-routes-${i}`}
+ route={route}
+ active={activeRoute === route.key}
+ />
+ ))}
+ </SidebarGroup>
</SidebarMenu>
)
}
-// Not currently used, will be part of org layout PR
const OrganizationLinks = () => {
const router = useRouter()
const { slug } = useParams()
@@ -429,7 +405,7 @@ const OrganizationLinks = () => {
},
{
label: 'Organization settings',
- href: `/org/${slug}/settings/general`,
+ href: `/org/${slug}/general`,
key: 'settings',
icon: <Settings size={ICON_SIZE} strokeWidth={ICON_STROKE_WIDTH} />,
},
@@ -440,7 +416,19 @@ const OrganizationLinks = () => {
<SidebarGroup className="gap-0.5">
{navMenuItems.map((item, i) => (
<SideBarNavLink
- active={i === 0 ? activeRoute === undefined : activeRoute === item.key}
+ key={item.key}
+ active={
+ i === 0
+ ? activeRoute === undefined
+ : item.key === 'settings'
+ ? router.pathname.includes('/general') ||
+ router.pathname.includes('/billing') ||
+ router.pathname.includes('/invoices') ||
+ router.pathname.includes('/apps') ||
+ router.pathname.includes('/audit') ||
+ router.pathname.includes('/documents')
+ : activeRoute === item.key
+ }
route={{
label: item.label,
link: item.href,
diff --git a/apps/studio/components/interfaces/SignIn/LastSignInWrapper.tsx b/apps/studio/components/interfaces/SignIn/LastSignInWrapper.tsx
index 65dbd32eb76..a5d22f4f968 100644
--- a/apps/studio/components/interfaces/SignIn/LastSignInWrapper.tsx
+++ b/apps/studio/components/interfaces/SignIn/LastSignInWrapper.tsx
@@ -15,10 +15,10 @@ export function LastSignInWrapper({
return (
<div className="flex items-center relative">
{lastSignIn === type && (
- <Tooltip>
+ <Tooltip key={`last-sign-in-${type}`}>
<TooltipTrigger asChild className="absolute -right-8">
<div className="p-2 flex">
- <span className="w-2.5 h-2.5 bg-brand rounded-full animate-pulse" />
+ <div className="w-2.5 h-2.5 bg-brand rounded-full animate-pulse" />
</div>
</TooltipTrigger>
<TooltipContent>Last used</TooltipContent>
diff --git a/apps/studio/components/interfaces/UserDropdown.tsx b/apps/studio/components/interfaces/UserDropdown.tsx
index 4d4e2b72f1a..2d215a0e0bc 100644
--- a/apps/studio/components/interfaces/UserDropdown.tsx
+++ b/apps/studio/components/interfaces/UserDropdown.tsx
@@ -1,7 +1,7 @@
-import { Command, FlaskConical, Palette, Settings } from 'lucide-react'
+import { Command, FlaskConical, Settings } from 'lucide-react'
import { useTheme } from 'next-themes'
import Link from 'next/link'
-import { useRouter } from 'next/navigation'
+import { useRouter } from 'next/router'
import { ProfileImage } from 'components/ui/ProfileImage'
import { useSignOut } from 'lib/auth'
@@ -9,6 +9,7 @@ import { IS_PLATFORM } from 'lib/constants'
import { useProfile } from 'lib/profile'
import { useAppStateSnapshot } from 'state/app-state'
import {
+ Button,
DropdownMenu,
DropdownMenuContent,
DropdownMenuGroup,
@@ -18,52 +19,35 @@ import {
DropdownMenuRadioItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
- SidebarMenuButton,
Theme,
- cn,
singleThemes,
} from 'ui'
import { useSetCommandMenuOpen } from 'ui-patterns/CommandMenu'
-import { ICON_SIZE, ICON_STROKE_WIDTH, SideBarNavLink } from './Sidebar'
-export const UserDropdown = () => {
+export function UserDropdown() {
+ const router = useRouter()
+ const signOut = useSignOut()
const { profile } = useProfile()
- const appStateSnapshot = useAppStateSnapshot()
const { theme, setTheme } = useTheme()
- const signOut = useSignOut()
- const router = useRouter()
-
+ const appStateSnapshot = useAppStateSnapshot()
const setCommandMenuOpen = useSetCommandMenuOpen()
+
return (
<DropdownMenu>
- <DropdownMenuTrigger asChild>
- <SidebarMenuButton
- className={cn(
- 'text-sm',
- 'group-data-[state=expanded]:h-10',
- 'p-0.5 group-data-[state=expanded]:pr-2 group-data-[state=expanded]:pl-1'
- )}
- size={'default'}
- hasIcon={false}
- asChild
- isActive={false}
+ <DropdownMenuTrigger className="border flex-shrink-0 px-3" asChild>
+ <Button
+ type="default"
+ className="[&>span]:flex px-0 py-0 rounded-full overflow-hidden h-8 w-8"
>
- <button>
- <div className="aspect-square h-7 w-7 rounded-md border flex-shrink-0">
- <ProfileImage
- alt={profile?.username}
- src={profile?.profileImageUrl}
- className="w-7 h-7 rounded-md"
- />
- </div>
- <span className="flex flex-col gap-0">
- {profile?.username}
- <span className="text-foreground-lighter text-xs">{profile?.primary_email}</span>
- </span>
- </button>
- </SidebarMenuButton>
+ <ProfileImage
+ alt={profile?.username}
+ src={profile?.profileImageUrl}
+ className="w-8 h-8 rounded-md"
+ />
+ </Button>
</DropdownMenuTrigger>
- <DropdownMenuContent side="top" align="start">
+
+ <DropdownMenuContent side="bottom" align="end">
{IS_PLATFORM && (
<>
<div className="px-2 py-1 flex flex-col gap-0 text-sm">
@@ -89,7 +73,14 @@ export const UserDropdown = () => {
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuItem className="flex gap-2" asChild>
- <Link href="/account/me">
+ <Link
+ href="/account/me"
+ onClick={() => {
+ if (router.pathname !== '/account/me') {
+ appStateSnapshot.setLastRouteBeforeVisitingAccountPage(router.asPath)
+ }
+ }}
+ >
<Settings size={14} strokeWidth={1.5} className="text-foreground-lighter" />
Account preferences
</Link>
diff --git a/apps/studio/components/layouts/AccountLayout/AccountLayout.tsx b/apps/studio/components/layouts/AccountLayout/AccountLayout.tsx
index 6cdd109bdf0..48a13aaa48c 100644
--- a/apps/studio/components/layouts/AccountLayout/AccountLayout.tsx
+++ b/apps/studio/components/layouts/AccountLayout/AccountLayout.tsx
@@ -1,39 +1,45 @@
+import { ArrowLeft } from 'lucide-react'
import Head from 'next/head'
+import Link from 'next/link'
import { useRouter } from 'next/router'
import { PropsWithChildren, useEffect } from 'react'
-import { AppBannerWrapper } from 'components/interfaces/App'
-import PartnerIcon from 'components/ui/PartnerIcon'
-import { useOrganizationsQuery } from 'data/organizations/organizations-query'
-import { useSendResetMutation } from 'data/telemetry/send-reset-mutation'
-import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import { withAuth } from 'hooks/misc/withAuth'
-import { useSignOut } from 'lib/auth'
import { IS_PLATFORM } from 'lib/constants'
-import type { SidebarSection } from './AccountLayout.types'
-import WithSidebar from './WithSidebar'
+import { useAppStateSnapshot } from 'state/app-state'
+import { cn, NavMenu, NavMenuItem } from 'ui'
+import {
+ MAX_WIDTH_CLASSES,
+ PADDING_CLASSES,
+ ScaffoldContainerLegacy,
+ ScaffoldTitle,
+} from '../Scaffold'
export interface AccountLayoutProps {
title: string
- breadcrumbs: {
- key: string
- label: string
- }[]
}
-const AccountLayout = ({ children, title, breadcrumbs }: PropsWithChildren<AccountLayoutProps>) => {
+const AccountLayout = ({ children, title }: PropsWithChildren<AccountLayoutProps>) => {
+ const newLayoutPreview = useNewLayout()
+
const router = useRouter()
- const { data: organizations } = useOrganizationsQuery()
- const selectedOrganization = useSelectedOrganization()
+ const appSnap = useAppStateSnapshot()
- const { mutateAsync: sendReset } = useSendResetMutation()
+ const accountLinks = [
+ {
+ label: 'Account Settings',
+ href: `/account/me`,
+ keys: [`/account/me`, `/account/tokens`, `/account/security`],
+ },
+ {
+ label: 'Audit Logs',
+ href: `/account/audit`,
+ key: `/account/audit`,
+ },
+ ]
- const signOut = useSignOut()
- const onClickLogout = async () => {
- await sendReset()
- await signOut()
- await router.push('/sign-in')
- }
+ const currentPath = router.pathname
useEffect(() => {
if (!IS_PLATFORM) {
@@ -41,108 +47,9 @@ const AccountLayout = ({ children, title, breadcrumbs }: PropsWithChildren<Accou
}
}, [router])
- const organizationsLinks = (organizations ?? [])
- .map((organization) => ({
- isActive:
- router.pathname.startsWith('/org/') && selectedOrganization?.slug === organization.slug,
- label: organization.name,
- href: `/org/${organization.slug}/general`,
- key: organization.slug,
- icon: <PartnerIcon organization={organization} />,
- }))
- .sort((a, b) => a.label.localeCompare(b.label))
-
- const sectionsWithHeaders: SidebarSection[] = [
- {
- heading: 'Projects',
- key: 'projects',
- links: [
- {
- isActive: router.pathname === '/projects',
- label: 'All projects',
- href: '/projects',
- key: 'all-projects-item',
- },
- ],
- },
- ...(IS_PLATFORM && organizationsLinks?.length > 0
- ? [
- {
- heading: 'Organizations',
- key: 'organizations',
- links: organizationsLinks,
- },
- ]
- : []),
- ...(IS_PLATFORM
- ? [
- {
- heading: 'Account',
- key: 'account',
- links: [
- {
- isActive: router.pathname === `/account/me`,
- label: 'Preferences',
- href: `/account/me`,
- key: `/account/me`,
- },
- {
- isActive: router.pathname === `/account/tokens`,
- label: 'Access Tokens',
- href: `/account/tokens`,
- key: `/account/tokens`,
- },
-
- {
- isActive: router.pathname === `/account/security`,
- label: 'Security',
- href: `/account/security`,
- key: `/account/security`,
- },
- {
- isActive: router.pathname === `/account/audit`,
- label: 'Audit Logs',
- href: `/account/audit`,
- key: `/account/audit`,
- },
- ],
- },
- ]
- : []),
- {
- heading: 'Documentation',
- key: 'documentation',
- links: [
- {
- key: 'ext-guides',
- label: 'Guides',
- href: 'https://supabase.com/docs',
- isExternal: true,
- },
- {
- key: 'ext-guides',
- label: 'API Reference',
- href: 'https://supabase.com/docs/guides/api',
- isExternal: true,
- },
- ],
- },
- ...(IS_PLATFORM
- ? [
- {
- key: 'logout-link',
- links: [
- {
- key: `logout`,
- label: 'Log out',
- href: undefined,
- onClick: onClickLogout,
- },
- ],
- },
- ]
- : []),
- ]
+ if (!newLayoutPreview) {
+ return children
+ }
return (
<>
@@ -151,10 +58,32 @@ const AccountLayout = ({ children, title, breadcrumbs }: PropsWithChildren<Accou
<meta name="description" content="Supabase Studio" />
</Head>
<div className="flex flex-col h-screen w-screen">
- <AppBannerWrapper />
- <WithSidebar title={title} breadcrumbs={breadcrumbs} sections={sectionsWithHeaders}>
- {children}
- </WithSidebar>
+ <ScaffoldContainerLegacy>
+ <Link
+ href={appSnap.lastRouteBeforeVisitingAccountPage ?? '/'}
+ className="flex text-xs flex-row gap-2 items-center text-foreground-lighter focus-visible:text-foreground hover:text-foreground"
+ >
+ <ArrowLeft strokeWidth={1.5} size={14} />
+ Back to dashboard
+ </Link>
+ <ScaffoldTitle>Account settings</ScaffoldTitle>
+ </ScaffoldContainerLegacy>
+ <div className="border-b">
+ <NavMenu
+ className={cn(PADDING_CLASSES, MAX_WIDTH_CLASSES, 'border-none')}
+ aria-label="Organization menu navigation"
+ >
+ {accountLinks.map((item, i) => (
+ <NavMenuItem
+ key={`${item.key}-${i}`}
+ active={(item.key === currentPath || item.keys?.includes(currentPath)) ?? false}
+ >
+ <Link href={item.href}>{item.label}</Link>
+ </NavMenuItem>
+ ))}
+ </NavMenu>
+ </div>
+ {children}
</div>
</>
)
diff --git a/apps/studio/components/layouts/AccountLayout/AccountSettingsLayout.tsx b/apps/studio/components/layouts/AccountLayout/AccountSettingsLayout.tsx
new file mode 100644
index 00000000000..a54e32b9597
--- /dev/null
+++ b/apps/studio/components/layouts/AccountLayout/AccountSettingsLayout.tsx
@@ -0,0 +1,67 @@
+import Link from 'next/link'
+import { usePathname } from 'next/navigation'
+import { PropsWithChildren } from 'react'
+
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
+import { Button, cn } from 'ui'
+import { ScaffoldContainerLegacy } from '../Scaffold'
+
+const AccountSettingsLayout = ({ children }: PropsWithChildren) => {
+ const newLayoutPreview = useNewLayout()
+
+ const pathname = usePathname()
+ const links = [
+ {
+ isActive: pathname === `/account/me`,
+ label: 'Preferences',
+ href: `/account/me`,
+ key: `/account/me`,
+ },
+ {
+ isActive: pathname === `/account/tokens`,
+ label: 'Access Tokens',
+ href: `/account/tokens`,
+ key: `/account/tokens`,
+ },
+
+ {
+ isActive: pathname === `/account/security`,
+ label: 'Security',
+ href: `/account/security`,
+ key: `/account/security`,
+ },
+ ]
+
+ if (!newLayoutPreview) {
+ return children
+ }
+
+ return (
+ <ScaffoldContainerLegacy className="flex flex-row py-8 gap-20">
+ <nav className="py-0">
+ <ul className="flex flex-col gap-1">
+ {links.map((link, i) => (
+ <li key={`${link.key}-${i}`}>
+ <Link href={link.href}>
+ <Button
+ type={link.isActive ? 'default' : 'text'}
+ className={cn(
+ 'border-0',
+ link.isActive
+ ? 'bg-selection text-foreground'
+ : 'hover:bg-overlay-hover text-foreground-lighter'
+ )}
+ >
+ {link.label}
+ </Button>
+ </Link>
+ </li>
+ ))}
+ </ul>
+ </nav>
+ <div className="flex-1 flex-grow">{children}</div>
+ </ScaffoldContainerLegacy>
+ )
+}
+
+export default AccountSettingsLayout
diff --git a/apps/studio/components/layouts/AccountLayout/WithSidebar.tsx b/apps/studio/components/layouts/AccountLayout/WithSidebar.tsx
index 7fcab1d904b..2ea219a9d50 100644
--- a/apps/studio/components/layouts/AccountLayout/WithSidebar.tsx
+++ b/apps/studio/components/layouts/AccountLayout/WithSidebar.tsx
@@ -47,7 +47,6 @@ const WithSidebar = ({
/>
)}
<div className="flex flex-1 flex-col">
- <LayoutHeader breadcrumbs={breadcrumbs} />
<div className="flex-1 flex-grow overflow-y-auto">{children}</div>
</div>
<MobileSheetNav open={mobileMenuOpen} onOpenChange={setMobileMenuOpen}>
diff --git a/apps/studio/components/layouts/AppLayout/AssistantButton.tsx b/apps/studio/components/layouts/AppLayout/AssistantButton.tsx
index 0fbdbd187dd..01200e3a42c 100644
--- a/apps/studio/components/layouts/AppLayout/AssistantButton.tsx
+++ b/apps/studio/components/layouts/AppLayout/AssistantButton.tsx
@@ -11,13 +11,13 @@ const AssistantButton = () => {
type="text"
size="tiny"
id="assistant-trigger"
- className="h-full w-full rounded-none"
+ className="w-[24px] h-[24px] flex items-center justify-center p-0"
onClick={() => {
snap.toggleAssistant()
setEditorPanel({ open: false })
}}
>
- <AiIconAnimation allowHoverEffect size={20} />
+ <AiIconAnimation allowHoverEffect size={16} />
</Button>
)
}
diff --git a/apps/studio/components/layouts/AppLayout/BranchDropdown.tsx b/apps/studio/components/layouts/AppLayout/BranchDropdown.tsx
index 79c3f64d9c9..9851c136350 100644
--- a/apps/studio/components/layouts/AppLayout/BranchDropdown.tsx
+++ b/apps/studio/components/layouts/AppLayout/BranchDropdown.tsx
@@ -4,6 +4,7 @@ import { useRouter } from 'next/router'
import { useState } from 'react'
import { useParams } from 'common'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import ShimmeringLoader from 'components/ui/ShimmeringLoader'
import { Branch, useBranchesQuery } from 'data/branches/branches-query'
import { useSelectedProject } from 'hooks/misc/useSelectedProject'
@@ -21,6 +22,7 @@ import {
PopoverTrigger_Shadcn_,
Popover_Shadcn_,
ScrollArea,
+ cn,
} from 'ui'
import { sanitizeRoute } from './ProjectDropdown'
@@ -61,11 +63,9 @@ const BranchLink = ({
)
}
-interface BranchDropdownProps {
- isNewNav?: boolean
-}
+const BranchDropdown = () => {
+ const newLayoutPreview = useNewLayout()
-const BranchDropdown = ({ isNewNav = false }: BranchDropdownProps) => {
const router = useRouter()
const { ref } = useParams()
const projectDetails = useSelectedProject()
@@ -101,19 +101,42 @@ const BranchDropdown = ({ isNewNav = false }: BranchDropdownProps) => {
)}
{isSuccess && branches.length > 0 && (
- <div className="flex items-center px-2">
+ <>
+ {newLayoutPreview && (
+ <Link
+ href={`/project/${ref}`}
+ className="flex items-center gap-2 flex-shrink-0 text-sm"
+ >
+ <span className="text-foreground max-w-32 lg:max-w-none truncate">
+ {selectedBranch?.name}
+ </span>
+ {selectedBranch?.is_default ? (
+ <Badge variant="warning">Production</Badge>
+ ) : (
+ <Badge variant="brand">Preview Branch</Badge>
+ )}
+ </Link>
+ )}
<Popover_Shadcn_ open={open} onOpenChange={setOpen} modal={false}>
<PopoverTrigger_Shadcn_ asChild>
- <Button type="text" className="pr-2" iconRight={<ChevronsUpDown />}>
- <div className="flex items-center space-x-2">
- <p className={isNewNav ? 'text-sm' : 'text-xs'}>{selectedBranch?.name}</p>
- {selectedBranch?.is_default ? (
- <Badge variant="warning">Production</Badge>
- ) : (
- <Badge variant="brand">Preview Branch</Badge>
- )}
- </div>
- </Button>
+ {newLayoutPreview ? (
+ <Button
+ type="text"
+ className={cn('px-0.25 [&_svg]:w-5 [&_svg]:h-5 ml-1')}
+ iconRight={<ChevronsUpDown strokeWidth={1.5} />}
+ />
+ ) : (
+ <Button type="text" className="pr-2" iconRight={<ChevronsUpDown />}>
+ <div className="flex items-center space-x-2">
+ <p className={'text-xs'}>{selectedBranch?.name}</p>
+ {selectedBranch?.is_default ? (
+ <Badge variant="warning">Production</Badge>
+ ) : (
+ <Badge variant="brand">Preview Branch</Badge>
+ )}
+ </div>
+ </Button>
+ )}
</PopoverTrigger_Shadcn_>
<PopoverContent_Shadcn_ className="p-0" side="bottom" align="start">
<Command_Shadcn_>
@@ -181,7 +204,7 @@ const BranchDropdown = ({ isNewNav = false }: BranchDropdownProps) => {
</Command_Shadcn_>
</PopoverContent_Shadcn_>
</Popover_Shadcn_>
- </div>
+ </>
)}
</>
)
diff --git a/apps/studio/components/layouts/AppLayout/ClockSkewBanner.tsx b/apps/studio/components/layouts/AppLayout/ClockSkewBanner.tsx
index 2cc9cc500a8..a1a05f2010e 100644
--- a/apps/studio/components/layouts/AppLayout/ClockSkewBanner.tsx
+++ b/apps/studio/components/layouts/AppLayout/ClockSkewBanner.tsx
@@ -41,14 +41,11 @@ export const ClockSkewBanner = () => {
if (!clockSkew) return null
return (
- <div
- style={{ height: '44px' }}
- className="flex items-center justify-center gap-x-4 bg-destructive-400 py-3 transition text-foreground box-border border-b border-default"
- >
+ <div className="flex items-center justify-center gap-x-4 bg-destructive-400 py-0.5 transition text-foreground box-border border-b border-default">
<p className="text-sm">
Your computer's clock appears to be inaccurate. This can cause issues with certain features.
</p>
- <Button asChild type="default">
+ <Button asChild type="text">
<a href="https://supabase.com/docs" target="_blank">
More information
</a>
diff --git a/apps/studio/components/layouts/AppLayout/EnableBranchingButton/EnableBranchingButton.tsx b/apps/studio/components/layouts/AppLayout/EnableBranchingButton/EnableBranchingButton.tsx
index f4f54c96bd4..32397e4aa16 100644
--- a/apps/studio/components/layouts/AppLayout/EnableBranchingButton/EnableBranchingButton.tsx
+++ b/apps/studio/components/layouts/AppLayout/EnableBranchingButton/EnableBranchingButton.tsx
@@ -22,9 +22,10 @@ const EnableBranchingButton = ({ isNewNav = false }: EnableBranchingButtonProps)
return (
<ButtonTooltip
disabled={isDisabled}
- type={isNewNav ? 'default' : 'text'}
+ type={'text'}
icon={<GitBranch strokeWidth={1.5} />}
onClick={() => snap.setShowEnableBranchingModal(true)}
+ className="bg-none hover:bg-none text-foreground-light hover:text-foreground [&_span]:w-full [&_span]:text-left "
tooltip={{
content: {
side: 'bottom',
diff --git a/apps/studio/components/layouts/AppLayout/EnableBranchingButton/GithubRepositorySelection.tsx b/apps/studio/components/layouts/AppLayout/EnableBranchingButton/GithubRepositorySelection.tsx
index 7ce3f0655b4..ca9ef90c9d7 100644
--- a/apps/studio/components/layouts/AppLayout/EnableBranchingButton/GithubRepositorySelection.tsx
+++ b/apps/studio/components/layouts/AppLayout/EnableBranchingButton/GithubRepositorySelection.tsx
@@ -110,11 +110,7 @@ const GithubRepositorySelection = ({
/>
</>
) : (
- <EmptyIntegrationConnection
- showNode={false}
- onClick={() => onSelectConnectRepo()}
- orgSlug={org?.slug}
- />
+ <EmptyIntegrationConnection showNode={false} onClick={() => onSelectConnectRepo()} />
)}
</div>
</Modal.Content>
diff --git a/apps/studio/components/layouts/AppLayout/IncidentBanner.tsx b/apps/studio/components/layouts/AppLayout/IncidentBanner.tsx
index d2fd5030540..f1bd095f398 100644
--- a/apps/studio/components/layouts/AppLayout/IncidentBanner.tsx
+++ b/apps/studio/components/layouts/AppLayout/IncidentBanner.tsx
@@ -1,15 +1,15 @@
-import { ExternalLink } from 'lucide-react'
import Link from 'next/link'
+import { HeaderBanner } from 'components/interfaces/Organization/HeaderBanner'
+
const IncidentBanner = () => {
return (
- <Link href="https://status.supabase.com" target="_blank" rel="noreferrer">
- <div className="flex cursor-pointer items-center justify-center space-x-2 bg-green-900 py-3 transition hover:bg-green-1000 text-foreground">
- <p className="text-sm font-medium">
- We are currently investigating a technical issue, follow status.supabase.com for updates
- </p>
- <ExternalLink size={16} strokeWidth={2} />
- </div>
+ <Link href="https://status.supabase.com" target="_blank" rel="noopener noreferrer">
+ <HeaderBanner
+ type="incident"
+ title="We are currently investigating a technical issue"
+ message="Follow status.supabase.com for updates"
+ />
</Link>
)
}
diff --git a/apps/studio/components/layouts/AppLayout/InlineEditorButton.tsx b/apps/studio/components/layouts/AppLayout/InlineEditorButton.tsx
index 10d3fbc0838..0242d0a3e09 100644
--- a/apps/studio/components/layouts/AppLayout/InlineEditorButton.tsx
+++ b/apps/studio/components/layouts/AppLayout/InlineEditorButton.tsx
@@ -12,7 +12,7 @@ const InlineEditorButton = () => {
type="text"
size="tiny"
id="editor-trigger"
- className="h-full w-full rounded-none text-foreground-light"
+ className="w-[24px] h-[24px] flex items-center justify-center p-0"
onClick={() => {
closeAssistant()
setEditorPanel({ open: !editorPanel.open })
diff --git a/apps/studio/components/layouts/AppLayout/NoticeBanner.tsx b/apps/studio/components/layouts/AppLayout/NoticeBanner.tsx
index 178d50b45d9..71ff2fabe3b 100644
--- a/apps/studio/components/layouts/AppLayout/NoticeBanner.tsx
+++ b/apps/studio/components/layouts/AppLayout/NoticeBanner.tsx
@@ -29,10 +29,7 @@ export const NoticeBanner = () => {
}
return (
- <div
- style={{ height: '44px' }}
- className="flex items-center justify-center gap-x-4 bg-surface-100 py-3 transition text-foreground box-border border-b border-default"
- >
+ <div className="flex items-center justify-center gap-x-4 bg py-0.5 border transition text-foreground border-default">
<p className="text-sm">
Supabase is deprecating Fly's Postgres offering managed by Supabase on April 11, 2025
</p>
diff --git a/apps/studio/components/layouts/AppLayout/OrganizationDropdown.tsx b/apps/studio/components/layouts/AppLayout/OrganizationDropdown.tsx
index 039c9ff5d81..6bc4bc229b7 100644
--- a/apps/studio/components/layouts/AppLayout/OrganizationDropdown.tsx
+++ b/apps/studio/components/layouts/AppLayout/OrganizationDropdown.tsx
@@ -1,8 +1,11 @@
-import { Check, ChevronsUpDown, Plus } from 'lucide-react'
+import { Boxes, Check, ChevronsUpDown, Plus } from 'lucide-react'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { useState } from 'react'
+import { useParams } from 'common'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
+import PartnerIcon from 'components/ui/PartnerIcon'
import ShimmeringLoader from 'components/ui/ShimmeringLoader'
import { useOrganizationsQuery } from 'data/organizations/organizations-query'
import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query'
@@ -22,15 +25,14 @@ import {
PopoverTrigger_Shadcn_,
Popover_Shadcn_,
ScrollArea,
+ cn,
} from 'ui'
-import PartnerIcon from 'components/ui/PartnerIcon'
-interface OrganizationDropdownProps {
- isNewNav?: boolean
-}
+const OrganizationDropdown = () => {
+ const newLayoutPreview = useNewLayout()
-const OrganizationDropdown = ({ isNewNav = false }: OrganizationDropdownProps) => {
const router = useRouter()
+ const { slug: routeSlug } = useParams()
const selectedOrganization = useSelectedOrganization()
const { data: organizations, isLoading: isLoadingOrganizations } = useOrganizationsQuery()
@@ -47,15 +49,32 @@ const OrganizationDropdown = ({ isNewNav = false }: OrganizationDropdownProps) =
}
return (
- <div className="flex items-center">
+ <>
+ {newLayoutPreview && (
+ <Link href={`/org/${slug}`} className="flex items-center gap-2 flex-shrink-0 text-sm">
+ <Boxes size={14} strokeWidth={1.5} className="text-foreground-lighter" />
+ <span className="text-foreground max-w-32 lg:max-w-none truncate hidden md:block">
+ {orgName}
+ </span>
+ {isSuccess && <Badge variant="default">{subscription?.plan.name}</Badge>}
+ </Link>
+ )}
<Popover_Shadcn_ open={open} onOpenChange={setOpen} modal={false}>
<PopoverTrigger_Shadcn_ asChild>
- <Button type="text" className="pr-2" iconRight={<ChevronsUpDown />}>
- <div className="flex items-center space-x-2">
- <p className={isNewNav ? 'text-sm' : 'text-xs'}>{orgName}</p>
- {isSuccess && <Badge variant="default">{subscription?.plan.name}</Badge>}
- </div>
- </Button>
+ {newLayoutPreview ? (
+ <Button
+ type="text"
+ className={cn('px-0.25 [&_svg]:w-5 [&_svg]:h-5 ml-1')}
+ iconRight={<ChevronsUpDown strokeWidth={1.5} />}
+ />
+ ) : (
+ <Button type="text" className="pr-2" iconRight={<ChevronsUpDown />}>
+ <div className="flex items-center space-x-2">
+ <p className={'text-xs'}>{orgName}</p>
+ {isSuccess && <Badge variant="default">{subscription?.plan.name}</Badge>}
+ </div>
+ </Button>
+ )}
</PopoverTrigger_Shadcn_>
<PopoverContent_Shadcn_ className="p-0" side="bottom" align="start">
<Command_Shadcn_>
@@ -65,11 +84,9 @@ const OrganizationDropdown = ({ isNewNav = false }: OrganizationDropdownProps) =
<CommandGroup_Shadcn_>
<ScrollArea className={(organizations || []).length > 7 ? 'h-[210px]' : ''}>
{organizations?.map((org) => {
- const href = router.pathname.includes('[slug]')
+ const href = !!routeSlug
? router.pathname.replace('[slug]', org.slug)
- : isNewNav
- ? `/org/${org.slug}`
- : `/org/${org.slug}/general`
+ : `/org/${org.slug}`
return (
<CommandItem_Shadcn_
key={org.slug}
@@ -93,6 +110,25 @@ const OrganizationDropdown = ({ isNewNav = false }: OrganizationDropdownProps) =
})}
</ScrollArea>
</CommandGroup_Shadcn_>
+ {newLayoutPreview && (
+ <>
+ <CommandSeparator_Shadcn_ />
+ <CommandGroup_Shadcn_>
+ <CommandItem_Shadcn_
+ className="cursor-pointer w-full"
+ onSelect={(e) => {
+ setOpen(false)
+ router.push(`/organizations`)
+ }}
+ onClick={() => setOpen(false)}
+ >
+ <Link href="/organizations" className="flex items-center gap-2 w-full">
+ <p>All Organizations</p>
+ </Link>
+ </CommandItem_Shadcn_>
+ </CommandGroup_Shadcn_>
+ </>
+ )}
{organizationCreationEnabled && (
<>
<CommandSeparator_Shadcn_ />
@@ -117,7 +153,7 @@ const OrganizationDropdown = ({ isNewNav = false }: OrganizationDropdownProps) =
</Command_Shadcn_>
</PopoverContent_Shadcn_>
</Popover_Shadcn_>
- </div>
+ </>
)
}
diff --git a/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx b/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx
index eed2f57e614..c93ae75429f 100644
--- a/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx
+++ b/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx
@@ -1,10 +1,11 @@
-import { Check, ChevronsUpDown, Plus } from 'lucide-react'
+import { Box, Check, ChevronsUpDown, Plus } from 'lucide-react'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { ParsedUrlQuery } from 'querystring'
import { useState } from 'react'
import { useParams } from 'common'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import ShimmeringLoader from 'components/ui/ShimmeringLoader'
import { ProjectInfo, useProjectsQuery } from 'data/projects/projects-query'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
@@ -25,6 +26,7 @@ import {
PopoverTrigger_Shadcn_,
Popover_Shadcn_,
ScrollArea,
+ cn,
} from 'ui'
// [Fran] the idea is to let users change projects without losing the current page,
@@ -90,11 +92,14 @@ interface ProjectDropdownProps {
isNewNav?: boolean
}
-const ProjectDropdown = ({ isNewNav = false }: ProjectDropdownProps) => {
+const ProjectDropdown = ({ isNewNav = true }: ProjectDropdownProps) => {
+ const newLayoutPreview = useNewLayout()
+
const router = useRouter()
const { ref } = useParams()
const projectDetails = useSelectedProject()
const selectedOrganization = useSelectedOrganization()
+ const project = useSelectedProject()
const { data: allProjects, isLoading: isLoadingProjects } = useProjectsQuery()
const projectCreationEnabled = useIsFeatureEnabled('projects:create')
@@ -115,56 +120,76 @@ const ProjectDropdown = ({ isNewNav = false }: ProjectDropdownProps) => {
}
return IS_PLATFORM ? (
- <Popover_Shadcn_ open={open} onOpenChange={setOpen} modal={false}>
- <PopoverTrigger_Shadcn_ asChild>
- <Button type="text" className="pr-2" iconRight={<ChevronsUpDown />}>
- <div className="flex items-center space-x-2">
- <p className={isNewNav ? 'text-sm' : 'text-xs'}>{selectedProject?.name}</p>
- </div>
- </Button>
- </PopoverTrigger_Shadcn_>
- <PopoverContent_Shadcn_ className="p-0" side="bottom" align="start">
- <Command_Shadcn_>
- <CommandInput_Shadcn_ placeholder="Find project..." />
- <CommandList_Shadcn_>
- <CommandEmpty_Shadcn_>No projects found</CommandEmpty_Shadcn_>
- <CommandGroup_Shadcn_>
- <ScrollArea className={(projects || []).length > 7 ? 'h-[210px]' : ''}>
- {projects?.map((project) => (
- <ProjectLink key={project.ref} project={project} setOpen={setOpen} />
- ))}
- </ScrollArea>
- </CommandGroup_Shadcn_>
- {projectCreationEnabled && (
- <>
- <CommandSeparator_Shadcn_ />
- <CommandGroup_Shadcn_>
- <CommandItem_Shadcn_
- className="cursor-pointer w-full"
- onSelect={() => {
- setOpen(false)
- router.push(`/new/${selectedOrganization?.slug}`)
- }}
- onClick={() => setOpen(false)}
- >
- <Link
- href={`/new/${selectedOrganization?.slug}`}
- onClick={() => {
+ <>
+ {newLayoutPreview && (
+ <Link
+ href={`/project/${project?.ref}`}
+ className="flex items-center gap-2 flex-shrink-0 text-sm"
+ >
+ <Box size={14} strokeWidth={1.5} className="text-foreground-lighter" />
+ <span className="text-foreground max-w-32 lg:max-w-none truncate">{project?.name}</span>
+ </Link>
+ )}
+ <Popover_Shadcn_ open={open} onOpenChange={setOpen} modal={false}>
+ <PopoverTrigger_Shadcn_ asChild>
+ {newLayoutPreview ? (
+ <Button
+ type="text"
+ size="tiny"
+ className={cn('px-0.25 [&_svg]:w-5 [&_svg]:h-5 ml-1')}
+ iconRight={<ChevronsUpDown strokeWidth={1.5} />}
+ />
+ ) : (
+ <Button type="text" className="pr-2" iconRight={<ChevronsUpDown />}>
+ <div className="flex items-center space-x-2">
+ <p className={isNewNav ? 'text-sm' : 'text-xs'}>{selectedProject?.name}</p>
+ </div>
+ </Button>
+ )}
+ </PopoverTrigger_Shadcn_>
+ <PopoverContent_Shadcn_ className="p-0" side="bottom" align="start">
+ <Command_Shadcn_>
+ <CommandInput_Shadcn_ placeholder="Find project..." />
+ <CommandList_Shadcn_>
+ <CommandEmpty_Shadcn_>No projects found</CommandEmpty_Shadcn_>
+ <CommandGroup_Shadcn_>
+ <ScrollArea className={(projects || []).length > 7 ? 'h-[210px]' : ''}>
+ {projects?.map((project) => (
+ <ProjectLink key={project.ref} project={project} setOpen={setOpen} />
+ ))}
+ </ScrollArea>
+ </CommandGroup_Shadcn_>
+ {projectCreationEnabled && (
+ <>
+ <CommandSeparator_Shadcn_ />
+ <CommandGroup_Shadcn_>
+ <CommandItem_Shadcn_
+ className="cursor-pointer w-full"
+ onSelect={() => {
setOpen(false)
+ router.push(`/new/${selectedOrganization?.slug}`)
}}
- className="w-full flex items-center gap-2"
+ onClick={() => setOpen(false)}
>
- <Plus size={14} strokeWidth={1.5} />
- <p>New project</p>
- </Link>
- </CommandItem_Shadcn_>
- </CommandGroup_Shadcn_>
- </>
- )}
- </CommandList_Shadcn_>
- </Command_Shadcn_>
- </PopoverContent_Shadcn_>
- </Popover_Shadcn_>
+ <Link
+ href={`/new/${selectedOrganization?.slug}`}
+ onClick={() => {
+ setOpen(false)
+ }}
+ className="w-full flex items-center gap-2"
+ >
+ <Plus size={14} strokeWidth={1.5} />
+ <p>New project</p>
+ </Link>
+ </CommandItem_Shadcn_>
+ </CommandGroup_Shadcn_>
+ </>
+ )}
+ </CommandList_Shadcn_>
+ </Command_Shadcn_>
+ </PopoverContent_Shadcn_>
+ </Popover_Shadcn_>
+ </>
) : (
<Button type="text">
<span className={isNewNav ? 'text-sm' : 'text-xs'}>{selectedProject?.name}</span>
diff --git a/apps/studio/components/layouts/AuthLayout/AuthEmailsLayout.tsx b/apps/studio/components/layouts/AuthLayout/AuthEmailsLayout.tsx
index 3bacb8c64ac..82ee2c1ecd4 100644
--- a/apps/studio/components/layouts/AuthLayout/AuthEmailsLayout.tsx
+++ b/apps/studio/components/layouts/AuthLayout/AuthEmailsLayout.tsx
@@ -1,15 +1,10 @@
-import { ReactNode } from 'react'
+import { PropsWithChildren } from 'react'
import { useParams } from 'common'
-import DefaultLayout from 'components/layouts/DefaultLayout'
import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
import AuthLayout from './AuthLayout'
-interface AuthEmailsLayoutProps {
- children: ReactNode
-}
-
-export const AuthEmailsLayout = ({ children }: AuthEmailsLayoutProps) => {
+export const AuthEmailsLayout = ({ children }: PropsWithChildren<{}>) => {
const { ref } = useParams()
const navItems = [
@@ -24,16 +19,14 @@ export const AuthEmailsLayout = ({ children }: AuthEmailsLayoutProps) => {
]
return (
- <DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="Emails"
- subtitle="Configure what emails your users receive and how they are sent"
- navigationItems={navItems}
- >
- {children}
- </PageLayout>
- </AuthLayout>
- </DefaultLayout>
+ <AuthLayout>
+ <PageLayout
+ title="Emails"
+ subtitle="Configure what emails your users receive and how they are sent"
+ navigationItems={navItems}
+ >
+ {children}
+ </PageLayout>
+ </AuthLayout>
)
}
diff --git a/apps/studio/components/layouts/AuthLayout/AuthProvidersLayout.tsx b/apps/studio/components/layouts/AuthLayout/AuthProvidersLayout.tsx
index 688b8eee551..f3afe699180 100644
--- a/apps/studio/components/layouts/AuthLayout/AuthProvidersLayout.tsx
+++ b/apps/studio/components/layouts/AuthLayout/AuthProvidersLayout.tsx
@@ -1,15 +1,10 @@
-import { ReactNode } from 'react'
+import { PropsWithChildren } from 'react'
import { useParams } from 'common'
-import DefaultLayout from 'components/layouts/DefaultLayout'
import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
import AuthLayout from './AuthLayout'
-interface AuthProvidersLayoutProps {
- children: ReactNode
-}
-
-export const AuthProvidersLayout = ({ children }: AuthProvidersLayoutProps) => {
+export const AuthProvidersLayout = ({ children }: PropsWithChildren<{}>) => {
const { ref } = useParams()
const navItems = [
@@ -24,16 +19,14 @@ export const AuthProvidersLayout = ({ children }: AuthProvidersLayoutProps) => {
]
return (
- <DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="Sign In / Up"
- subtitle="Configure authentication providers and login methods for your users"
- navigationItems={navItems}
- >
- {children}
- </PageLayout>
- </AuthLayout>
- </DefaultLayout>
+ <AuthLayout>
+ <PageLayout
+ title="Sign In / Up"
+ subtitle="Configure authentication providers and login methods for your users"
+ navigationItems={navItems}
+ >
+ {children}
+ </PageLayout>
+ </AuthLayout>
)
}
diff --git a/apps/studio/components/layouts/AuthenticationLayout.tsx b/apps/studio/components/layouts/AuthenticationLayout.tsx
new file mode 100644
index 00000000000..60ad6705137
--- /dev/null
+++ b/apps/studio/components/layouts/AuthenticationLayout.tsx
@@ -0,0 +1,17 @@
+import { PropsWithChildren } from 'react'
+
+import { AppBannerWrapper } from 'components/interfaces/App'
+import { AppBannerContextProvider } from 'components/interfaces/App/AppBannerWrapperContext'
+
+export const AuthenticationLayout = ({ children }: PropsWithChildren<{}>) => {
+ return (
+ <AppBannerContextProvider>
+ <div className="flex flex-col h-screen w-screen">
+ <AppBannerWrapper />
+ <div className="flex flex-1 w-full overflow-y-hidden">
+ <div className="flex-grow h-full overflow-y-auto">{children}</div>
+ </div>
+ </div>
+ </AppBannerContextProvider>
+ )
+}
diff --git a/apps/studio/components/layouts/DefaultLayout.tsx b/apps/studio/components/layouts/DefaultLayout.tsx
index 39108bdc686..225d35a7100 100644
--- a/apps/studio/components/layouts/DefaultLayout.tsx
+++ b/apps/studio/components/layouts/DefaultLayout.tsx
@@ -3,13 +3,16 @@ import { PropsWithChildren } from 'react'
import { useParams } from 'common'
import { AppBannerWrapper } from 'components/interfaces/App'
import { AppBannerContextProvider } from 'components/interfaces/App/AppBannerWrapperContext'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import { Sidebar } from 'components/interfaces/Sidebar'
+import { useShowLayoutHeader } from 'hooks/misc/useShowLayoutHeader'
import { SidebarProvider } from 'ui'
import { LayoutHeader } from './ProjectLayout/LayoutHeader'
import MobileNavigationBar from './ProjectLayout/NavigationBar/MobileNavigationBar'
import { ProjectContextProvider } from './ProjectLayout/ProjectContext'
export interface DefaultLayoutProps {
+ headerTitle?: string
showProductMenu?: boolean
}
@@ -24,8 +27,16 @@ export interface DefaultLayoutProps {
* - First level side navigation bar (e.g For navigating to Table Editor, SQL Editor, Database page, etc)
* @param showProductMenu - (Mobile only) Show button to toggle visiblity of product menu (Default: true)
*/
-const DefaultLayout = ({ children, showProductMenu }: PropsWithChildren<DefaultLayoutProps>) => {
+const DefaultLayout = ({
+ children,
+ headerTitle,
+ showProductMenu = true,
+}: PropsWithChildren<DefaultLayoutProps>) => {
+ const newLayoutPreview = useNewLayout()
+ const showLayoutHeader = useShowLayoutHeader()
+
const { ref } = useParams()
+
return (
<SidebarProvider defaultOpen={false}>
<ProjectContextProvider projectRef={ref}>
@@ -35,12 +46,13 @@ const DefaultLayout = ({ children, showProductMenu }: PropsWithChildren<DefaultL
<AppBannerWrapper />
<div className="flex-shrink-0">
<MobileNavigationBar />
- <LayoutHeader showProductMenu={showProductMenu} />
+ {newLayoutPreview || showLayoutHeader ? (
+ <LayoutHeader showProductMenu={showProductMenu} headerTitle={headerTitle} />
+ ) : null}
</div>
{/* Main Content Area */}
<div className="flex flex-1 w-full overflow-y-hidden">
{/* Sidebar */}
-
<Sidebar />
{/* Main Content */}
<div className="flex-grow h-full overflow-y-auto">{children}</div>
diff --git a/apps/studio/components/layouts/DocsLayout/DocsLayout.utils.tsx b/apps/studio/components/layouts/DocsLayout/DocsLayout.utils.tsx
index 04aa4edd1e5..db1f0284c93 100644
--- a/apps/studio/components/layouts/DocsLayout/DocsLayout.utils.tsx
+++ b/apps/studio/components/layouts/DocsLayout/DocsLayout.utils.tsx
@@ -24,8 +24,8 @@ export const generateDocsMenu = (
? [
{
name: 'User Management',
- key: 'users',
- url: `/project/${ref}/api?page=users`,
+ key: 'users-management',
+ url: `/project/${ref}/api?page=users-management`,
items: [],
},
]
diff --git a/apps/studio/components/layouts/EdgeFunctionsLayout/EdgeFunctionsLayout.tsx b/apps/studio/components/layouts/EdgeFunctionsLayout/EdgeFunctionsLayout.tsx
index 5fdd6772908..2f70bebd87e 100644
--- a/apps/studio/components/layouts/EdgeFunctionsLayout/EdgeFunctionsLayout.tsx
+++ b/apps/studio/components/layouts/EdgeFunctionsLayout/EdgeFunctionsLayout.tsx
@@ -18,7 +18,7 @@ const EdgeFunctionsProductMenu = () => {
{
name: 'Functions',
key: 'main',
- pages: [undefined, '[functionSlug]', 'new'],
+ pages: ['', '[functionSlug]', 'new'],
url: `/project/${projectRef}/functions`,
items: [],
},
diff --git a/apps/studio/components/layouts/OrganizationLayout.tsx b/apps/studio/components/layouts/OrganizationLayout.tsx
index d3a71f986dc..9f65f45354f 100644
--- a/apps/studio/components/layouts/OrganizationLayout.tsx
+++ b/apps/studio/components/layouts/OrganizationLayout.tsx
@@ -1,116 +1,154 @@
+import { ExternalLink } from 'lucide-react'
+import { useRouter } from 'next/router'
import type { PropsWithChildren } from 'react'
-import { useParams } from 'common'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import PartnerIcon from 'components/ui/PartnerIcon'
import { PARTNER_TO_NAME } from 'components/ui/PartnerManagedResource'
import { useVercelRedirectQuery } from 'data/integrations/vercel-redirect-query'
-import { useCurrentPath } from 'hooks/misc/useCurrentPath'
-import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
+import { useOrganizationsQuery } from 'data/organizations/organizations-query'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
-import { ExternalLink } from 'lucide-react'
-import Link from 'next/link'
-import { Alert_Shadcn_, AlertTitle_Shadcn_, Button, NavMenu, NavMenuItem } from 'ui'
-import AccountLayout from './AccountLayout/AccountLayout'
-import { ScaffoldContainer, ScaffoldDivider, ScaffoldHeader, ScaffoldTitle } from './Scaffold'
+import { withAuth } from 'hooks/misc/withAuth'
+import { IS_PLATFORM } from 'lib/constants'
+import { Alert_Shadcn_, AlertTitle_Shadcn_, Button, cn } from 'ui'
+import { SidebarSection } from './AccountLayout/AccountLayout.types'
+import WithSidebar from './AccountLayout/WithSidebar'
+import LayoutHeader from './ProjectLayout/LayoutHeader/LayoutHeader'
const OrganizationLayout = ({ children }: PropsWithChildren<{}>) => {
+ const newLayoutPreview = useNewLayout()
+
const selectedOrganization = useSelectedOrganization()
- const currentPath = useCurrentPath()
- const { slug } = useParams()
+ const { data: organizations } = useOrganizationsQuery()
- const invoicesEnabledOnProfileLevel = useIsFeatureEnabled('billing:invoices')
- const invoicesEnabled = invoicesEnabledOnProfileLevel
+ const router = useRouter()
const { data, isSuccess } = useVercelRedirectQuery({
installationId: selectedOrganization?.partner_id,
})
- const navMenuItems = [
- {
- label: 'General',
- href: `/org/${slug}/general`,
- },
- {
- label: 'Team',
- href: `/org/${slug}/team`,
- },
- {
- label: 'Integrations',
- href: `/org/${slug}/integrations`,
- },
- {
- label: 'Billing',
- href: `/org/${slug}/billing`,
- },
- {
- label: 'Usage',
- href: `/org/${slug}/usage`,
- },
- {
- label: 'Invoices',
- href: `/org/${slug}/invoices`,
- hidden: !invoicesEnabled,
- },
- {
- label: 'OAuth Apps',
- href: `/org/${slug}/apps`,
- },
- {
- label: 'Audit Logs',
- href: `/org/${slug}/audit`,
- },
- {
- label: 'Legal Documents',
- href: `/org/${slug}/documents`,
- },
- ]
+ const Content = () => (
+ <div className={cn('w-full flex flex-col overflow-hidden')}>
+ {selectedOrganization && selectedOrganization?.managed_by !== 'supabase' && (
+ <Alert_Shadcn_ variant="default" className="flex items-center gap-4">
+ <PartnerIcon organization={selectedOrganization} showTooltip={false} size="medium" />
+ <AlertTitle_Shadcn_ className="flex-1">
+ This organization is managed by {PARTNER_TO_NAME[selectedOrganization.managed_by]}.
+ </AlertTitle_Shadcn_>
+ <Button type="default" iconRight={<ExternalLink />} asChild disabled={!isSuccess}>
+ <a href={data?.url} target="_blank" rel="noopener noreferrer">
+ Manage
+ </a>
+ </Button>
+ </Alert_Shadcn_>
+ )}
+ <main className="h-full w-full overflow-y-auto">{children}</main>
+ </div>
+ )
- const filteredNavMenuItems = navMenuItems.filter((item) => !item.hidden)
+ if (!newLayoutPreview) {
+ const organizationsLinks = (organizations ?? [])
- return (
- <AccountLayout
- title={selectedOrganization?.name ?? 'Supabase'}
- breadcrumbs={[{ key: `org-settings`, label: 'Settings' }]}
- >
- <ScaffoldHeader className="pb-0">
- <ScaffoldContainer id="billing-page-top">
- <ScaffoldTitle className="pb-3">
- {selectedOrganization?.name ?? 'Organization'} settings
- </ScaffoldTitle>
- <NavMenu
- className="border-none max-w-full overflow-y-hidden overflow-x-auto"
- aria-label="Organization menu navigation"
- >
- {filteredNavMenuItems.map((item) => (
- <NavMenuItem key={item.label} active={currentPath === item.href}>
- <Link href={item.href}>{item.label}</Link>
- </NavMenuItem>
- ))}
- </NavMenu>
- </ScaffoldContainer>
- </ScaffoldHeader>
+ .map((organization) => ({
+ isActive:
+ router.pathname.startsWith('/org/') && selectedOrganization?.slug === organization.slug,
+ label: organization.name,
+ href: `/org/${organization.slug}/general`,
+ key: organization.slug,
+ icon: <PartnerIcon organization={organization} />,
+ }))
+ .sort((a, b) => a.label.localeCompare(b.label))
- <ScaffoldDivider />
+ const sectionsWithHeaders: SidebarSection[] = [
+ {
+ heading: 'Projects',
+ key: 'projects',
+ links: [
+ {
+ isActive: router.pathname === '/projects',
+ label: 'All projects',
+ href: '/projects',
+ key: 'all-projects-item',
+ },
+ ],
+ },
+ ...(IS_PLATFORM && organizationsLinks?.length > 0
+ ? [
+ {
+ heading: 'Organizations',
+ key: 'organizations',
+ links: organizationsLinks,
+ },
+ ]
+ : []),
+ ...(IS_PLATFORM
+ ? [
+ {
+ heading: 'Account',
+ key: 'account',
+ links: [
+ {
+ isActive: router.pathname === `/account/me`,
+ label: 'Preferences',
+ href: `/account/me`,
+ key: `/account/me`,
+ },
+ {
+ isActive: router.pathname === `/account/tokens`,
+ label: 'Access Tokens',
+ href: `/account/tokens`,
+ key: `/account/tokens`,
+ },
- {selectedOrganization && selectedOrganization?.managed_by !== 'supabase' && (
- <ScaffoldContainer className="mt-8">
- <Alert_Shadcn_ variant="default" className="flex items-center gap-4">
- <PartnerIcon organization={selectedOrganization} showTooltip={false} size="medium" />
- <AlertTitle_Shadcn_ className="flex-1">
- This organization is managed by {PARTNER_TO_NAME[selectedOrganization.managed_by]}.
- </AlertTitle_Shadcn_>
- <Button type="default" iconRight={<ExternalLink />} asChild disabled={!isSuccess}>
- <a href={data?.url} target="_blank" rel="noopener noreferrer">
- Manage
- </a>
- </Button>
- </Alert_Shadcn_>
- </ScaffoldContainer>
- )}
+ {
+ isActive: router.pathname === `/account/security`,
+ label: 'Security',
+ href: `/account/security`,
+ key: `/account/security`,
+ },
+ {
+ isActive: router.pathname === `/account/audit`,
+ label: 'Audit Logs',
+ href: `/account/audit`,
+ key: `/account/audit`,
+ },
+ ],
+ },
+ ]
+ : []),
+ {
+ heading: 'Documentation',
+ key: 'documentation',
+ links: [
+ {
+ key: 'ext-guides',
+ label: 'Guides',
+ href: 'https://supabase.com/docs',
+ isExternal: true,
+ },
+ {
+ key: 'ext-guides',
+ label: 'API Reference',
+ href: 'https://supabase.com/docs/guides/api',
+ isExternal: true,
+ },
+ ],
+ },
+ ]
- {children}
- </AccountLayout>
- )
+ return (
+ <WithSidebar
+ title={selectedOrganization?.name ?? 'Supabase'}
+ breadcrumbs={[{ key: `org-settings`, label: 'Settings' }]}
+ sections={sectionsWithHeaders}
+ >
+ {!newLayoutPreview && <LayoutHeader />}
+ <Content />
+ </WithSidebar>
+ )
+ } else {
+ return <Content />
+ }
}
-export default OrganizationLayout
+export default withAuth(OrganizationLayout)
diff --git a/apps/studio/components/layouts/PageLayout/PageLayout.tsx b/apps/studio/components/layouts/PageLayout/PageLayout.tsx
index 6c5c532e3fb..3b2683eb784 100644
--- a/apps/studio/components/layouts/PageLayout/PageLayout.tsx
+++ b/apps/studio/components/layouts/PageLayout/PageLayout.tsx
@@ -2,6 +2,7 @@ import Link from 'next/link'
import { useRouter } from 'next/router'
import { ReactNode } from 'react'
+import { useParams } from 'common'
import { Button, cn, NavMenu, NavMenuItem } from 'ui'
import { ScaffoldContainer } from '../Scaffold'
import { PageHeader } from './PageHeader'
@@ -68,6 +69,7 @@ export const PageLayout = ({
size = 'default',
isCompact = false,
}: PageLayoutProps) => {
+ const { ref } = useParams()
const router = useRouter()
return (
@@ -103,7 +105,11 @@ export const PageLayout = ({
<NavMenuItem key={item.label} active={router.asPath.split('?')[0] === item.href}>
{item.href ? (
<Link
- href={item.href}
+ href={
+ item.href.includes('[ref]') && !!ref
+ ? item.href.replace('[ref]', ref)
+ : item.href
+ }
className={cn(
'inline-flex items-center gap-2',
router.asPath === item.href && 'text-foreground'
diff --git a/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HomeIcon.tsx b/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HomeIcon.tsx
new file mode 100644
index 00000000000..56ef45a8fa7
--- /dev/null
+++ b/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HomeIcon.tsx
@@ -0,0 +1,52 @@
+import Image from 'next/image'
+import Link from 'next/link'
+import { useRouter } from 'next/router'
+
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
+import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext'
+import { useOrganizationsQuery } from 'data/organizations/organizations-query'
+import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage'
+import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
+import { useShowLayoutHeader } from 'hooks/misc/useShowLayoutHeader'
+import { IS_PLATFORM, LOCAL_STORAGE_KEYS } from 'lib/constants'
+
+export const HomeIcon = () => {
+ const newLayoutPreview = useNewLayout()
+ const showLayoutHeader = useShowLayoutHeader()
+ const selectedOrganization = useSelectedOrganization()
+ const { data: organizations } = useOrganizationsQuery()
+ const { project } = useProjectContext()
+
+ const router = useRouter()
+ const [lastVisitedOrganization] = useLocalStorageQuery(
+ LOCAL_STORAGE_KEYS.LAST_VISITED_ORGANIZATION,
+ ''
+ )
+
+ if (!showLayoutHeader && !newLayoutPreview) return null
+
+ const getDefaultOrgRedirect = () => {
+ if (lastVisitedOrganization) return `/org/${lastVisitedOrganization}`
+ if (selectedOrganization?.slug) return `/org/${selectedOrganization.slug}`
+ if (organizations && organizations.length > 0) return `/org/${organizations[0].slug}`
+ return '/projects'
+ }
+
+ const href = newLayoutPreview
+ ? IS_PLATFORM
+ ? getDefaultOrgRedirect()
+ : `/project/${project?.ref}`
+ : '/projects'
+
+ return (
+ <Link href={href} className="items-center justify-center flex-shrink-0 hidden md:flex">
+ <Image
+ alt="Supabase"
+ src={`${router.basePath}/img/supabase-logo.svg`}
+ width={18}
+ height={18}
+ className="w-[18px] h-[18px]"
+ />
+ </Link>
+ )
+}
diff --git a/apps/studio/components/layouts/ProjectLayout/LayoutHeader/LayoutHeader.tsx b/apps/studio/components/layouts/ProjectLayout/LayoutHeader/LayoutHeader.tsx
index 8c7bce61ca2..cee87479699 100644
--- a/apps/studio/components/layouts/ProjectLayout/LayoutHeader/LayoutHeader.tsx
+++ b/apps/studio/components/layouts/ProjectLayout/LayoutHeader/LayoutHeader.tsx
@@ -1,10 +1,15 @@
+import { AnimatePresence, motion } from 'framer-motion'
import Link from 'next/link'
-import { useRouter } from 'next/router'
import { ReactNode, useMemo } from 'react'
import { useParams } from 'common'
-import { useIsInlineEditorEnabled } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
+import {
+ useIsInlineEditorEnabled,
+ useNewLayout,
+} from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import Connect from 'components/interfaces/Connect/Connect'
+import { ThemeDropdown } from 'components/interfaces/ThemeDropdown'
+import { UserDropdown } from 'components/interfaces/UserDropdown'
import AssistantButton from 'components/layouts/AppLayout/AssistantButton'
import BranchDropdown from 'components/layouts/AppLayout/BranchDropdown'
import EnableBranchingButton from 'components/layouts/AppLayout/EnableBranchingButton/EnableBranchingButton'
@@ -16,16 +21,19 @@ import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-que
import { useOrgUsageQuery } from 'data/usage/org-usage-query'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
import { useSelectedProject } from 'hooks/misc/useSelectedProject'
+import { useShowLayoutHeader } from 'hooks/misc/useShowLayoutHeader'
import { IS_PLATFORM } from 'lib/constants'
+import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state'
import { useAppStateSnapshot } from 'state/app-state'
import { Badge, cn } from 'ui'
import BreadcrumbsView from './BreadcrumbsView'
import { FeedbackDropdown } from './FeedbackDropdown'
import HelpPopover from './HelpPopover'
+import { HomeIcon } from './HomeIcon'
import NotificationsPopoverV2 from './NotificationsPopoverV2/NotificationsPopover'
-const LayoutHeaderDivider = () => (
- <span className="text-border-stronger">
+const LayoutHeaderDivider = ({ className, ...props }: React.HTMLProps<HTMLSpanElement>) => (
+ <span className={cn('text-border-stronger pr-2', className)} {...props}>
<svg
viewBox="0 0 24 24"
width="16"
@@ -45,22 +53,26 @@ const LayoutHeaderDivider = () => (
interface LayoutHeaderProps {
customHeaderComponents?: ReactNode
breadcrumbs?: any[]
- headerBorder?: boolean
showProductMenu?: boolean
+ headerTitle?: string
}
const LayoutHeader = ({
customHeaderComponents,
breadcrumbs = [],
- headerBorder = true,
- showProductMenu = true,
+ showProductMenu,
+ headerTitle,
}: LayoutHeaderProps) => {
- const router = useRouter()
- const { ref: projectRef } = useParams()
+ const newLayoutPreview = useNewLayout()
+
+ const showLayoutHeader = useShowLayoutHeader()
+ const { ref: projectRef, slug } = useParams()
const selectedProject = useSelectedProject()
const selectedOrganization = useSelectedOrganization()
- const { mobileMenuOpen, setMobileMenuOpen } = useAppStateSnapshot()
const isBranchingEnabled = selectedProject?.is_branch_enabled === true
+ const { setMobileMenuOpen } = useAppStateSnapshot()
+
+ const { open: isAiAssistantOpen } = useAiAssistantStateSnapshot()
const isInlineEditorEnabled = useIsInlineEditorEnabled()
const { data: subscription } = useOrgSubscriptionQuery({
@@ -81,104 +93,155 @@ const LayoutHeader = ({
}
}, [orgUsage])
+ // show org selection if we are on a project page or on a explicit org route
+ const showOrgSelection = slug || (selectedOrganization && projectRef)
+
return (
- <div
- className={cn(
- 'flex h-12 max-h-12 min-h-12 items-center bg-dash-sidebar',
- headerBorder ? 'border-b border-default' : ''
- )}
- >
- {showProductMenu && (
- <div className="flex items-center justify-center border-r flex-0 md:hidden h-full aspect-square">
- <button
- title="Menu dropdown button"
- className={cn(
- 'group/view-toggle ml-4 flex justify-center flex-col border-none space-x-0 items-start gap-1 !bg-transparent rounded-md min-w-[30px] w-[30px] h-[30px]'
- )}
- onClick={() => setMobileMenuOpen(!mobileMenuOpen)}
- >
- <div className="h-px inline-block left-0 w-4 transition-all ease-out bg-foreground-lighter group-hover/view-toggle:bg-foreground p-0 m-0" />
- <div className="h-px inline-block left-0 w-3 transition-all ease-out bg-foreground-lighter group-hover/view-toggle:bg-foreground p-0 m-0" />
- </button>
- </div>
- )}
- <div className="relative flex flex-1 overflow-hidden">
- <div className="flex w-full items-center justify-between py-2 pl-1 pr-3 md:px-3 flex-nowrap overflow-x-auto no-scrollbar">
- <div className="flex items-center text-sm">
- {projectRef && (
- <Link
- href={IS_PLATFORM ? '/projects' : `/project/default`}
- className="ml-1 mr-2 hidden md:flex items-center"
- >
- <img
- alt="Supabase"
- src={`${router.basePath}/img/supabase-logo.svg`}
- className="w-5 cursor-pointer rounded"
- />
- </Link>
- )}
-
- {!IS_PLATFORM && (
- <div className="ml-3 text-xs text-foreground-light">Default project</div>
- )}
-
- {projectRef && IS_PLATFORM && (
- <>
- <div className="flex items-center">
+ <header className={cn('flex h-12 items-center flex-shrink-0 border-b')}>
+ <div
+ className={cn(
+ 'flex items-center justify-between h-full pr-3 flex-1 overflow-x-auto gap-x-4 md:pl-4'
+ )}
+ >
+ {showProductMenu && (
+ <div className="flex items-center justify-center border-r flex-0 md:hidden h-full aspect-square">
+ <button
+ title="Menu dropdown button"
+ className={cn(
+ 'group/view-toggle flex justify-center items-center border-none gap-1 !bg-transparent rounded-md min-w-[30px] w-[30px] h-[30px]'
+ )}
+ onClick={() => setMobileMenuOpen(true)}
+ >
+ <div className="flex flex-col gap-y-1">
+ <div className="h-px inline-block left-0 w-4 transition-all ease-out bg-foreground-lighter group-hover/view-toggle:bg-foreground p-0 m-0" />
+ <div className="h-px inline-block left-0 w-3 transition-all ease-out bg-foreground-lighter group-hover/view-toggle:bg-foreground p-0 m-0" />
+ </div>
+ </button>
+ </div>
+ )}
+ <div className="flex items-center text-sm">
+ <HomeIcon />
+ <>
+ <div className="flex items-center md:pl-2">
+ {showOrgSelection &&
+ // hides org dropdown for old layout
+ (newLayoutPreview || showLayoutHeader) &&
+ IS_PLATFORM ? (
+ <>
+ <LayoutHeaderDivider className="hidden md:block" />
<OrganizationDropdown />
- <LayoutHeaderDivider />
- <ProjectDropdown />
- {exceedingLimits && (
- <div className="ml-2">
- <Link href={`/org/${selectedOrganization?.slug}/usage`}>
- <Badge variant="destructive">Exceeding usage limits</Badge>
- </Link>
- </div>
- )}
- {selectedProject && isBranchingEnabled && (
- <>
- <LayoutHeaderDivider />
- <BranchDropdown />
- </>
- )}
- </div>
+ </>
+ ) : null}
+ <AnimatePresence>
+ {projectRef && (
+ <motion.div
+ className="flex items-center"
+ initial={{ opacity: 0, x: -20 }}
+ animate={{ opacity: 1, x: 0 }}
+ exit={{ opacity: 0, x: -20 }}
+ transition={{
+ duration: 0.15,
+ ease: 'easeOut',
+ }}
+ >
+ <LayoutHeaderDivider />
+ <ProjectDropdown />
+
+ {exceedingLimits && (
+ <div className="ml-2">
+ <Link href={`/org/${selectedOrganization?.slug}/usage`}>
+ <Badge variant="destructive">Exceeding usage limits</Badge>
+ </Link>
+ </div>
+ )}
+
+ {selectedProject && isBranchingEnabled && (
+ <>
+ <LayoutHeaderDivider />
+ <BranchDropdown />
+ </>
+ )}
+ </motion.div>
+ )}
+ </AnimatePresence>
+
+ <AnimatePresence>
+ {headerTitle && (
+ <motion.div
+ className="flex items-center"
+ initial={{ opacity: 0, x: -20 }}
+ animate={{ opacity: 1, x: 0 }}
+ exit={{ opacity: 0, x: -20 }}
+ transition={{
+ duration: 0.15,
+ ease: 'easeOut',
+ }}
+ >
+ <LayoutHeaderDivider />
+ <span className="text-foreground">{headerTitle}</span>
+ </motion.div>
+ )}
+ </AnimatePresence>
+ </div>
- <div className="ml-3 flex items-center gap-x-3">
- {!isBranchingEnabled && <EnableBranchingButton />}
+ <AnimatePresence>
+ {projectRef && (
+ <motion.div
+ className="ml-3 items-center gap-x-3 hidden md:flex"
+ initial={{ opacity: 0, x: -20 }}
+ animate={{ opacity: 1, x: 0 }}
+ exit={{ opacity: 0, x: -20 }}
+ transition={{
+ duration: 0.15,
+ ease: 'easeOut',
+ }}
+ >
<Connect />
- </div>
- </>
- )}
- {/* Additional breadcrumbs are supplied */}
- <BreadcrumbsView defaultValue={breadcrumbs} />
- </div>
- <div className="flex items-center gap-x-2">
- {customHeaderComponents && customHeaderComponents}
- {IS_PLATFORM && (
- <>
- <FeedbackDropdown />
- <NotificationsPopoverV2 />
- <HelpPopover />
- </>
- )}
- </div>
+ {!isBranchingEnabled && IS_PLATFORM && <EnableBranchingButton />}
+ </motion.div>
+ )}
+ </AnimatePresence>
+ </>
+ {/* Additional breadcrumbs are supplied */}
+ <BreadcrumbsView defaultValue={breadcrumbs} />
</div>
- <div className="absolute md:hidden left-0 h-full w-3 bg-gradient-to-r from-background-dash-sidebar to-transparent pointer-events-none" />
- <div className="absolute md:hidden right-0 h-full w-3 bg-gradient-to-l from-background-dash-sidebar to-transparent pointer-events-none" />
- </div>
- {!!projectRef && (
- <div className="flex h-full items-center">
- {isInlineEditorEnabled && (
- <div className="border-l flex-0 h-full">
- <InlineEditorButton />
- </div>
+ <div className="flex items-center gap-x-2">
+ {customHeaderComponents && customHeaderComponents}
+ {IS_PLATFORM ? (
+ <>
+ <FeedbackDropdown />
+ <NotificationsPopoverV2 />
+ <HelpPopover />
+ <UserDropdown />
+ </>
+ ) : (
+ <ThemeDropdown />
)}
- <div className="border-l flex-0 h-full">
- <AssistantButton />
- </div>
</div>
- )}
- </div>
+ </div>
+
+ <AnimatePresence initial={false}>
+ {!!projectRef &&
+ (isInlineEditorEnabled || (!isInlineEditorEnabled && !isAiAssistantOpen)) && (
+ <motion.div
+ className="border-l h-full flex items-center justify-center flex-shrink-0"
+ initial={{ opacity: 0, x: 0, width: 0 }}
+ animate={{ opacity: 1, x: 0, width: isInlineEditorEnabled ? 'auto' : 48 }}
+ exit={{ opacity: 0, x: 0, width: 0 }}
+ transition={{ duration: 0.15, ease: 'easeOut' }}
+ >
+ {isInlineEditorEnabled && (
+ <div className="border-r h-full flex items-center justify-center md:px-2">
+ <InlineEditorButton />
+ </div>
+ )}
+ <div className="md:px-2">
+ <AssistantButton />
+ </div>
+ </motion.div>
+ )}
+ </AnimatePresence>
+ </header>
)
}
diff --git a/apps/studio/components/layouts/ProjectLayout/NavigationBar/MobileNavigationBar.tsx b/apps/studio/components/layouts/ProjectLayout/NavigationBar/MobileNavigationBar.tsx
index dc88c081d65..d1c92b8af71 100644
--- a/apps/studio/components/layouts/ProjectLayout/NavigationBar/MobileNavigationBar.tsx
+++ b/apps/studio/components/layouts/ProjectLayout/NavigationBar/MobileNavigationBar.tsx
@@ -10,6 +10,9 @@ import { buttonVariants, cn } from 'ui'
import { CommandMenuTrigger } from 'ui-patterns'
import MobileSheetNav from 'ui-patterns/MobileSheetNav/MobileSheetNav'
+export const ICON_SIZE = 20
+export const ICON_STROKE_WIDTH = 1.5
+
const MobileNavigationBar = () => {
const router = useRouter()
const [isSheetOpen, setIsSheetOpen] = useState(false)
diff --git a/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx b/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx
index f5d8a800ebc..50449c9e005 100644
--- a/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx
+++ b/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx
@@ -1,6 +1,9 @@
import { Blocks, FileText, Lightbulb, List, Settings } from 'lucide-react'
import { ICON_SIZE, ICON_STROKE_WIDTH } from 'components/interfaces/Sidebar'
+import { generateAuthMenu } from 'components/layouts/AuthLayout/AuthLayout.utils'
+import { generateDatabaseMenu } from 'components/layouts/DatabaseLayout/DatabaseMenu.utils'
+import { generateSettingsMenu } from 'components/layouts/ProjectSettingsLayout/SettingsMenu.utils'
import type { Route } from 'components/ui/ui.types'
import { EditorIndexPageLink } from 'data/prefetchers/project.$ref.editor'
import type { Project } from 'data/projects/project-detail-query'
@@ -58,6 +61,9 @@ export const generateProductRoutes = (
const storageEnabled = features?.storage ?? true
const realtimeEnabled = features?.realtime ?? true
+ const databaseMenu = generateDatabaseMenu(project)
+ const authMenu = generateAuthMenu(ref as string)
+
return [
{
key: 'database',
@@ -70,6 +76,7 @@ export const generateProductRoutes = (
: isProjectActive
? `/project/${ref}/database/schemas`
: `/project/${ref}/database/backups/scheduled`),
+ items: databaseMenu,
},
...(authEnabled
? [
@@ -78,6 +85,7 @@ export const generateProductRoutes = (
label: 'Authentication',
icon: <Auth size={ICON_SIZE} strokeWidth={ICON_STROKE_WIDTH} />,
link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/auth/users`),
+ items: authMenu,
},
]
: []),
@@ -157,6 +165,7 @@ export const generateOtherRoutes = (ref?: string, project?: Project): Route[] =>
}
export const generateSettingsRoutes = (ref?: string, project?: Project): Route[] => {
+ const settingsMenu = generateSettingsMenu(ref as string)
return [
...(IS_PLATFORM
? [
@@ -165,6 +174,7 @@ export const generateSettingsRoutes = (ref?: string, project?: Project): Route[]
label: 'Project Settings',
icon: <Settings size={ICON_SIZE} strokeWidth={ICON_STROKE_WIDTH} />,
link: ref && `/project/${ref}/settings/general`,
+ items: settingsMenu,
},
]
: []),
diff --git a/apps/studio/components/layouts/ProjectLayout/OrganizationSettingsLayout.tsx b/apps/studio/components/layouts/ProjectLayout/OrganizationSettingsLayout.tsx
new file mode 100644
index 00000000000..7750a7c1be6
--- /dev/null
+++ b/apps/studio/components/layouts/ProjectLayout/OrganizationSettingsLayout.tsx
@@ -0,0 +1,95 @@
+import Link from 'next/link'
+import { PropsWithChildren } from 'react'
+
+import { useParams } from 'common'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
+import { useCurrentPath } from 'hooks/misc/useCurrentPath'
+import { cn, NavMenu, NavMenuItem } from 'ui'
+import { ScaffoldContainerLegacy, ScaffoldTitle } from '../Scaffold'
+
+function OrganizationSettingsLayout({ children }: PropsWithChildren) {
+ const newLayoutPreview = useNewLayout()
+
+ const { slug } = useParams()
+ const currentPath = useCurrentPath()
+
+ // hide these settings in the new layout
+ // when path equals `/org/${slug}/team`
+ // or `/org/${slug}/integrations`
+ // or `/org/${slug}/usage`
+ // make the function
+ const isHidden = (path: string) => {
+ return (
+ newLayoutPreview &&
+ (path === `/org/${slug}/team` ||
+ path === `/org/${slug}/integrations` ||
+ path === `/org/${slug}/usage`)
+ )
+ }
+
+ if (isHidden(currentPath)) {
+ return children
+ }
+
+ const navMenuItems = [
+ {
+ label: 'General',
+ href: `/org/${slug}/general`,
+ },
+ !newLayoutPreview && {
+ label: 'Team',
+ href: `/org/${slug}/team`,
+ },
+ !newLayoutPreview && {
+ label: 'Integrations',
+ href: `/org/${slug}/integrations`,
+ },
+ {
+ label: 'Billing',
+ href: `/org/${slug}/billing`,
+ },
+ !newLayoutPreview && {
+ label: 'Usage',
+ href: `/org/${slug}/usage`,
+ },
+ {
+ label: 'Invoices',
+ href: `/org/${slug}/invoices`,
+ },
+ {
+ label: 'OAuth Apps',
+ href: `/org/${slug}/apps`,
+ },
+ {
+ label: 'Audit Logs',
+ href: `/org/${slug}/audit`,
+ },
+ {
+ label: 'Legal Documents',
+ href: `/org/${slug}/documents`,
+ },
+ ]
+
+ return (
+ <>
+ <ScaffoldContainerLegacy>
+ <ScaffoldTitle>Organization Settings</ScaffoldTitle>
+ </ScaffoldContainerLegacy>
+ <NavMenu
+ className={cn(
+ '[&_ul]:mx-auto [&_ul]:max-w-[1200px] [&_ul]:px-6 [&_ul]:lg:px-14 [&_ul]:xl:px-24 [&_ul]:2xl:px-32'
+ )}
+ aria-label="Organization menu navigation"
+ >
+ {(navMenuItems.filter(Boolean) as { label: string; href: string }[]).map((item) => (
+ <NavMenuItem key={item.label} active={currentPath === item.href}>
+ <Link href={item.href}>{item.label}</Link>
+ </NavMenuItem>
+ ))}
+ </NavMenu>
+ <main className="h-full w-full overflow-y-auto">{children}</main>
+ </>
+ )
+}
+
+export default OrganizationSettingsLayout
diff --git a/apps/studio/components/layouts/ReportsLayout/ReportMenuItem.tsx b/apps/studio/components/layouts/ReportsLayout/ReportMenuItem.tsx
index feef79188e9..5e8c78ac452 100644
--- a/apps/studio/components/layouts/ReportsLayout/ReportMenuItem.tsx
+++ b/apps/studio/components/layouts/ReportsLayout/ReportMenuItem.tsx
@@ -64,14 +64,14 @@ export const ReportMenuItem = ({
{canUpdateCustomReport && (
<DropdownMenu>
- <DropdownMenuTrigger>
+ <DropdownMenuTrigger asChild>
<Button
type="text"
className="px-1 opacity-50 hover:opacity-100"
icon={<ChevronDown size={12} strokeWidth={2} />}
/>
</DropdownMenuTrigger>
- <DropdownMenuContent align="start" className="w-52 *:space-x-2">
+ <DropdownMenuContent align="start" className="w-32 *:gap-x-2">
<DropdownMenuItem
onClick={() => {
if (!item.id) return
@@ -79,7 +79,7 @@ export const ReportMenuItem = ({
}}
>
<Edit2 size={12} />
- <div>Rename</div>
+ <div>Rename report</div>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem
@@ -89,7 +89,7 @@ export const ReportMenuItem = ({
}}
>
<Trash size={12} />
- <div>Delete</div>
+ <div>Delete report</div>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
diff --git a/apps/studio/components/layouts/Scaffold.tsx b/apps/studio/components/layouts/Scaffold.tsx
index 9fde6e0173e..7021c6249df 100644
--- a/apps/studio/components/layouts/Scaffold.tsx
+++ b/apps/studio/components/layouts/Scaffold.tsx
@@ -4,7 +4,8 @@ import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state'
import { cn } from 'ui'
export const MAX_WIDTH_CLASSES = 'mx-auto w-full max-w-[1200px]'
-export const PADDING_CLASSES = 'px-4 md:px-6 lg:px-14 xl:px-24 2xl:px-28'
+export const PADDING_CLASSES = 'px-6 lg:px-14 xl:px-24 2xl:px-32'
+// const PADDING_CLASSES = 'px-10'
export const MAX_WIDTH_CLASSES_COLUMN = 'min-w-[420px]'
/**
diff --git a/apps/studio/components/layouts/WizardLayout.tsx b/apps/studio/components/layouts/WizardLayout.tsx
index 8992e5494e3..8a352ebdfe8 100644
--- a/apps/studio/components/layouts/WizardLayout.tsx
+++ b/apps/studio/components/layouts/WizardLayout.tsx
@@ -20,7 +20,6 @@ const WizardLayout = ({
}: PropsWithChildren<WizardLayoutProps>) => {
return (
<div className="flex w-full flex-col">
- <Header organization={organization} project={project} />
<div className="overflow-auto">
<section className="has-slide-in slide-in relative mx-auto my-10 max-w-2xl">
{children}
@@ -33,44 +32,3 @@ const WizardLayout = ({
export default withAuth(WizardLayout)
export const WizardLayoutWithoutAuth = WizardLayout
-
-const Header = ({ organization, project }: WizardLayoutProps) => {
- let stepNumber = organization ? 1 : project ? 2 : 0
- return (
- <div className="border-b p-3 border-default">
- <div className="PageHeader">
- <div className="Breadcrumbs flex justify-between">
- <div className="flex items-center text-sm">
- <div className="flex items-center space-x-2">
- <Link href="/projects">
- <img
- src={`${BASE_PATH}/img/supabase-logo.svg`}
- alt="Supabase"
- className="rounded border p-1 hover:border-white border-default"
- style={{ height: 24 }}
- />
- </Link>
- <ChevronRight size="18" className="text-foreground-light" strokeWidth={1} />
- <p className="text-sm hidden md:block">
- {organization ? `Organization: ${organization.name}` : 'Create an organization'}
- </p>
- <ChevronRight
- size="18"
- className="text-foreground-light hidden md:block"
- strokeWidth={1}
- />
- <p className={`text-sm ${stepNumber < 1 ? 'text-foreground-light' : ''}`}>
- {project ? project.name : 'Create a new project'}
- </p>
- </div>
- </div>
- <div className="flex">{/* The End */}</div>
- <div className="flex items-center space-x-2">
- <HelpPopover />
- <FeedbackDropdown />
- </div>
- </div>
- </div>
- </div>
- )
-}
diff --git a/apps/studio/components/to-be-cleaned/Storage/StorageExplorer/StorageExplorer.tsx b/apps/studio/components/to-be-cleaned/Storage/StorageExplorer/StorageExplorer.tsx
index 0328879006c..e55cb48a772 100644
--- a/apps/studio/components/to-be-cleaned/Storage/StorageExplorer/StorageExplorer.tsx
+++ b/apps/studio/components/to-be-cleaned/Storage/StorageExplorer/StorageExplorer.tsx
@@ -24,7 +24,6 @@ const StorageExplorer = ({ bucket }: StorageExplorerProps) => {
const storageExplorerStore = useStorageStore()
const {
columns,
- selectedFilePreview,
closeFilePreview,
selectedItems,
setSelectedItems,
@@ -182,9 +181,9 @@ const StorageExplorer = ({ bucket }: StorageExplorerProps) => {
<div
ref={storageExplorerRef}
className="
- bg-studio
+ bg-studio border rounded-md
border-overlay flex
- h-full w-full flex-col rounded-md border"
+ h-full w-full flex-col"
>
{selectedItems.length === 0 ? (
<FileExplorerHeader
diff --git a/apps/studio/components/to-be-cleaned/Storage/StorageSettings/S3Connection.tsx b/apps/studio/components/to-be-cleaned/Storage/StorageSettings/S3Connection.tsx
index 80616b30845..4368ee7dd82 100644
--- a/apps/studio/components/to-be-cleaned/Storage/StorageSettings/S3Connection.tsx
+++ b/apps/studio/components/to-be-cleaned/Storage/StorageSettings/S3Connection.tsx
@@ -252,9 +252,9 @@ export const S3Connection = () => {
<div className="overflow-x-auto">
<Table
head={[
- <Table.th key="">Description</Table.th>,
- <Table.th key="">Access key ID</Table.th>,
- <Table.th key="">Created at</Table.th>,
+ <Table.th key="description">Description</Table.th>,
+ <Table.th key="access-key-id">Access key ID</Table.th>,
+ <Table.th key="created-at">Created at</Table.th>,
<Table.th key="actions" />,
]}
body={
diff --git a/apps/studio/components/ui/AIAssistantPanel/AIAssistant.tsx b/apps/studio/components/ui/AIAssistantPanel/AIAssistant.tsx
index d471b8faab6..a5ffaef3ab7 100644
--- a/apps/studio/components/ui/AIAssistantPanel/AIAssistant.tsx
+++ b/apps/studio/components/ui/AIAssistantPanel/AIAssistant.tsx
@@ -301,7 +301,7 @@ export const AIAssistant = ({ className }: AIAssistantProps) => {
<div className={cn('flex flex-col h-full', className)}>
<div ref={scrollContainerRef} className={cn('flex-grow overflow-auto flex flex-col')}>
<div className="z-30 sticky top-0">
- <div className="border-b flex items-center bg gap-x-3 px-5 h-[46px]">
+ <div className="border-b flex items-center bg gap-x-3 pl-5 pr-4 h-[46px]">
<AiIconAnimation allowHoverEffect />
<div className="text-sm flex-1 flex items-center gap-x-2">
diff --git a/apps/studio/components/ui/ActionCard.tsx b/apps/studio/components/ui/ActionCard.tsx
new file mode 100644
index 00000000000..d6209140429
--- /dev/null
+++ b/apps/studio/components/ui/ActionCard.tsx
@@ -0,0 +1,38 @@
+import { Badge, Card, cn } from 'ui'
+
+export const ActionCard = (card: {
+ icon: JSX.Element
+ title: string
+ bgColor?: string
+ description?: string
+ isBeta?: boolean
+ className?: string
+ onClick?: () => void
+}) => {
+ return (
+ <Card
+ className={cn(
+ 'grow bg-surface-100 p-3 transition-colors hover:bg-surface-200 border border-light hover:border-default cursor-pointer',
+ card.className
+ )}
+ onClick={card.onClick}
+ >
+ <div className={`relative flex items-start gap-3`}>
+ {card.isBeta && (
+ <Badge className="absolute -right-5 -top-5 bg-surface-300 bg-opacity-100 text-xs text-foreground">
+ Coming soon
+ </Badge>
+ )}
+ <div
+ className={`rounded-full ${card.bgColor} w-8 h-8 flex items-center justify-center flex-shrink-0`}
+ >
+ {card.icon}
+ </div>
+ <div className="flex flex-col gap-0">
+ <h3 className="text-sm text-foreground mb-0">{card.title}</h3>
+ <p className="text-xs text-foreground-light">{card.description}</p>
+ </div>
+ </div>
+ </Card>
+ )
+}
diff --git a/apps/studio/components/ui/ProductMenu/ProductMenu.tsx b/apps/studio/components/ui/ProductMenu/ProductMenu.tsx
index 8576e6f002d..67cc2c49e39 100644
--- a/apps/studio/components/ui/ProductMenu/ProductMenu.tsx
+++ b/apps/studio/components/ui/ProductMenu/ProductMenu.tsx
@@ -28,7 +28,9 @@ const ProductMenu = ({ page, menu }: ProductMenuProps) => {
/>
<div>
{group.items.map((item) => {
- const isActive = !!item.pages ? item.pages.includes(page) : page === item.key
+ const isActive = !!item.pages
+ ? item.pages.includes(page ?? '')
+ : page === item.key
return (
<ProductMenuItem
diff --git a/apps/studio/components/ui/ProductMenu/ProductMenu.types.ts b/apps/studio/components/ui/ProductMenu/ProductMenu.types.ts
index 4a40e51c24b..5179cc1fe36 100644
--- a/apps/studio/components/ui/ProductMenu/ProductMenu.types.ts
+++ b/apps/studio/components/ui/ProductMenu/ProductMenu.types.ts
@@ -5,18 +5,24 @@ export interface ProductMenuGroup {
/** Set to "main" if page is on a '/' route */
key?: string | 'main'
isPreview?: boolean
+ name?: string
items: ProductMenuGroupItem[]
+ link?: string
}
export interface ProductMenuGroupItem {
name: string
key: string
url: string
- items: any[]
+ items?: any[]
icon?: ReactNode
rightIcon?: ReactNode
isExternal?: boolean
disabled?: boolean
label?: string
- pages?: (string | undefined)[]
+ hasChild?: boolean
+ childId?: string
+ childIcon?: ReactNode
+ childItems?: ProductMenuGroupItem[]
+ pages?: string[]
}
diff --git a/apps/studio/components/ui/ProfileImage.tsx b/apps/studio/components/ui/ProfileImage.tsx
index da31b8d0c9e..1eb710efb2d 100644
--- a/apps/studio/components/ui/ProfileImage.tsx
+++ b/apps/studio/components/ui/ProfileImage.tsx
@@ -20,7 +20,7 @@ export const ProfileImage = ({ alt, src, placeholder, className }: ProfileImageP
src={src}
width="24"
height="24"
- className={cn('bg-foreground rounded-full', className)}
+ className={cn('aspect-square bg-foreground rounded-full object-cover', className)}
onError={() => setHasInvalidImg(true)}
/>
) : (
diff --git a/apps/studio/components/ui/ui.types.ts b/apps/studio/components/ui/ui.types.ts
index c1ef94670f2..be8f3f20a6f 100644
--- a/apps/studio/components/ui/ui.types.ts
+++ b/apps/studio/components/ui/ui.types.ts
@@ -7,4 +7,6 @@ export interface Route {
link?: string
disabled?: boolean
linkElement?: ReactNode
+
+ items?: any | Route[]
}
diff --git a/apps/studio/data/content/content-delete-mutation.ts b/apps/studio/data/content/content-delete-mutation.ts
index bb4a2d9df54..e9b38b43bee 100644
--- a/apps/studio/data/content/content-delete-mutation.ts
+++ b/apps/studio/data/content/content-delete-mutation.ts
@@ -42,6 +42,7 @@ export const useContentDeleteMutation = ({
async onSuccess(data, variables, context) {
const { projectRef } = variables
await queryClient.invalidateQueries(contentKeys.allContentLists(projectRef))
+
await onSuccess?.(data, variables, context)
},
async onError(data, variables, context) {
diff --git a/apps/studio/hooks/misc/useHideSidebar.ts b/apps/studio/hooks/misc/useHideSidebar.ts
index a99554003c4..71c7be370b7 100644
--- a/apps/studio/hooks/misc/useHideSidebar.ts
+++ b/apps/studio/hooks/misc/useHideSidebar.ts
@@ -1,8 +1,16 @@
import { usePathname } from 'next/navigation'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
+
export function useHideSidebar() {
+ const newLayoutPreview = useNewLayout()
const pathname = usePathname() ?? ''
- return (
- pathname.startsWith('/account') || pathname.startsWith('/new') || pathname === '/organizations'
- )
+ const shouldHide =
+ pathname.startsWith('/account') ||
+ pathname.startsWith('/new') ||
+ pathname === '/organizations' ||
+ pathname === '/sign-in' ||
+ (pathname === '/projects' && newLayoutPreview)
+
+ return shouldHide
}
diff --git a/apps/studio/hooks/misc/useOrganizationRestrictions.ts b/apps/studio/hooks/misc/useOrganizationRestrictions.ts
new file mode 100644
index 00000000000..205cc73ee2f
--- /dev/null
+++ b/apps/studio/hooks/misc/useOrganizationRestrictions.ts
@@ -0,0 +1,78 @@
+import dayjs from 'dayjs'
+
+import { RESTRICTION_MESSAGES } from 'components/interfaces/Organization/restriction.constants'
+import { useOverdueInvoicesQuery } from 'data/invoices/invoices-overdue-query'
+import { useOrganizationsQuery } from 'data/organizations/organizations-query'
+import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
+
+export type WarningBannerProps = {
+ type: 'danger' | 'warning' | 'note'
+ title: string
+ message: string
+ link: string
+}
+
+export function useOrganizationRestrictions() {
+ const org = useSelectedOrganization()
+
+ const { data: overdueInvoices } = useOverdueInvoicesQuery()
+ const { data: organizations } = useOrganizationsQuery()
+
+ const warnings: WarningBannerProps[] = []
+
+ const overdueInvoicesFromOtherOrgs = overdueInvoices?.filter(
+ (invoice) => invoice.organization_id !== org?.id
+ )
+ const thisOrgHasOverdueInvoices = overdueInvoices?.filter(
+ (invoice) => invoice.organization_id === org?.id
+ )
+
+ if (thisOrgHasOverdueInvoices?.length) {
+ warnings.push({
+ type: 'danger',
+ title: RESTRICTION_MESSAGES.OVERDUE_INVOICES.title,
+ message: RESTRICTION_MESSAGES.OVERDUE_INVOICES.message,
+ link: `/org/${org?.slug}/settings/invoices`,
+ })
+ }
+
+ if (overdueInvoicesFromOtherOrgs?.length) {
+ warnings.push({
+ type: 'danger',
+ title: RESTRICTION_MESSAGES.OVERDUE_INVOICES_FROM_OTHER_ORGS.title,
+ message: RESTRICTION_MESSAGES.OVERDUE_INVOICES_FROM_OTHER_ORGS.message,
+ link: `/org/${organizations ? organizations?.find((org) => org.id === overdueInvoicesFromOtherOrgs[0].organization_id)?.slug : org?.slug}/settings/invoices`,
+ })
+ }
+
+ if (org?.restriction_status === 'grace_period') {
+ warnings.push({
+ type: 'warning',
+ title: RESTRICTION_MESSAGES.GRACE_PERIOD.title,
+ message: RESTRICTION_MESSAGES.GRACE_PERIOD.message(
+ dayjs(org?.restriction_data?.['grace_period_end']).format('DD MMM, YYYY')
+ ),
+ link: `/org/${org?.slug}/settings/billing`,
+ })
+ }
+
+ if (org?.restriction_status === 'grace_period_over') {
+ warnings.push({
+ type: 'warning',
+ title: RESTRICTION_MESSAGES.GRACE_PERIOD_OVER.title,
+ message: RESTRICTION_MESSAGES.GRACE_PERIOD_OVER.message,
+ link: `/org/${org?.slug}/settings/billing`,
+ })
+ }
+
+ if (org?.restriction_status === 'restricted') {
+ warnings.push({
+ type: 'danger',
+ title: RESTRICTION_MESSAGES.RESTRICTED.title,
+ message: RESTRICTION_MESSAGES.RESTRICTED.message,
+ link: `/org/${org?.slug}/settings/billing`,
+ })
+ }
+
+ return { warnings, org }
+}
diff --git a/apps/studio/hooks/misc/useShowLayoutHeader.ts b/apps/studio/hooks/misc/useShowLayoutHeader.ts
new file mode 100644
index 00000000000..6f531d86a88
--- /dev/null
+++ b/apps/studio/hooks/misc/useShowLayoutHeader.ts
@@ -0,0 +1,19 @@
+import { useParams } from 'common'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
+import { useRouter } from 'next/router'
+
+export function useShowLayoutHeader() {
+ const newLayoutPreview = useNewLayout()
+ const { ref } = useParams()
+ const router = useRouter()
+ const pathname = router.pathname ?? ''
+
+ const shouldShow =
+ pathname.startsWith('/new') ||
+ pathname === '/organizations' ||
+ pathname === '/sign-in' ||
+ newLayoutPreview ||
+ Boolean(ref)
+
+ return shouldShow
+}
diff --git a/apps/studio/lib/constants/index.ts b/apps/studio/lib/constants/index.ts
index 343f93a2825..e8a5d13f0f8 100644
--- a/apps/studio/lib/constants/index.ts
+++ b/apps/studio/lib/constants/index.ts
@@ -3,7 +3,7 @@
export * from './infrastructure'
export const IS_PLATFORM = process.env.NEXT_PUBLIC_IS_PLATFORM === 'true'
-export const DEFAULT_HOME = IS_PLATFORM ? '/projects' : '/project/default'
+export const DEFAULT_HOME = IS_PLATFORM ? '/organizations' : '/project/default'
export const API_URL = (() => {
// If running in platform, use API_URL from the env var
@@ -45,7 +45,6 @@ export const LOCAL_STORAGE_KEYS = {
SIDEBAR_BEHAVIOR: 'supabase-sidebar-behavior',
EDITOR_PANEL_STATE: 'supabase-editor-panel-state',
- UI_PREVIEW_NAVIGATION_LAYOUT: 'supabase-ui-preview-nav-layout',
UI_PREVIEW_API_SIDE_PANEL: 'supabase-ui-api-side-panel',
UI_PREVIEW_CLS: 'supabase-ui-cls',
UI_PREVIEW_INLINE_EDITOR: 'supabase-ui-preview-inline-editor',
@@ -53,6 +52,7 @@ export const LOCAL_STORAGE_KEYS = {
UI_TABLE_EDITOR_TABS: 'supabase-ui-table-editor-tabs',
UI_SQL_EDITOR_TABS: 'supabase-ui-sql-editor-tabs',
+ UI_NEW_LAYOUT_PREVIEW: 'supabase-ui-new-layout-preview',
SQL_SCRATCH_PAD_BANNER_ACKNOWLEDGED: 'supabase-sql-scratch-pad-banner-acknowledged',
@@ -95,12 +95,14 @@ export const LOCAL_STORAGE_KEYS = {
FLY_POSTGRES_DEPRECATION_WARNING: 'fly-postgres-deprecation-warning-dismissed',
AUTH_USERS_COLUMNS_CONFIGURATION: (ref: string) => `supabase-auth-users-columns-${ref}`,
+ STORAGE_BUCKETS_COLUMN_CONFIG: (ref: string) => `supabase-storage-buckets-columns-${ref}`,
// api keys view switcher for new and legacy api keys
API_KEYS_VIEW: (ref: string) => `supabase-api-keys-view-${ref}`,
// last visited logs page
LAST_VISITED_LOGS_PAGE: 'supabase-last-visited-logs-page',
+ LAST_VISITED_ORGANIZATION: 'last-visited-organization',
}
export const OPT_IN_TAGS = {
diff --git a/apps/studio/lib/github.tsx b/apps/studio/lib/github.tsx
index 8de3ef52368..275ac6d743e 100644
--- a/apps/studio/lib/github.tsx
+++ b/apps/studio/lib/github.tsx
@@ -65,5 +65,5 @@ export function openInstallGitHubIntegrationWindow(type: 'install' | 'authorize'
}
export const getGitHubProfileImgUrl = (username: string) => {
- return `https://github.com/${username}.png?size=80`
+ return `https://github.com/${username}.png?size=96`
}
diff --git a/apps/studio/lib/gotrue.test.ts b/apps/studio/lib/gotrue.test.ts
index 95195fec195..143983e9d9b 100644
--- a/apps/studio/lib/gotrue.test.ts
+++ b/apps/studio/lib/gotrue.test.ts
@@ -1,8 +1,8 @@
-import { validateReturnTo } from './gotrue'
+import { validateReturnTo, DEFAULT_FALLBACK_PATH } from './gotrue'
import { describe, it, expect } from 'vitest'
describe('validateReturnTo', () => {
- const fallback = '/projects'
+ const fallback = DEFAULT_FALLBACK_PATH
it('should return the path if it is a valid internal path', () => {
expect(validateReturnTo('/dashboard')).toBe('/dashboard')
diff --git a/apps/studio/lib/gotrue.ts b/apps/studio/lib/gotrue.ts
index 4ea336946f8..2b320ead7a4 100644
--- a/apps/studio/lib/gotrue.ts
+++ b/apps/studio/lib/gotrue.ts
@@ -3,7 +3,13 @@ import { getAccessToken, gotrueClient, type User } from 'common'
export const auth = gotrueClient
export { getAccessToken }
-export const validateReturnTo = (returnTo: string, fallback: string = '/projects'): string => {
+// [Joshen] We can flip this to /organizations once the new nav layout is permanent
+export const DEFAULT_FALLBACK_PATH = '/projects'
+
+export const validateReturnTo = (
+ returnTo: string,
+ fallback: string = DEFAULT_FALLBACK_PATH
+): string => {
// Block protocol-relative URLs and external URLs
if (returnTo.startsWith('//') || returnTo.includes('://')) {
return fallback
@@ -66,7 +72,7 @@ export const buildPathWithParams = (pathname: string) => {
return queryString ? `${basePath}?${queryString}` : basePath
}
-export const getReturnToPath = (fallback = '/projects') => {
+export const getReturnToPath = (fallback = DEFAULT_FALLBACK_PATH) => {
const searchParams = new URLSearchParams(location.search)
let returnTo = searchParams.get('returnTo') ?? fallback
diff --git a/apps/studio/lib/local-storage.ts b/apps/studio/lib/local-storage.ts
index 21829ad0ce0..a4e3420d9b4 100644
--- a/apps/studio/lib/local-storage.ts
+++ b/apps/studio/lib/local-storage.ts
@@ -1,5 +1,5 @@
-import { LOCAL_STORAGE_KEYS } from 'lib/constants'
import { LOCAL_STORAGE_KEYS as COMMON_LOCAL_STORAGE_KEYS } from 'common'
+import { LOCAL_STORAGE_KEYS } from 'lib/constants'
const LOCAL_STORAGE_KEYS_ALLOWLIST = [
'graphiql:theme',
@@ -9,7 +9,11 @@ const LOCAL_STORAGE_KEYS_ALLOWLIST = [
'supabase.dashboard.auth.navigatorLock.disabled',
COMMON_LOCAL_STORAGE_KEYS.TELEMETRY_CONSENT,
LOCAL_STORAGE_KEYS.UI_PREVIEW_API_SIDE_PANEL,
- LOCAL_STORAGE_KEYS.UI_PREVIEW_NAVIGATION_LAYOUT,
+ LOCAL_STORAGE_KEYS.UI_PREVIEW_INLINE_EDITOR,
+ LOCAL_STORAGE_KEYS.UI_TABLE_EDITOR_TABS,
+ LOCAL_STORAGE_KEYS.UI_SQL_EDITOR_TABS,
+ LOCAL_STORAGE_KEYS.UI_NEW_LAYOUT_PREVIEW,
+ LOCAL_STORAGE_KEYS.UI_PREVIEW_INLINE_EDITOR,
LOCAL_STORAGE_KEYS.UI_PREVIEW_CLS,
LOCAL_STORAGE_KEYS.LAST_SIGN_IN_METHOD,
]
diff --git a/apps/studio/pages/_app.tsx b/apps/studio/pages/_app.tsx
index 973b50a0bbd..f19ef04cae4 100644
--- a/apps/studio/pages/_app.tsx
+++ b/apps/studio/pages/_app.tsx
@@ -146,7 +146,6 @@ function CustomApp({ Component, pageProps }: AppPropsWithLayout) {
</ThemeProvider>
</RouteValidationWrapper>
</TooltipProvider>
-
<PageTelemetry
API_URL={API_URL}
hasAcceptedConsent={hasAcceptedConsent}
diff --git a/apps/studio/pages/account/audit.tsx b/apps/studio/pages/account/audit.tsx
index 3488b47f888..0a97eb8a3b4 100644
--- a/apps/studio/pages/account/audit.tsx
+++ b/apps/studio/pages/account/audit.tsx
@@ -1,14 +1,29 @@
import { AuditLogs } from 'components/interfaces/Account'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import AccountLayout from 'components/layouts/AccountLayout/AccountLayout'
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
+import OrganizationLayout from 'components/layouts/OrganizationLayout'
import {
ScaffoldContainer,
+ ScaffoldContainerLegacy,
ScaffoldDescription,
ScaffoldHeader,
ScaffoldTitle,
} from 'components/layouts/Scaffold'
import type { NextPageWithLayout } from 'types'
-const User: NextPageWithLayout = () => {
+const Audit: NextPageWithLayout = () => {
+ const newLayoutPreview = useNewLayout()
+
+ if (newLayoutPreview) {
+ return (
+ <ScaffoldContainerLegacy className="gap-0">
+ <AuditLogs />
+ </ScaffoldContainerLegacy>
+ )
+ }
+
return (
<ScaffoldContainer>
<ScaffoldHeader>
@@ -22,18 +37,14 @@ const User: NextPageWithLayout = () => {
)
}
-User.getLayout = (page) => (
- <AccountLayout
- title="Audit Logs"
- breadcrumbs={[
- {
- key: `supabase-settings`,
- label: 'Audit Logs',
- },
- ]}
- >
- {page}
- </AccountLayout>
+Audit.getLayout = (page) => (
+ <AppLayout>
+ <DefaultLayout headerTitle="Account">
+ <OrganizationLayout>
+ <AccountLayout title="Audit Logs">{page}</AccountLayout>
+ </OrganizationLayout>
+ </DefaultLayout>
+ </AppLayout>
)
-export default User
+export default Audit
diff --git a/apps/studio/pages/account/me.tsx b/apps/studio/pages/account/me.tsx
index fb8cf59bda6..539dd4e13ea 100644
--- a/apps/studio/pages/account/me.tsx
+++ b/apps/studio/pages/account/me.tsx
@@ -3,7 +3,12 @@ import { AccountIdentities } from 'components/interfaces/Account/Preferences/Acc
import { AnalyticsSettings } from 'components/interfaces/Account/Preferences/AnalyticsSettings'
import { ProfileInformation } from 'components/interfaces/Account/Preferences/ProfileInformation'
import { ThemeSettings } from 'components/interfaces/Account/Preferences/ThemeSettings'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import AccountLayout from 'components/layouts/AccountLayout/AccountLayout'
+import AccountSettingsLayout from 'components/layouts/AccountLayout/AccountSettingsLayout'
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
+import OrganizationLayout from 'components/layouts/OrganizationLayout'
import {
ScaffoldContainer,
ScaffoldDescription,
@@ -18,6 +23,12 @@ import { useProfile } from 'lib/profile'
import type { NextPageWithLayout } from 'types'
const User: NextPageWithLayout = () => {
+ const newLayoutPreview = useNewLayout()
+
+ if (newLayoutPreview) {
+ return <ProfileCard />
+ }
+
return (
<ScaffoldContainer>
<ScaffoldHeader>
@@ -32,17 +43,15 @@ const User: NextPageWithLayout = () => {
}
User.getLayout = (page) => (
- <AccountLayout
- title="Preferences"
- breadcrumbs={[
- {
- key: `supabase-settings`,
- label: 'Preferences',
- },
- ]}
- >
- {page}
- </AccountLayout>
+ <AppLayout>
+ <DefaultLayout headerTitle="Account">
+ <OrganizationLayout>
+ <AccountLayout title="Preferences">
+ <AccountSettingsLayout>{page}</AccountSettingsLayout>
+ </AccountLayout>
+ </OrganizationLayout>
+ </DefaultLayout>
+ </AppLayout>
)
export default User
diff --git a/apps/studio/pages/account/security.tsx b/apps/studio/pages/account/security.tsx
index 17f7fd200c8..a7c3d554c0f 100644
--- a/apps/studio/pages/account/security.tsx
+++ b/apps/studio/pages/account/security.tsx
@@ -1,7 +1,12 @@
import { Smartphone } from 'lucide-react'
import { TOTPFactors } from 'components/interfaces/Account'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import AccountLayout from 'components/layouts/AccountLayout/AccountLayout'
+import AccountSettingsLayout from 'components/layouts/AccountLayout/AccountSettingsLayout'
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
+import OrganizationLayout from 'components/layouts/OrganizationLayout'
import {
ScaffoldContainer,
ScaffoldDescription,
@@ -10,12 +15,18 @@ import {
} from 'components/layouts/Scaffold'
import { useMfaListFactorsQuery } from 'data/profile/mfa-list-factors-query'
import type { NextPageWithLayout } from 'types'
-import { Badge, cn, Collapsible } from 'ui'
+import {
+ Badge,
+ cn,
+ Collapsible_Shadcn_,
+ CollapsibleContent_Shadcn_,
+ CollapsibleTrigger_Shadcn_,
+} from 'ui'
const collapsibleClasses = [
'bg-surface-100',
- 'hover:bg-overlay-hover',
- 'data-open:bg-selection',
+ 'hover:bg-surface-200',
+ 'data-open:bg-surface-200',
'border-default',
'hover:border-strong data-open:border-strong',
'data-open:pb-px col-span-12 rounded',
@@ -26,8 +37,38 @@ const collapsibleClasses = [
]
const Security: NextPageWithLayout = () => {
+ const newLayoutPreview = useNewLayout()
const { data } = useMfaListFactorsQuery()
+ const PageContent = () => (
+ <Collapsible_Shadcn_ className={cn(collapsibleClasses)}>
+ <CollapsibleTrigger_Shadcn_ asChild>
+ <button
+ type="button"
+ className="group flex w-full items-center justify-between rounded py-3 px-4 md:px-6 text-foreground"
+ >
+ <div className="flex flex-row gap-4 items-center py-1">
+ <Smartphone strokeWidth={1.5} />
+ <span className="text-sm">Authenticator app</span>
+ </div>
+
+ {data ? (
+ <Badge variant={data.totp.length === 0 ? 'default' : 'brand'}>
+ {data.totp.length} app{data.totp.length === 1 ? '' : 's'} configured
+ </Badge>
+ ) : null}
+ </button>
+ </CollapsibleTrigger_Shadcn_>
+ <CollapsibleContent_Shadcn_ className="group border-t border-default bg-surface-100 py-6 px-4 md:px-6 text-foreground">
+ <TOTPFactors />
+ </CollapsibleContent_Shadcn_>
+ </Collapsible_Shadcn_>
+ )
+
+ if (newLayoutPreview) {
+ return <PageContent />
+ }
+
return (
<ScaffoldContainer>
<ScaffoldHeader>
@@ -37,36 +78,21 @@ const Security: NextPageWithLayout = () => {
to sign in.
</ScaffoldDescription>
</ScaffoldHeader>
- <Collapsible className={cn(collapsibleClasses)}>
- <Collapsible.Trigger asChild>
- <button
- type="button"
- className="group flex w-full items-center justify-between rounded py-3 px-4 md:px-6 text-foreground"
- >
- <div className="flex flex-row gap-4 items-center py-1">
- <Smartphone strokeWidth={1.5} />
- <span className="text-sm">Authenticator app</span>
- </div>
-
- {data ? (
- <Badge variant={data.totp.length === 0 ? 'default' : 'brand'}>
- {data.totp.length} app{data.totp.length === 1 ? '' : 's'} configured
- </Badge>
- ) : null}
- </button>
- </Collapsible.Trigger>
- <Collapsible.Content className="group border-t border-default bg-surface-100 py-6 px-4 md:px-6 text-foreground">
- <TOTPFactors />
- </Collapsible.Content>
- </Collapsible>
+ <PageContent />
</ScaffoldContainer>
)
}
Security.getLayout = (page) => (
- <AccountLayout title="Security" breadcrumbs={[{ key: 'security', label: 'Security' }]}>
- {page}
- </AccountLayout>
+ <AppLayout>
+ <DefaultLayout headerTitle="Account">
+ <OrganizationLayout>
+ <AccountLayout title="Security">
+ <AccountSettingsLayout>{page}</AccountSettingsLayout>
+ </AccountLayout>
+ </OrganizationLayout>
+ </DefaultLayout>
+ </AppLayout>
)
export default Security
diff --git a/apps/studio/pages/account/tokens.tsx b/apps/studio/pages/account/tokens.tsx
index 7c91b9a8cc4..23999adbb76 100644
--- a/apps/studio/pages/account/tokens.tsx
+++ b/apps/studio/pages/account/tokens.tsx
@@ -7,7 +7,12 @@ import {
NewAccessTokenButton,
NewTokenBanner,
} from 'components/interfaces/Account'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import AccountLayout from 'components/layouts/AccountLayout/AccountLayout'
+import AccountSettingsLayout from 'components/layouts/AccountLayout/AccountSettingsLayout'
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
+import OrganizationLayout from 'components/layouts/OrganizationLayout'
import {
ScaffoldContainer,
ScaffoldDescription,
@@ -20,16 +25,57 @@ import { Button } from 'ui'
import { Admonition } from 'ui-patterns'
const UserAccessTokens: NextPageWithLayout = () => {
+ const newLayoutPreview = useNewLayout()
const [newToken, setNewToken] = useState<NewAccessToken | undefined>()
+ const PageContent = () => (
+ <>
+ <div className="flex items-center justify-between">
+ <Admonition
+ type="warning"
+ title="Personal access tokens can be used to control your whole account and use features added in the future. Be careful when sharing them!"
+ className="mb-6 w-full"
+ />
+ </div>
+ <div className="space-y-4">
+ {newToken && <NewTokenBanner token={newToken} />}
+ <AccessTokenList />
+ </div>
+ </>
+ )
+
+ if (newLayoutPreview) {
+ return (
+ <>
+ <div className="flex items-center space-x-4 mb-6">
+ <div className="flex items-center space-x-2">
+ <Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}>
+ <Link
+ href="https://supabase.com/docs/reference/api/introduction"
+ target="_blank"
+ rel="noreferrer"
+ >
+ API Docs
+ </Link>
+ </Button>
+ <Button asChild type="default" icon={<ExternalLink strokeWidth={1.5} />}>
+ <Link
+ href="https://supabase.com/docs/reference/cli/start"
+ target="_blank"
+ rel="noreferrer"
+ >
+ CLI docs
+ </Link>
+ </Button>
+ </div>
+ <NewAccessTokenButton onCreateToken={setNewToken} />
+ </div>
+ <PageContent />
+ </>
+ )
+ }
+
return (
- // <div className="1xl:px-28 mx-auto flex flex-col px-5 pt-6 pb-14 lg:px-16 xl:px-24 2xl:px-32">
- // <div className="flex flex-col md:flex-row md:items-center justify-between">
- // <div>
- // <FormHeader
- // title="Access Tokens"
- // description="Personal access tokens can be used with our Management API or CLI."
- // />
<ScaffoldContainer>
<ScaffoldHeader className="flex flex-col md:flex-row md:items-center justify-between">
<div className="flex flex-col">
@@ -62,30 +108,21 @@ const UserAccessTokens: NextPageWithLayout = () => {
<NewAccessTokenButton onCreateToken={setNewToken} />
</div>
</ScaffoldHeader>
- <div className="flex flex-col">
- <div className="flex items-center justify-between">
- <Admonition
- type="warning"
- title="Personal access tokens can be used to control your whole account and use features added in the future. Be careful when sharing them!"
- className="mb-6 w-full"
- />
- </div>
- <div className="space-y-4">
- {newToken && <NewTokenBanner token={newToken} />}
- <AccessTokenList />
- </div>
- </div>
+ <PageContent />
</ScaffoldContainer>
)
}
UserAccessTokens.getLayout = (page) => (
- <AccountLayout
- title="Access Tokens"
- breadcrumbs={[{ key: 'supabase-account-tokens', label: 'Access Tokens' }]}
- >
- {page}
- </AccountLayout>
+ <AppLayout>
+ <DefaultLayout headerTitle="Account">
+ <OrganizationLayout>
+ <AccountLayout title="Access Tokens">
+ <AccountSettingsLayout>{page}</AccountSettingsLayout>
+ </AccountLayout>
+ </OrganizationLayout>
+ </DefaultLayout>
+ </AppLayout>
)
export default UserAccessTokens
diff --git a/apps/studio/pages/new/[slug].tsx b/apps/studio/pages/new/[slug].tsx
index 9872032be75..728eeee56f4 100644
--- a/apps/studio/pages/new/[slug].tsx
+++ b/apps/studio/pages/new/[slug].tsx
@@ -25,6 +25,7 @@ import { SPECIAL_CHARS_REGEX } from 'components/interfaces/ProjectCreation/Proje
import { RegionSelector } from 'components/interfaces/ProjectCreation/RegionSelector'
import { SecurityOptions } from 'components/interfaces/ProjectCreation/SecurityOptions'
import { SpecialSymbolsCallout } from 'components/interfaces/ProjectCreation/SpecialSymbolsCallout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import { WizardLayoutWithoutAuth } from 'components/layouts/WizardLayout'
import DisabledWarningDueToIncident from 'components/ui/DisabledWarningDueToIncident'
import Panel from 'components/ui/Panel'
@@ -1016,6 +1017,10 @@ const PageLayout = withAuth(({ children }: PropsWithChildren) => {
)
})
-Wizard.getLayout = (page) => <PageLayout>{page}</PageLayout>
+Wizard.getLayout = (page) => (
+ <DefaultLayout headerTitle="New project">
+ <PageLayout>{page}</PageLayout>
+ </DefaultLayout>
+)
export default Wizard
diff --git a/apps/studio/pages/new/index.tsx b/apps/studio/pages/new/index.tsx
index f4c542af089..1423e3cbcf2 100644
--- a/apps/studio/pages/new/index.tsx
+++ b/apps/studio/pages/new/index.tsx
@@ -5,6 +5,8 @@ import { useTheme } from 'next-themes'
import { useCallback, useEffect, useState } from 'react'
import { NewOrgForm } from 'components/interfaces/Organization'
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import WizardLayout from 'components/layouts/WizardLayout'
import { SetupIntentResponse, useSetupIntent } from 'data/stripe/setup-intent-mutation'
import { STRIPE_PUBLIC_KEY } from 'lib/constants'
@@ -104,9 +106,13 @@ const Wizard: NextPageWithLayout = () => {
}
Wizard.getLayout = (page) => (
- <WizardLayout organization={null} project={null}>
- {page}
- </WizardLayout>
+ <AppLayout>
+ <DefaultLayout headerTitle="New organization">
+ <WizardLayout organization={null} project={null}>
+ {page}
+ </WizardLayout>
+ </DefaultLayout>
+ </AppLayout>
)
export default Wizard
diff --git a/apps/studio/pages/org/[slug]/apps.tsx b/apps/studio/pages/org/[slug]/apps.tsx
index a55c7f12381..757bba2adbf 100644
--- a/apps/studio/pages/org/[slug]/apps.tsx
+++ b/apps/studio/pages/org/[slug]/apps.tsx
@@ -1,5 +1,7 @@
import { OAuthApps } from 'components/interfaces/Organization'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import OrganizationLayout from 'components/layouts/OrganizationLayout'
+import OrganizationSettingsLayout from 'components/layouts/ProjectLayout/OrganizationSettingsLayout'
import { Loading } from 'components/ui/Loading'
import { usePermissionsQuery } from 'data/permissions/permissions-query'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
@@ -14,5 +16,11 @@ const OrgOAuthApps: NextPageWithLayout = () => {
)
}
-OrgOAuthApps.getLayout = (page) => <OrganizationLayout>{page}</OrganizationLayout>
+OrgOAuthApps.getLayout = (page) => (
+ <DefaultLayout>
+ <OrganizationLayout>
+ <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout>
+ </OrganizationLayout>
+ </DefaultLayout>
+)
export default OrgOAuthApps
diff --git a/apps/studio/pages/org/[slug]/audit.tsx b/apps/studio/pages/org/[slug]/audit.tsx
index a17fb771d99..b89da68c278 100644
--- a/apps/studio/pages/org/[slug]/audit.tsx
+++ b/apps/studio/pages/org/[slug]/audit.tsx
@@ -1,5 +1,8 @@
import { AuditLogs } from 'components/interfaces/Organization'
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import OrganizationLayout from 'components/layouts/OrganizationLayout'
+import OrganizationSettingsLayout from 'components/layouts/ProjectLayout/OrganizationSettingsLayout'
import { Loading } from 'components/ui/Loading'
import { usePermissionsQuery } from 'data/permissions/permissions-query'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
@@ -14,5 +17,11 @@ const OrgAuditLogs: NextPageWithLayout = () => {
)
}
-OrgAuditLogs.getLayout = (page) => <OrganizationLayout>{page}</OrganizationLayout>
+OrgAuditLogs.getLayout = (page) => (
+ <DefaultLayout>
+ <OrganizationLayout>
+ <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout>
+ </OrganizationLayout>
+ </DefaultLayout>
+)
export default OrgAuditLogs
diff --git a/apps/studio/pages/org/[slug]/billing.tsx b/apps/studio/pages/org/[slug]/billing.tsx
index cd388ee41a1..c0abd1ebcfc 100644
--- a/apps/studio/pages/org/[slug]/billing.tsx
+++ b/apps/studio/pages/org/[slug]/billing.tsx
@@ -1,6 +1,9 @@
import { useParams } from 'common'
import { BillingSettings } from 'components/interfaces/Organization'
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import OrganizationLayout from 'components/layouts/OrganizationLayout'
+import OrganizationSettingsLayout from 'components/layouts/ProjectLayout/OrganizationSettingsLayout'
import { Loading } from 'components/ui/Loading'
import { usePermissionsQuery } from 'data/permissions/permissions-query'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
@@ -37,5 +40,11 @@ const OrgBillingSettings: NextPageWithLayout = () => {
)
}
-OrgBillingSettings.getLayout = (page) => <OrganizationLayout>{page}</OrganizationLayout>
+OrgBillingSettings.getLayout = (page) => (
+ <DefaultLayout>
+ <OrganizationLayout>
+ <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout>
+ </OrganizationLayout>
+ </DefaultLayout>
+)
export default OrgBillingSettings
diff --git a/apps/studio/pages/org/[slug]/documents.tsx b/apps/studio/pages/org/[slug]/documents.tsx
index 320da35528d..829b83ba8d7 100644
--- a/apps/studio/pages/org/[slug]/documents.tsx
+++ b/apps/studio/pages/org/[slug]/documents.tsx
@@ -1,11 +1,20 @@
import { Documents } from 'components/interfaces/Organization'
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import OrganizationLayout from 'components/layouts/OrganizationLayout'
+import OrganizationSettingsLayout from 'components/layouts/ProjectLayout/OrganizationSettingsLayout'
import type { NextPageWithLayout } from 'types'
const OrgDocuments: NextPageWithLayout = () => {
return <Documents />
}
-OrgDocuments.getLayout = (page) => <OrganizationLayout>{page}</OrganizationLayout>
+OrgDocuments.getLayout = (page) => (
+ <DefaultLayout>
+ <OrganizationLayout>
+ <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout>
+ </OrganizationLayout>
+ </DefaultLayout>
+)
export default OrgDocuments
diff --git a/apps/studio/pages/org/[slug]/general.tsx b/apps/studio/pages/org/[slug]/general.tsx
index b1637512ee6..8e1ec1bea5e 100644
--- a/apps/studio/pages/org/[slug]/general.tsx
+++ b/apps/studio/pages/org/[slug]/general.tsx
@@ -1,5 +1,8 @@
import { GeneralSettings as GeneralSettingsLegacy } from 'components/interfaces/Organization'
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import OrganizationLayout from 'components/layouts/OrganizationLayout'
+import OrganizationSettingsLayout from 'components/layouts/ProjectLayout/OrganizationSettingsLayout'
import { Loading } from 'components/ui/Loading'
import { usePermissionsQuery } from 'data/permissions/permissions-query'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
@@ -20,5 +23,11 @@ const OrgGeneralSettings: NextPageWithLayout = () => {
)
}
-OrgGeneralSettings.getLayout = (page) => <OrganizationLayout>{page}</OrganizationLayout>
+OrgGeneralSettings.getLayout = (page) => (
+ <DefaultLayout>
+ <OrganizationLayout>
+ <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout>
+ </OrganizationLayout>
+ </DefaultLayout>
+)
export default OrgGeneralSettings
diff --git a/apps/studio/pages/org/[slug]/index.tsx b/apps/studio/pages/org/[slug]/index.tsx
index 651355d857b..8e6dbeaeee5 100644
--- a/apps/studio/pages/org/[slug]/index.tsx
+++ b/apps/studio/pages/org/[slug]/index.tsx
@@ -1,118 +1,65 @@
-import { Plus } from 'lucide-react'
-import Link from 'next/link'
+import { useRouter } from 'next/router'
+import { useEffect, useState } from 'react'
-import { NoProjectsOnPaidOrgInfo } from 'components/interfaces/Billing/NoProjectsOnPaidOrgInfo'
-import ProjectCard from 'components/interfaces/Home/ProjectList/ProjectCard'
-import ShimmeringCard from 'components/interfaces/Home/ProjectList/ShimmeringCard'
-import AppLayout from 'components/layouts/AppLayout/AppLayout'
-import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
-import AlertError from 'components/ui/AlertError'
-import { useGitHubConnectionsQuery } from 'data/integrations/github-connections-query'
-import { useOrgIntegrationsQuery } from 'data/integrations/integrations-query-org-only'
-import { useProjectsQuery } from 'data/projects/projects-query'
-import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
+import { useParams } from 'common'
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
+import { ProjectList } from 'components/interfaces/Home/ProjectList'
+import HomePageActions from 'components/interfaces/HomePageActions'
+import DefaultLayout from 'components/layouts/DefaultLayout'
+import OrganizationLayout from 'components/layouts/OrganizationLayout'
+import { ScaffoldContainerLegacy } from 'components/layouts/Scaffold'
+import { useAutoProjectsPrefetch } from 'data/projects/projects-query'
+import { PROJECT_STATUS } from 'lib/constants'
import type { NextPageWithLayout } from 'types'
-import { Button } from 'ui'
const ProjectsPage: NextPageWithLayout = () => {
- const {
- data: allProjects,
- error: projectsError,
- isLoading: isLoadingProjects,
- isError: isErrorProjects,
- isSuccess: isSuccessProjects,
- } = useProjectsQuery()
+ const newLayoutPreview = useNewLayout()
+ const hasWindowLoaded = typeof window !== 'undefined'
- const organization = useSelectedOrganization()
- const projects = allProjects
- ?.filter((project) => project.organization_id === organization?.id)
- .sort((a, b) => a.name.localeCompare(b.name))
+ const router = useRouter()
+ const { slug } = useParams()
+ const [search, setSearch] = useState('')
+ const [filterStatus, setFilterStatus] = useState<string[]>([
+ PROJECT_STATUS.ACTIVE_HEALTHY,
+ PROJECT_STATUS.INACTIVE,
+ ])
- const { data: integrations } = useOrgIntegrationsQuery({ orgSlug: organization?.slug })
- const { data: connections } = useGitHubConnectionsQuery({ organizationId: organization?.id })
- const githubConnections = connections?.map((connection) => ({
- id: String(connection.id),
- added_by: {
- id: String(connection.user?.id),
- primary_email: connection.user?.primary_email ?? '',
- username: connection.user?.username ?? '',
- },
- foreign_project_id: String(connection.repository.id),
- supabase_project_ref: connection.project.ref,
- organization_integration_id: 'unused',
- inserted_at: connection.inserted_at,
- updated_at: connection.updated_at,
- metadata: {
- name: connection.repository.name,
- } as any,
- }))
- const vercelConnections = integrations
- ?.filter((integration) => integration.integration.name === 'Vercel')
- .flatMap((integration) => integration.connections)
+ useAutoProjectsPrefetch()
- return (
- <ScaffoldContainer className="h-full overflow-y-auto">
- <ScaffoldSection>
- <div className="col-span-12 space-y-8">
- <NoProjectsOnPaidOrgInfo organization={organization} />
+ useEffect(() => {
+ // handle old layout redirect
+ // this page should not be accessible in the old layout
+ if (hasWindowLoaded && !newLayoutPreview && slug && router) {
+ router.push(`/projects`)
+ }
+ }, [newLayoutPreview, router, slug])
- <div>
- <Button asChild size="medium" type="default" iconRight={<Plus />}>
- <Link href={`/new/${organization?.slug}`}>New project</Link>
- </Button>
- </div>
- <div className="space-y-4">
- <h4 className="text-lg">Projects</h4>
- {isLoadingProjects && (
- <ul className="mx-auto grid grid-cols-1 gap-4 sm:grid-cols-1 md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3">
- <ShimmeringCard />
- <ShimmeringCard />
- </ul>
- )}
- {isErrorProjects && (
- <AlertError error={projectsError} subject="Failed to retrieve projects" />
- )}
- {isSuccessProjects && (
- <>
- {(projects?.length ?? 0) === 0 ? (
- <div className="col-span-4 space-y-4 rounded-lg border border-muted border-dashed p-6 text-center">
- <div className="space-y-1">
- <p>No projects</p>
- <p className="text-sm text-foreground-light">
- Get started by creating a new project.
- </p>
- </div>
- <div>
- <Button asChild icon={<Plus />}>
- <Link href={`/new/${organization?.slug}`}>New Project</Link>
- </Button>
- </div>
- </div>
- ) : (
- <ul className="mx-auto grid grid-cols-1 gap-4 sm:grid-cols-1 md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3">
- {projects?.map((project) => (
- <ProjectCard
- key={project.ref}
- project={project}
- githubIntegration={githubConnections?.find(
- (connection) => connection.supabase_project_ref === project.ref
- )}
- vercelIntegration={vercelConnections?.find(
- (connection) => connection.supabase_project_ref === project.ref
- )}
- />
- ))}
- </ul>
- )}
- </>
- )}
- </div>
+ return (
+ <ScaffoldContainerLegacy>
+ <div>
+ <HomePageActions
+ search={search}
+ setSearch={setSearch}
+ filterStatus={filterStatus}
+ setFilterStatus={setFilterStatus}
+ />
+ <div className="my-6 space-y-8">
+ <ProjectList
+ filterToSlug
+ search={search}
+ filterStatus={filterStatus}
+ resetFilterStatus={() => setFilterStatus(['ACTIVE_HEALTHY', 'INACTIVE'])}
+ />
</div>
- </ScaffoldSection>
- </ScaffoldContainer>
+ </div>
+ </ScaffoldContainerLegacy>
)
}
-ProjectsPage.getLayout = (page) => <AppLayout>{page}</AppLayout>
+ProjectsPage.getLayout = (page) => (
+ <DefaultLayout>
+ <OrganizationLayout>{page}</OrganizationLayout>
+ </DefaultLayout>
+)
export default ProjectsPage
diff --git a/apps/studio/pages/org/[slug]/integrations.tsx b/apps/studio/pages/org/[slug]/integrations.tsx
index c7aeac71f07..39964b49f0e 100644
--- a/apps/studio/pages/org/[slug]/integrations.tsx
+++ b/apps/studio/pages/org/[slug]/integrations.tsx
@@ -1,11 +1,20 @@
import { IntegrationSettings } from 'components/interfaces/Organization'
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import OrganizationLayout from 'components/layouts/OrganizationLayout'
+import OrganizationSettingsLayout from 'components/layouts/ProjectLayout/OrganizationSettingsLayout'
import type { NextPageWithLayout } from 'types'
const OrgIntegrationSettings: NextPageWithLayout = () => {
return <IntegrationSettings />
}
-OrgIntegrationSettings.getLayout = (page) => <OrganizationLayout>{page}</OrganizationLayout>
+OrgIntegrationSettings.getLayout = (page) => (
+ <DefaultLayout>
+ <OrganizationLayout>
+ <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout>
+ </OrganizationLayout>
+ </DefaultLayout>
+)
export default OrgIntegrationSettings
diff --git a/apps/studio/pages/org/[slug]/invoices.tsx b/apps/studio/pages/org/[slug]/invoices.tsx
index 9797b096305..87e13f3c536 100644
--- a/apps/studio/pages/org/[slug]/invoices.tsx
+++ b/apps/studio/pages/org/[slug]/invoices.tsx
@@ -1,5 +1,8 @@
import { InvoicesSettings } from 'components/interfaces/Organization'
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import OrganizationLayout from 'components/layouts/OrganizationLayout'
+import OrganizationSettingsLayout from 'components/layouts/ProjectLayout/OrganizationSettingsLayout'
import { Loading } from 'components/ui/Loading'
import { usePermissionsQuery } from 'data/permissions/permissions-query'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
@@ -20,5 +23,11 @@ const OrgInvoices: NextPageWithLayout = () => {
)
}
-OrgInvoices.getLayout = (page) => <OrganizationLayout>{page}</OrganizationLayout>
+OrgInvoices.getLayout = (page) => (
+ <DefaultLayout>
+ <OrganizationLayout>
+ <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout>
+ </OrganizationLayout>
+ </DefaultLayout>
+)
export default OrgInvoices
diff --git a/apps/studio/pages/org/[slug]/team.tsx b/apps/studio/pages/org/[slug]/team.tsx
index 9e50467746a..f3b16d5fb27 100644
--- a/apps/studio/pages/org/[slug]/team.tsx
+++ b/apps/studio/pages/org/[slug]/team.tsx
@@ -1,5 +1,8 @@
import { TeamSettings } from 'components/interfaces/Organization'
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import OrganizationLayout from 'components/layouts/OrganizationLayout'
+import OrganizationSettingsLayout from 'components/layouts/ProjectLayout/OrganizationSettingsLayout'
import { Loading } from 'components/ui/Loading'
import { usePermissionsQuery } from 'data/permissions/permissions-query'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
@@ -16,5 +19,11 @@ const OrgTeamSettings: NextPageWithLayout = () => {
)
}
-OrgTeamSettings.getLayout = (page) => <OrganizationLayout>{page}</OrganizationLayout>
+OrgTeamSettings.getLayout = (page) => (
+ <DefaultLayout>
+ <OrganizationLayout>
+ <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout>
+ </OrganizationLayout>
+ </DefaultLayout>
+)
export default OrgTeamSettings
diff --git a/apps/studio/pages/org/[slug]/usage.tsx b/apps/studio/pages/org/[slug]/usage.tsx
index b7238ca3ab6..277e8b8e931 100644
--- a/apps/studio/pages/org/[slug]/usage.tsx
+++ b/apps/studio/pages/org/[slug]/usage.tsx
@@ -1,5 +1,8 @@
import { Usage } from 'components/interfaces/Organization'
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import OrganizationLayout from 'components/layouts/OrganizationLayout'
+import OrganizationSettingsLayout from 'components/layouts/ProjectLayout/OrganizationSettingsLayout'
import { Loading } from 'components/ui/Loading'
import { usePermissionsQuery } from 'data/permissions/permissions-query'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
@@ -12,6 +15,12 @@ const OrgUsage: NextPageWithLayout = () => {
return <>{selectedOrganization === undefined && isLoadingPermissions ? <Loading /> : <Usage />}</>
}
-OrgUsage.getLayout = (page) => <OrganizationLayout>{page}</OrganizationLayout>
+OrgUsage.getLayout = (page) => (
+ <DefaultLayout>
+ <OrganizationLayout>
+ <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout>
+ </OrganizationLayout>
+ </DefaultLayout>
+)
export default OrgUsage
diff --git a/apps/studio/pages/organizations.tsx b/apps/studio/pages/organizations.tsx
new file mode 100644
index 00000000000..24c12ddc4c4
--- /dev/null
+++ b/apps/studio/pages/organizations.tsx
@@ -0,0 +1,55 @@
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
+import { ScaffoldContainerLegacy, ScaffoldTitle } from 'components/layouts/Scaffold'
+import { useOrganizationsQuery } from 'data/organizations/organizations-query'
+import { useRouter } from 'next/router'
+import { NextPageWithLayout } from 'types'
+
+import { ActionCard } from 'components/ui/ActionCard'
+import { Boxes } from 'lucide-react'
+import { Skeleton } from 'ui'
+
+const OrganizationsPage: NextPageWithLayout = () => {
+ const router = useRouter()
+ const { data: organizations, isLoading, error } = useOrganizationsQuery()
+
+ return (
+ <>
+ <ScaffoldContainerLegacy>
+ <ScaffoldTitle>Your Organizations</ScaffoldTitle>
+ </ScaffoldContainerLegacy>
+ <ScaffoldContainerLegacy>
+ <div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
+ {isLoading ? (
+ <>
+ <Skeleton className="h-[62px] rounded-md" />
+ <Skeleton className="h-[62px] rounded-md" />
+ <Skeleton className="h-[62px] rounded-md" />
+ </>
+ ) : error ? (
+ <div>Error loading organizations</div>
+ ) : (
+ organizations?.map((organization) => (
+ <ActionCard
+ bgColor="bg border"
+ className="[&>div]:items-center"
+ key={organization.id}
+ icon={<Boxes size={18} strokeWidth={1} className="text-foreground" />}
+ title={organization.name}
+ onClick={() => router.push(`/org/${organization.slug}`)}
+ />
+ ))
+ )}
+ </div>
+ </ScaffoldContainerLegacy>
+ </>
+ )
+}
+
+OrganizationsPage.getLayout = (page) => (
+ <AppLayout>
+ <DefaultLayout headerTitle="Organizations">{page}</DefaultLayout>
+ </AppLayout>
+)
+
+export default OrganizationsPage
diff --git a/apps/studio/pages/project/[ref]/auth/advanced.tsx b/apps/studio/pages/project/[ref]/auth/advanced.tsx
index f6a0ef0340f..3bf49e11668 100644
--- a/apps/studio/pages/project/[ref]/auth/advanced.tsx
+++ b/apps/studio/pages/project/[ref]/auth/advanced.tsx
@@ -1,7 +1,5 @@
import { PermissionAction } from '@supabase/shared-types/out/constants'
-import { ReactNode } from 'react'
-import { useParams } from 'common'
import { AdvancedAuthSettingsForm } from 'components/interfaces/Auth/AdvancedAuthSettingsForm'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
@@ -12,24 +10,6 @@ import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useCheckPermissions, usePermissionsLoaded } from 'hooks/misc/useCheckPermissions'
import type { NextPageWithLayout } from 'types'
-interface AdvancedLayoutProps {
- children: ReactNode
-}
-
-export const AdvancedLayout = ({ children }: AdvancedLayoutProps) => {
- const { ref } = useParams()
-
- return (
- <DefaultLayout>
- <AuthLayout>
- <PageLayout title="Advanced" subtitle="Configure advanced authentication server settings">
- {children}
- </PageLayout>
- </AuthLayout>
- </DefaultLayout>
- )
-}
-
const AdvancedPage: NextPageWithLayout = () => {
const isPermissionsLoaded = usePermissionsLoaded()
const canReadAuthSettings = useCheckPermissions(PermissionAction.READ, 'custom_config_gotrue')
@@ -51,6 +31,14 @@ const AdvancedPage: NextPageWithLayout = () => {
)
}
-AdvancedPage.getLayout = (page) => <AdvancedLayout>{page}</AdvancedLayout>
+AdvancedPage.getLayout = (page) => (
+ <DefaultLayout>
+ <AuthLayout>
+ <PageLayout title="Advanced" subtitle="Configure advanced authentication server settings">
+ {page}
+ </PageLayout>
+ </AuthLayout>
+ </DefaultLayout>
+)
export default AdvancedPage
diff --git a/apps/studio/pages/project/[ref]/auth/hooks.tsx b/apps/studio/pages/project/[ref]/auth/hooks.tsx
index e3725985bf4..09215e8aa33 100644
--- a/apps/studio/pages/project/[ref]/auth/hooks.tsx
+++ b/apps/studio/pages/project/[ref]/auth/hooks.tsx
@@ -1,5 +1,4 @@
import { PermissionAction } from '@supabase/shared-types/out/constants'
-import { ReactNode } from 'react'
import { HooksListing } from 'components/interfaces/Auth/Hooks/HooksListing'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
@@ -10,25 +9,6 @@ import NoPermission from 'components/ui/NoPermission'
import { useCheckPermissions, usePermissionsLoaded } from 'hooks/misc/useCheckPermissions'
import type { NextPageWithLayout } from 'types'
-interface HooksLayoutProps {
- children: ReactNode
-}
-
-export const HooksLayout = ({ children }: HooksLayoutProps) => {
- return (
- <DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="Auth Hooks"
- subtitle="Use Postgres functions or HTTP endpoints to customize the behavior of Supabase Auth to meet your needs"
- >
- {children}
- </PageLayout>
- </AuthLayout>
- </DefaultLayout>
- )
-}
-
const Hooks: NextPageWithLayout = () => {
const canReadAuthSettings = useCheckPermissions(PermissionAction.READ, 'custom_config_gotrue')
const isPermissionsLoaded = usePermissionsLoaded()
@@ -44,6 +24,17 @@ const Hooks: NextPageWithLayout = () => {
)
}
-Hooks.getLayout = (page) => <HooksLayout>{page}</HooksLayout>
+Hooks.getLayout = (page) => (
+ <DefaultLayout>
+ <AuthLayout>
+ <PageLayout
+ title="Auth Hooks"
+ subtitle="Use Postgres functions or HTTP endpoints to customize the behavior of Supabase Auth to meet your needs"
+ >
+ {page}
+ </PageLayout>
+ </AuthLayout>
+ </DefaultLayout>
+)
export default Hooks
diff --git a/apps/studio/pages/project/[ref]/auth/mfa.tsx b/apps/studio/pages/project/[ref]/auth/mfa.tsx
index 6d16f76bcb1..cbe50b1ff0e 100644
--- a/apps/studio/pages/project/[ref]/auth/mfa.tsx
+++ b/apps/studio/pages/project/[ref]/auth/mfa.tsx
@@ -1,5 +1,4 @@
import { PermissionAction } from '@supabase/shared-types/out/constants'
-import { ReactNode } from 'react'
import { MfaAuthSettingsForm } from 'components/interfaces/Auth'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
@@ -11,25 +10,6 @@ import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useCheckPermissions, usePermissionsLoaded } from 'hooks/misc/useCheckPermissions'
import type { NextPageWithLayout } from 'types'
-interface MfaLayoutProps {
- children: ReactNode
-}
-
-export const MfaLayout = ({ children }: MfaLayoutProps) => {
- return (
- <DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="Multi-Factor Authentication (MFA)"
- subtitle="Requires users to provide additional verification factors to authenticate"
- >
- {children}
- </PageLayout>
- </AuthLayout>
- </DefaultLayout>
- )
-}
-
const MfaPage: NextPageWithLayout = () => {
const isPermissionsLoaded = usePermissionsLoaded()
const canReadAuthSettings = useCheckPermissions(PermissionAction.READ, 'custom_config_gotrue')
@@ -45,6 +25,17 @@ const MfaPage: NextPageWithLayout = () => {
)
}
-MfaPage.getLayout = (page) => <MfaLayout>{page}</MfaLayout>
+MfaPage.getLayout = (page) => (
+ <DefaultLayout>
+ <AuthLayout>
+ <PageLayout
+ title="Multi-Factor Authentication (MFA)"
+ subtitle="Requires users to provide additional verification factors to authenticate"
+ >
+ {page}
+ </PageLayout>
+ </AuthLayout>
+ </DefaultLayout>
+)
export default MfaPage
diff --git a/apps/studio/pages/project/[ref]/auth/protection.tsx b/apps/studio/pages/project/[ref]/auth/protection.tsx
index e4dea43e4c8..9751d097520 100644
--- a/apps/studio/pages/project/[ref]/auth/protection.tsx
+++ b/apps/studio/pages/project/[ref]/auth/protection.tsx
@@ -1,7 +1,5 @@
import { PermissionAction } from '@supabase/shared-types/out/constants'
-import { ReactNode } from 'react'
-import { useParams } from 'common'
import { ProtectionAuthSettingsForm } from 'components/interfaces/Auth'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
@@ -12,27 +10,6 @@ import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useCheckPermissions, usePermissionsLoaded } from 'hooks/misc/useCheckPermissions'
import type { NextPageWithLayout } from 'types'
-interface ProtectionLayoutProps {
- children: ReactNode
-}
-
-export const ProtectionLayout = ({ children }: ProtectionLayoutProps) => {
- const { ref } = useParams()
-
- return (
- <DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="Attack Protection"
- subtitle="Configure security settings to protect your project from attacks"
- >
- {children}
- </PageLayout>
- </AuthLayout>
- </DefaultLayout>
- )
-}
-
const ProtectionPage: NextPageWithLayout = () => {
const isPermissionsLoaded = usePermissionsLoaded()
const canReadAuthSettings = useCheckPermissions(PermissionAction.READ, 'custom_config_gotrue')
@@ -54,6 +31,17 @@ const ProtectionPage: NextPageWithLayout = () => {
)
}
-ProtectionPage.getLayout = (page) => <ProtectionLayout>{page}</ProtectionLayout>
+ProtectionPage.getLayout = (page) => (
+ <DefaultLayout>
+ <AuthLayout>
+ <PageLayout
+ title="Attack Protection"
+ subtitle="Configure security settings to protect your project from attacks"
+ >
+ {page}
+ </PageLayout>
+ </AuthLayout>
+ </DefaultLayout>
+)
export default ProtectionPage
diff --git a/apps/studio/pages/project/[ref]/auth/providers.tsx b/apps/studio/pages/project/[ref]/auth/providers.tsx
index a1bda754af3..57840283ae4 100644
--- a/apps/studio/pages/project/[ref]/auth/providers.tsx
+++ b/apps/studio/pages/project/[ref]/auth/providers.tsx
@@ -2,6 +2,7 @@ import { PermissionAction } from '@supabase/shared-types/out/constants'
import { AuthProvidersForm, BasicAuthSettingsForm } from 'components/interfaces/Auth'
import { AuthProvidersLayout } from 'components/layouts/AuthLayout/AuthProvidersLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import { ScaffoldContainer } from 'components/layouts/Scaffold'
import NoPermission from 'components/ui/NoPermission'
import { useCheckPermissions, usePermissionsLoaded } from 'hooks/misc/useCheckPermissions'
@@ -23,6 +24,10 @@ const ProvidersPage: NextPageWithLayout = () => {
)
}
-ProvidersPage.getLayout = (page) => <AuthProvidersLayout>{page}</AuthProvidersLayout>
+ProvidersPage.getLayout = (page) => (
+ <DefaultLayout>
+ <AuthProvidersLayout>{page}</AuthProvidersLayout>
+ </DefaultLayout>
+)
export default ProvidersPage
diff --git a/apps/studio/pages/project/[ref]/auth/rate-limits.tsx b/apps/studio/pages/project/[ref]/auth/rate-limits.tsx
index 6676aaf147e..759ac70c188 100644
--- a/apps/studio/pages/project/[ref]/auth/rate-limits.tsx
+++ b/apps/studio/pages/project/[ref]/auth/rate-limits.tsx
@@ -1,7 +1,5 @@
import { PermissionAction } from '@supabase/shared-types/out/constants'
-import { ReactNode } from 'react'
-import { useParams } from 'common'
import RateLimits from 'components/interfaces/Auth/RateLimits/RateLimits'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
@@ -13,30 +11,6 @@ import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useCheckPermissions, usePermissionsLoaded } from 'hooks/misc/useCheckPermissions'
import type { NextPageWithLayout } from 'types'
-interface RateLimitsLayoutProps {
- children: ReactNode
-}
-
-export const RateLimitsLayout = ({ children }: RateLimitsLayoutProps) => {
- const { ref } = useParams()
-
- return (
- <DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="Rate Limits"
- subtitle="Safeguard against bursts of incoming traffic to prevent abuse and maximize stability"
- primaryActions={
- <DocsButton href="https://supabase.com/docs/guides/platform/going-into-prod#rate-limiting-resource-allocation--abuse-prevention" />
- }
- >
- {children}
- </PageLayout>
- </AuthLayout>
- </DefaultLayout>
- )
-}
-
const RateLimitsPage: NextPageWithLayout = () => {
const isPermissionsLoaded = usePermissionsLoaded()
const canReadAuthSettings = useCheckPermissions(PermissionAction.READ, 'custom_config_gotrue')
@@ -52,6 +26,20 @@ const RateLimitsPage: NextPageWithLayout = () => {
)
}
-RateLimitsPage.getLayout = (page) => <RateLimitsLayout>{page}</RateLimitsLayout>
+RateLimitsPage.getLayout = (page) => (
+ <DefaultLayout>
+ <AuthLayout>
+ <PageLayout
+ title="Rate Limits"
+ subtitle="Safeguard against bursts of incoming traffic to prevent abuse and maximize stability"
+ primaryActions={
+ <DocsButton href="https://supabase.com/docs/guides/platform/going-into-prod#rate-limiting-resource-allocation--abuse-prevention" />
+ }
+ >
+ {page}
+ </PageLayout>
+ </AuthLayout>
+ </DefaultLayout>
+)
export default RateLimitsPage
diff --git a/apps/studio/pages/project/[ref]/auth/sessions.tsx b/apps/studio/pages/project/[ref]/auth/sessions.tsx
index b7b4298a79d..4c2fc2e834a 100644
--- a/apps/studio/pages/project/[ref]/auth/sessions.tsx
+++ b/apps/studio/pages/project/[ref]/auth/sessions.tsx
@@ -1,5 +1,4 @@
import { PermissionAction } from '@supabase/shared-types/out/constants'
-import { ReactNode } from 'react'
import { SessionsAuthSettingsForm } from 'components/interfaces/Auth'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
@@ -11,25 +10,6 @@ import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useCheckPermissions, usePermissionsLoaded } from 'hooks/misc/useCheckPermissions'
import type { NextPageWithLayout } from 'types'
-interface SessionsLayoutProps {
- children: ReactNode
-}
-
-export const SessionsLayout = ({ children }: SessionsLayoutProps) => {
- return (
- <DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="User Sessions"
- subtitle="Configure settings for user sessions and refresh tokens"
- >
- {children}
- </PageLayout>
- </AuthLayout>
- </DefaultLayout>
- )
-}
-
const SessionsPage: NextPageWithLayout = () => {
const isPermissionsLoaded = usePermissionsLoaded()
const canReadAuthSettings = useCheckPermissions(PermissionAction.READ, 'custom_config_gotrue')
@@ -51,6 +31,17 @@ const SessionsPage: NextPageWithLayout = () => {
)
}
-SessionsPage.getLayout = (page) => <SessionsLayout>{page}</SessionsLayout>
+SessionsPage.getLayout = (page) => (
+ <DefaultLayout>
+ <AuthLayout>
+ <PageLayout
+ title="User Sessions"
+ subtitle="Configure settings for user sessions and refresh tokens"
+ >
+ {page}
+ </PageLayout>
+ </AuthLayout>
+ </DefaultLayout>
+)
export default SessionsPage
diff --git a/apps/studio/pages/project/[ref]/auth/smtp.tsx b/apps/studio/pages/project/[ref]/auth/smtp.tsx
index 4c31813a547..96175fb6298 100644
--- a/apps/studio/pages/project/[ref]/auth/smtp.tsx
+++ b/apps/studio/pages/project/[ref]/auth/smtp.tsx
@@ -2,8 +2,9 @@ import { PermissionAction } from '@supabase/shared-types/out/constants'
import { SmtpForm } from 'components/interfaces/Auth'
import { AuthEmailsLayout } from 'components/layouts/AuthLayout/AuthEmailsLayout'
-import { useCheckPermissions, usePermissionsLoaded } from 'hooks/misc/useCheckPermissions'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import NoPermission from 'components/ui/NoPermission'
+import { useCheckPermissions, usePermissionsLoaded } from 'hooks/misc/useCheckPermissions'
import type { NextPageWithLayout } from 'types'
const SmtpPage: NextPageWithLayout = () => {
@@ -17,6 +18,10 @@ const SmtpPage: NextPageWithLayout = () => {
return <SmtpForm />
}
-SmtpPage.getLayout = (page) => <AuthEmailsLayout>{page}</AuthEmailsLayout>
+SmtpPage.getLayout = (page) => (
+ <DefaultLayout>
+ <AuthEmailsLayout>{page}</AuthEmailsLayout>
+ </DefaultLayout>
+)
export default SmtpPage
diff --git a/apps/studio/pages/project/[ref]/auth/templates.tsx b/apps/studio/pages/project/[ref]/auth/templates.tsx
index 70c296f98b3..35468f065c6 100644
--- a/apps/studio/pages/project/[ref]/auth/templates.tsx
+++ b/apps/studio/pages/project/[ref]/auth/templates.tsx
@@ -1,6 +1,7 @@
import { PermissionAction } from '@supabase/shared-types/out/constants'
import { EmailTemplates } from 'components/interfaces/Auth'
import { AuthEmailsLayout } from 'components/layouts/AuthLayout/AuthEmailsLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import { ScaffoldContainer } from 'components/layouts/Scaffold'
import NoPermission from 'components/ui/NoPermission'
import { useCheckPermissions, usePermissionsLoaded } from 'hooks/misc/useCheckPermissions'
@@ -21,6 +22,10 @@ const TemplatesPage: NextPageWithLayout = () => {
)
}
-TemplatesPage.getLayout = (page) => <AuthEmailsLayout>{page}</AuthEmailsLayout>
+TemplatesPage.getLayout = (page) => (
+ <DefaultLayout>
+ <AuthEmailsLayout>{page}</AuthEmailsLayout>
+ </DefaultLayout>
+)
export default TemplatesPage
diff --git a/apps/studio/pages/project/[ref]/auth/third-party.tsx b/apps/studio/pages/project/[ref]/auth/third-party.tsx
index 5aa2b1ee245..e3d955abd2d 100644
--- a/apps/studio/pages/project/[ref]/auth/third-party.tsx
+++ b/apps/studio/pages/project/[ref]/auth/third-party.tsx
@@ -2,6 +2,7 @@ import { PermissionAction } from '@supabase/shared-types/out/constants'
import { ThirdPartyAuthForm } from 'components/interfaces/Auth'
import { AuthProvidersLayout } from 'components/layouts/AuthLayout/AuthProvidersLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import { ScaffoldContainer } from 'components/layouts/Scaffold'
import NoPermission from 'components/ui/NoPermission'
import { useCheckPermissions, usePermissionsLoaded } from 'hooks/misc/useCheckPermissions'
@@ -22,6 +23,10 @@ const ThirdPartyPage: NextPageWithLayout = () => {
)
}
-ThirdPartyPage.getLayout = (page) => <AuthProvidersLayout>{page}</AuthProvidersLayout>
+ThirdPartyPage.getLayout = (page) => (
+ <DefaultLayout>
+ <AuthProvidersLayout>{page}</AuthProvidersLayout>
+ </DefaultLayout>
+)
export default ThirdPartyPage
diff --git a/apps/studio/pages/project/[ref]/auth/url-configuration.tsx b/apps/studio/pages/project/[ref]/auth/url-configuration.tsx
index 2650af0c08a..04c97180f56 100644
--- a/apps/studio/pages/project/[ref]/auth/url-configuration.tsx
+++ b/apps/studio/pages/project/[ref]/auth/url-configuration.tsx
@@ -1,7 +1,5 @@
import { PermissionAction } from '@supabase/shared-types/out/constants'
-import { ReactNode } from 'react'
-import { useParams } from 'common'
import { RedirectUrls } from 'components/interfaces/Auth/RedirectUrls/RedirectUrls'
import SiteUrl from 'components/interfaces/Auth/SiteUrl/SiteUrl'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
@@ -13,27 +11,6 @@ import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useCheckPermissions, usePermissionsLoaded } from 'hooks/misc/useCheckPermissions'
import type { NextPageWithLayout } from 'types'
-interface URLConfigurationLayoutProps {
- children: ReactNode
-}
-
-export const URLConfigurationLayout = ({ children }: URLConfigurationLayoutProps) => {
- const { ref } = useParams()
-
- return (
- <DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="URL Configuration"
- subtitle="Configure site URL and redirect URLs for authentication"
- >
- {children}
- </PageLayout>
- </AuthLayout>
- </DefaultLayout>
- )
-}
-
const URLConfiguration: NextPageWithLayout = () => {
const isPermissionsLoaded = usePermissionsLoaded()
const canReadAuthSettings = useCheckPermissions(PermissionAction.READ, 'custom_config_gotrue')
@@ -58,6 +35,17 @@ const URLConfiguration: NextPageWithLayout = () => {
)
}
-URLConfiguration.getLayout = (page) => <URLConfigurationLayout>{page}</URLConfigurationLayout>
+URLConfiguration.getLayout = (page) => (
+ <DefaultLayout>
+ <AuthLayout>
+ <PageLayout
+ title="URL Configuration"
+ subtitle="Configure site URL and redirect URLs for authentication"
+ >
+ {page}
+ </PageLayout>
+ </AuthLayout>
+ </DefaultLayout>
+)
export default URLConfiguration
diff --git a/apps/studio/pages/project/[ref]/database/tables/[id].tsx b/apps/studio/pages/project/[ref]/database/tables/[id].tsx
index 9d1508ea9e1..d152ba12207 100644
--- a/apps/studio/pages/project/[ref]/database/tables/[id].tsx
+++ b/apps/studio/pages/project/[ref]/database/tables/[id].tsx
@@ -1,19 +1,18 @@
-import { ChevronRight } from 'lucide-react'
-
import { useParams } from 'common'
import { ColumnList } from 'components/interfaces/Database'
import { SidePanelEditor } from 'components/interfaces/TableGridEditor'
import DeleteConfirmationDialogs from 'components/interfaces/TableGridEditor/DeleteConfirmationDialogs'
import DatabaseLayout from 'components/layouts/DatabaseLayout/DatabaseLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext'
import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
import { FormHeader } from 'components/ui/Forms/FormHeader'
import { useTableEditorQuery } from 'data/table-editor/table-editor-query'
import { isTableLike } from 'data/table-editor/table-editor-types'
+import { ChevronRight } from 'lucide-react'
import { useTableEditorStateSnapshot } from 'state/table-editor'
import type { NextPageWithLayout } from 'types'
import ShimmeringLoader from 'ui-patterns/ShimmeringLoader'
-import DefaultLayout from 'components/layouts/DefaultLayout'
const DatabaseTables: NextPageWithLayout = () => {
const snap = useTableEditorStateSnapshot()
diff --git a/apps/studio/pages/project/[ref]/database/tables/index.tsx b/apps/studio/pages/project/[ref]/database/tables/index.tsx
index 6767ddbf54b..512e29931cf 100644
--- a/apps/studio/pages/project/[ref]/database/tables/index.tsx
+++ b/apps/studio/pages/project/[ref]/database/tables/index.tsx
@@ -5,11 +5,11 @@ import { TableList } from 'components/interfaces/Database'
import { SidePanelEditor } from 'components/interfaces/TableGridEditor'
import DeleteConfirmationDialogs from 'components/interfaces/TableGridEditor/DeleteConfirmationDialogs'
import DatabaseLayout from 'components/layouts/DatabaseLayout/DatabaseLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
import { FormHeader } from 'components/ui/Forms/FormHeader'
import { useTableEditorStateSnapshot } from 'state/table-editor'
import type { NextPageWithLayout } from 'types'
-import DefaultLayout from 'components/layouts/DefaultLayout'
const DatabaseTables: NextPageWithLayout = () => {
const snap = useTableEditorStateSnapshot()
diff --git a/apps/studio/pages/project/[ref]/functions/index.tsx b/apps/studio/pages/project/[ref]/functions/index.tsx
index 5c71c8697ab..52da2deba1a 100644
--- a/apps/studio/pages/project/[ref]/functions/index.tsx
+++ b/apps/studio/pages/project/[ref]/functions/index.tsx
@@ -26,6 +26,7 @@ import {
Dialog,
DialogContent,
DialogSection,
+ DialogTitle,
DialogTrigger,
DropdownMenu,
DropdownMenuContent,
@@ -98,6 +99,9 @@ const EdgeFunctionsPage: NextPageWithLayout = () => {
</DropdownMenuItem>
</DialogTrigger>
<DialogContent size="large">
+ <DialogTitle className="sr-only">
+ Create your first Edge Function via the CLI
+ </DialogTitle>
<DialogSection padding="small">
<TerminalInstructions />
</DialogSection>
diff --git a/apps/studio/pages/project/[ref]/index.tsx b/apps/studio/pages/project/[ref]/index.tsx
index 2fc2c5b4ccc..7166d4afbf2 100644
--- a/apps/studio/pages/project/[ref]/index.tsx
+++ b/apps/studio/pages/project/[ref]/index.tsx
@@ -6,6 +6,7 @@ import { CLIENT_LIBRARIES, EXAMPLE_PROJECTS } from 'components/interfaces/Home/H
import ProjectUsageSection from 'components/interfaces/Home/ProjectUsageSection'
import { SecurityStatus } from 'components/interfaces/Home/SecurityStatus'
import ServiceStatus from 'components/interfaces/Home/ServiceStatus'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import { ProjectPausedState } from 'components/layouts/ProjectLayout/PausedState/ProjectPausedState'
import { ProjectLayoutWithAuth } from 'components/layouts/ProjectLayout/ProjectLayout'
import { ComputeBadgeWrapper } from 'components/ui/ComputeBadgeWrapper'
@@ -26,8 +27,6 @@ import {
TooltipContent,
TooltipTrigger,
} from 'ui'
-import AppLayout from 'components/layouts/AppLayout/AppLayout'
-import DefaultLayout from 'components/layouts/DefaultLayout'
const Home: NextPageWithLayout = () => {
const organization = useSelectedOrganization()
diff --git a/apps/studio/pages/projects.tsx b/apps/studio/pages/projects.tsx
index c7dcef1f9d4..25435ca3a2d 100644
--- a/apps/studio/pages/projects.tsx
+++ b/apps/studio/pages/projects.tsx
@@ -3,15 +3,27 @@ import { useEffect, useState } from 'react'
import { ProjectList } from 'components/interfaces/Home/ProjectList'
import HomePageActions from 'components/interfaces/HomePageActions'
-import AccountLayout from 'components/layouts/AccountLayout/AccountLayout'
+
+import { useNewLayout } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
+import DefaultLayout from 'components/layouts/DefaultLayout'
+import OrganizationLayout from 'components/layouts/OrganizationLayout'
+import { MAX_WIDTH_CLASSES, PADDING_CLASSES } from 'components/layouts/Scaffold'
import AlertError from 'components/ui/AlertError'
import { useOrganizationsQuery } from 'data/organizations/organizations-query'
import { useAutoProjectsPrefetch } from 'data/projects/projects-query'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
+import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage'
import { IS_PLATFORM, LOCAL_STORAGE_KEYS, PROJECT_STATUS } from 'lib/constants'
import type { NextPageWithLayout } from 'types'
+import { cn } from 'ui'
const ProjectsPage: NextPageWithLayout = () => {
+ const newLayoutPreview = useNewLayout()
+ const [lastVisitedOrganization] = useLocalStorageQuery(
+ LOCAL_STORAGE_KEYS.LAST_VISITED_ORGANIZATION,
+ ''
+ )
+
const router = useRouter()
const [search, setSearch] = useState('')
const [filterStatus, setFilterStatus] = useState<string[]>([
@@ -26,7 +38,7 @@ const ProjectsPage: NextPageWithLayout = () => {
const hasWindowLoaded = typeof window !== 'undefined'
useEffect(() => {
- if (isSuccess && hasWindowLoaded) {
+ if (hasWindowLoaded && isSuccess) {
const hasNoOrg = organizations.length === 0
const hasShownNewPage = localStorage.getItem(LOCAL_STORAGE_KEYS.UI_ONBOARDING_NEW_PAGE_SHOWN)
if (hasNoOrg && !hasShownNewPage) {
@@ -34,10 +46,20 @@ const ProjectsPage: NextPageWithLayout = () => {
router.push('/new')
}
}
- }, [isSuccess, hasWindowLoaded])
+ }, [hasWindowLoaded, isSuccess])
+
+ useEffect(() => {
+ // [Joshen] Adding the redirect here, but once the nav changes are permanenet
+ // we should be doing the redirect in next.config instead
+ if (hasWindowLoaded && newLayoutPreview) {
+ if (lastVisitedOrganization) router.push(`/org/${lastVisitedOrganization}`)
+ else router.push('/organizations')
+ }
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [hasWindowLoaded, newLayoutPreview])
return (
- <>
+ <div className={cn(newLayoutPreview && [MAX_WIDTH_CLASSES, PADDING_CLASSES])}>
{isError && (
<div className="p-4 md:px-5">
<AlertError subject="Failed to retrieve organizations" />
@@ -62,22 +84,14 @@ const ProjectsPage: NextPageWithLayout = () => {
/>
</div>
</div>
- </>
+ </div>
)
}
ProjectsPage.getLayout = (page) => (
- <AccountLayout
- title="Dashboard"
- breadcrumbs={[
- {
- key: `supabase-projects`,
- label: 'Projects',
- },
- ]}
- >
- {page}
- </AccountLayout>
+ <DefaultLayout headerTitle="All Projects">
+ <OrganizationLayout>{page}</OrganizationLayout>
+ </DefaultLayout>
)
export default ProjectsPage
diff --git a/apps/studio/pages/sign-in-mfa.tsx b/apps/studio/pages/sign-in-mfa.tsx
index 06d3ca751e6..bc256f89428 100644
--- a/apps/studio/pages/sign-in-mfa.tsx
+++ b/apps/studio/pages/sign-in-mfa.tsx
@@ -15,6 +15,7 @@ import type { NextPageWithLayout } from 'types'
const SignInMfaPage: NextPageWithLayout = () => {
const router = useRouter()
+
const queryClient = useQueryClient()
const {
// current methods for mfa are github and sso
diff --git a/apps/studio/pages/sign-in.tsx b/apps/studio/pages/sign-in.tsx
index 07e868c50ee..42928963c55 100644
--- a/apps/studio/pages/sign-in.tsx
+++ b/apps/studio/pages/sign-in.tsx
@@ -1,15 +1,15 @@
-import { Lock } from 'lucide-react'
-import Link from 'next/link'
-import { useRouter } from 'next/router'
-import { useEffect } from 'react'
-
+import { LastSignInWrapper } from 'components/interfaces/SignIn/LastSignInWrapper'
import SignInForm from 'components/interfaces/SignIn/SignInForm'
import SignInWithGitHub from 'components/interfaces/SignIn/SignInWithGitHub'
+import { AuthenticationLayout } from 'components/layouts/AuthenticationLayout'
import SignInLayout from 'components/layouts/SignInLayout/SignInLayout'
import { IS_PLATFORM } from 'lib/constants'
+import { Lock } from 'lucide-react'
+import Link from 'next/link'
+import { useRouter } from 'next/router'
+import { useEffect } from 'react'
import type { NextPageWithLayout } from 'types'
import { Button } from 'ui'
-import { LastSignInWrapper } from 'components/interfaces/SignIn/LastSignInWrapper'
const SignInPage: NextPageWithLayout = () => {
const router = useRouter()
@@ -67,13 +67,15 @@ const SignInPage: NextPageWithLayout = () => {
}
SignInPage.getLayout = (page) => (
- <SignInLayout
- heading="Welcome back"
- subheading="Sign in to your account"
- logoLinkToMarketingSite={true}
- >
- {page}
- </SignInLayout>
+ <AuthenticationLayout>
+ <SignInLayout
+ heading="Welcome back"
+ subheading="Sign in to your account"
+ logoLinkToMarketingSite={true}
+ >
+ {page}
+ </SignInLayout>
+ </AuthenticationLayout>
)
export default SignInPage
diff --git a/apps/studio/pages/support/new.tsx b/apps/studio/pages/support/new.tsx
index 78dda422ff3..2975c2436f3 100644
--- a/apps/studio/pages/support/new.tsx
+++ b/apps/studio/pages/support/new.tsx
@@ -5,6 +5,8 @@ import SVG from 'react-inlinesvg'
import Success from 'components/interfaces/Support/Success'
import { SupportFormV2 } from 'components/interfaces/Support/SupportFormV2'
+import AppLayout from 'components/layouts/AppLayout/AppLayout'
+import DefaultLayout from 'components/layouts/DefaultLayout'
import CopyButton from 'components/ui/CopyButton'
import InformationBox from 'components/ui/InformationBox'
import { usePlatformStatusQuery } from 'data/platform/platform-status-query'
@@ -12,9 +14,10 @@ import { useProjectsQuery } from 'data/projects/projects-query'
import { withAuth } from 'hooks/misc/withAuth'
import { BASE_PATH } from 'lib/constants'
import { toast } from 'sonner'
+import { NextPageWithLayout } from 'types'
import { Button, Tooltip, TooltipContent, TooltipTrigger } from 'ui'
-const SupportPage = () => {
+const SupportPage: NextPageWithLayout = () => {
const [sentCategory, setSentCategory] = useState<string>()
const [selectedProject, setSelectedProject] = useState<string>('no-project')
const { data, isLoading } = usePlatformStatusQuery()
@@ -162,4 +165,10 @@ const SupportPage = () => {
)
}
+SupportPage.getLayout = (page) => (
+ <AppLayout>
+ <DefaultLayout>{page}</DefaultLayout>
+ </AppLayout>
+)
+
export default withAuth(SupportPage, { useHighestAAL: false })
diff --git a/apps/studio/public/img/previews/layout-update.png b/apps/studio/public/img/previews/layout-update.png
new file mode 100644
index 00000000000..b51db67c005
Binary files /dev/null and b/apps/studio/public/img/previews/layout-update.png differ
diff --git a/apps/studio/state/app-state.ts b/apps/studio/state/app-state.ts
index 75d73a7b57c..84438cfba36 100644
--- a/apps/studio/state/app-state.ts
+++ b/apps/studio/state/app-state.ts
@@ -58,9 +58,11 @@ const getInitialState = () => {
selectedFeaturePreview: '',
showAiSettingsModal: false,
showGenerateSqlModal: false,
+ showConnectDialog: false,
ongoingQueriesPanelOpen: false,
mobileMenuOpen: false,
showSidebar: true,
+ lastRouteBeforeVisitingAccountPage: '',
}
}
@@ -88,9 +90,11 @@ const getInitialState = () => {
selectedFeaturePreview: '',
showAiSettingsModal: false,
showGenerateSqlModal: false,
+ showConnectDialog: false,
ongoingQueriesPanelOpen: false,
mobileMenuOpen: false,
showSidebar: true,
+ lastRouteBeforeVisitingAccountPage: '',
}
}
@@ -183,6 +187,11 @@ export const appState = proxy({
setMobileMenuOpen: (value: boolean) => {
appState.mobileMenuOpen = value
},
+
+ lastRouteBeforeVisitingAccountPage: '',
+ setLastRouteBeforeVisitingAccountPage: (value: string) => {
+ appState.lastRouteBeforeVisitingAccountPage = value
+ },
})
// Set up localStorage subscriptions
diff --git a/apps/studio/styles/main.scss b/apps/studio/styles/main.scss
index 42081c2bdc9..1d558804767 100644
--- a/apps/studio/styles/main.scss
+++ b/apps/studio/styles/main.scss
@@ -25,6 +25,9 @@
--sidebar-ring: 217.2 91.2% 59.8%;
}
+[data-theme='deep-dark'],
+.deep-dark,
+[data-theme='dark'],
.dark {
--chart-1: hsl(var(--brand-default));
--chart-2: 160 60% 45%;
@@ -62,7 +65,7 @@ html,
body,
#__next,
.main {
- @apply bg-studio relative;
+ @apply bg-dash-sidebar relative;
@apply text-foreground;
@apply overflow-x-clip;
-moz-osx-font-smoothing: grayscale;
diff --git a/apps/studio/tests/unit/get-return-to-path.test.ts b/apps/studio/tests/unit/get-return-to-path.test.ts
index 54041463f90..aebb7aee4d5 100644
--- a/apps/studio/tests/unit/get-return-to-path.test.ts
+++ b/apps/studio/tests/unit/get-return-to-path.test.ts
@@ -1,9 +1,9 @@
-import { getReturnToPath } from 'lib/gotrue'
+import { getReturnToPath, DEFAULT_FALLBACK_PATH } from 'lib/gotrue'
import { describe, it, expect } from 'vitest'
describe(`getReturnToPath`, () => {
- it(`returns to /projects when no fallback is provided`, () => {
- expect(getReturnToPath()).toBe('/projects')
+ it(`returns to ${DEFAULT_FALLBACK_PATH} when no fallback is provided`, () => {
+ expect(getReturnToPath()).toBe(DEFAULT_FALLBACK_PATH)
})
it(`returns to /custom when fallback is provided`, () => {
@@ -34,7 +34,7 @@ describe(`getReturnToPath`, () => {
// @ts-ignore
window.location = { search: `?returnTo=https://google.com` }
- expect(getReturnToPath()).toBe('/projects')
+ expect(getReturnToPath()).toBe(DEFAULT_FALLBACK_PATH)
})
it(`does not allow XSS`, () => {
@@ -43,7 +43,7 @@ describe(`getReturnToPath`, () => {
// @ts-ignore
window.location = { search: `?returnTo=javascript:alert(1)` }
- expect(getReturnToPath()).toBe('/projects')
+ expect(getReturnToPath()).toBe(DEFAULT_FALLBACK_PATH)
})
it(`does not allow XSS with encoded characters`, () => {
@@ -52,6 +52,6 @@ describe(`getReturnToPath`, () => {
// @ts-ignore
window.location = { search: `?returnTo=javascript%3Aalert%281%29` }
- expect(getReturnToPath()).toBe('/projects')
+ expect(getReturnToPath()).toBe(DEFAULT_FALLBACK_PATH)
})
})
diff --git a/packages/config/tailwind.config.js b/packages/config/tailwind.config.js
index 70cda2e9a53..f8c0204227b 100644
--- a/packages/config/tailwind.config.js
+++ b/packages/config/tailwind.config.js
@@ -129,9 +129,6 @@ const uiConfig = ui({
// https://github.com/tailwindlabs/tailwindcss-typography/issues/135
DEFAULT: {
css: {
- 'code::before': {
- content: '""',
- },
'code::after': {
content: '""',
},
diff --git a/packages/ui/package.json b/packages/ui/package.json
index 9960ebcb539..5ff9363508a 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -26,7 +26,7 @@
"@radix-ui/react-collapsible": "^1.0.3",
"@radix-ui/react-context": "^1.0.1",
"@radix-ui/react-context-menu": "^2.1.5",
- "@radix-ui/react-dialog": "^1.0.5",
+ "@radix-ui/react-dialog": "^1.1.4",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-hover-card": "^1.0.7",
"@radix-ui/react-label": "^2.0.2",
@@ -37,15 +37,18 @@
"@radix-ui/react-radio-group": "^1.1.3",
"@radix-ui/react-scroll-area": "^1.0.5",
"@radix-ui/react-select": "^2.0.0",
- "@radix-ui/react-separator": "^1.0.3",
+ "@radix-ui/react-separator": "^1.1.1",
"@radix-ui/react-slider": "^1.1.2",
- "@radix-ui/react-slot": "^1.0.2",
+ "@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toggle": "^1.0.3",
"@radix-ui/react-toggle-group": "^1.0.4",
- "@radix-ui/react-tooltip": "^1.0.7",
- "class-variance-authority": "^0.6.0",
+ "@radix-ui/react-tooltip": "^1.1.6",
+ "@tailwindcss/forms": "^0.5.0",
+ "@tailwindcss/typography": "^0.5.9",
+ "autoprefixer": "^10.4.14",
+ "class-variance-authority": "^0.6.1",
"clsx": "^1.2.1",
"cmdk": "^1.0.0",
"color": "^4.2.3",
diff --git a/packages/ui/shadcn.css b/packages/ui/shadcn.css
new file mode 100644
index 00000000000..65f895be960
--- /dev/null
+++ b/packages/ui/shadcn.css
@@ -0,0 +1,31 @@
+
+@layer base {
+ :root {
+ --sidebar-background: 0 0% 98%;
+ --sidebar-foreground: 240 5.3% 26.1%;
+ --sidebar-primary: 240 5.9% 10%;
+ --sidebar-primary-foreground: 0 0% 98%;
+ --sidebar-accent: 240 4.8% 95.9%;
+ --sidebar-accent-foreground: 240 5.9% 10%;
+ --sidebar-border: 220 13% 91%;
+ --sidebar-ring: 217.2 91.2% 59.8%
+ }
+ .dark {
+ --sidebar-background: 240 5.9% 10%;
+ --sidebar-foreground: 240 4.8% 95.9%;
+ --sidebar-primary: 224.3 76.3% 48%;
+ --sidebar-primary-foreground: 0 0% 100%;
+ --sidebar-accent: 240 3.7% 15.9%;
+ --sidebar-accent-foreground: 240 4.8% 95.9%;
+ --sidebar-border: 240 3.7% 15.9%;
+ --sidebar-ring: 217.2 91.2% 59.8%
+ }
+}
+@layer base {
+ * {
+ @apply border-border;
+ }
+ body {
+ @apply bg-background text-foreground;
+ }
+}
\ No newline at end of file
diff --git a/packages/ui/src/components/TreeView/TreeView.tsx b/packages/ui/src/components/TreeView/TreeView.tsx
index 3a6ec9eab91..7ecc3435566 100644
--- a/packages/ui/src/components/TreeView/TreeView.tsx
+++ b/packages/ui/src/components/TreeView/TreeView.tsx
@@ -163,7 +163,6 @@ const TreeViewItem = forwardRef<
aria-selected={isSelected}
aria-expanded={!isEditing && isExpanded}
onDoubleClick={onDoubleClick}
- {...props}
className={cn(TreeViewItemVariant({ isSelected, isOpened, isPreview }), props.className)}
style={{
paddingLeft: xPadding + ((level - 1) * levelPadding) / 2,
diff --git a/packages/ui/src/components/hooks/use-mobile.tsx b/packages/ui/src/components/hooks/use-mobile.tsx
new file mode 100644
index 00000000000..2b0fe1dfef3
--- /dev/null
+++ b/packages/ui/src/components/hooks/use-mobile.tsx
@@ -0,0 +1,19 @@
+import * as React from "react"
+
+const MOBILE_BREAKPOINT = 768
+
+export function useIsMobile() {
+ const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)
+
+ React.useEffect(() => {
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
+ const onChange = () => {
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
+ }
+ mql.addEventListener("change", onChange)
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
+ return () => mql.removeEventListener("change", onChange)
+ }, [])
+
+ return !!isMobile
+}
diff --git a/packages/ui/src/components/shadcn/ui/dropdown-menu.tsx b/packages/ui/src/components/shadcn/ui/dropdown-menu.tsx
index 6c9ce6e363a..1c59ed83929 100644
--- a/packages/ui/src/components/shadcn/ui/dropdown-menu.tsx
+++ b/packages/ui/src/components/shadcn/ui/dropdown-menu.tsx
@@ -149,7 +149,7 @@ const DropdownMenuLabel = React.forwardRef<
>(({ className, inset, ...props }, ref) => (
<DropdownMenuPrimitive.Label
ref={ref}
- className={cn('px-2 py-1.5 text-xs text-foreground-light', inset && 'pl-8', className)}
+ className={cn('px-2 py-1.5 text-xs text-foreground-lighter', inset && 'pl-8', className)}
{...props}
/>
))
diff --git a/packages/ui/src/components/shadcn/ui/sidebar.tsx b/packages/ui/src/components/shadcn/ui/sidebar.tsx
index db37f20ccfd..5acdfcbab4f 100644
--- a/packages/ui/src/components/shadcn/ui/sidebar.tsx
+++ b/packages/ui/src/components/shadcn/ui/sidebar.tsx
@@ -1,12 +1,11 @@
'use client'
-import * as React from 'react'
import { Slot } from '@radix-ui/react-slot'
import { VariantProps, cva } from 'class-variance-authority'
import { PanelLeft } from 'lucide-react'
-
-import { useIsMobile } from '../hooks/useMobile'
+import * as React from 'react'
import { cn } from './../../../lib/utils'
+import { useIsMobile } from './../../hooks/use-mobile'
import { Button } from './button'
import { Input } from './input'
import { Separator } from './separator'
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index ad85e0a6f26..a07012e371f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -335,7 +335,7 @@ importers:
version: 1.0.1
next:
specifier: 'catalog:'
next-mdx-remote:
specifier: ^4.4.1
@@ -579,7 +579,7 @@ importers:
'@sentry/nextjs':
specifier: ^8.52.1
'@std/path':
specifier: npm:@jsr/std__path@^1.0.8
version: '@jsr/[email protected]'
@@ -618,7 +618,7 @@ importers:
'@vercel/flags':
specifier: ^2.6.0
'@vitejs/plugin-react':
specifier: ^4.3.4
@@ -708,13 +708,13 @@ importers:
version: 0.33.0
next:
specifier: 'catalog:'
next-themes:
specifier: ^0.3.0
nuqs:
specifier: ^2.4.1
openai:
specifier: ^4.20.1
@@ -859,7 +859,7 @@ importers:
version: 9.3.4
'@testing-library/jest-dom':
specifier: ^6.4.6
'@testing-library/react':
specifier: ^14.0.0
@@ -961,7 +961,7 @@ importers:
version: 2.4.11([email protected])
next-router-mock:
specifier: ^0.9.13
postcss:
specifier: ^8.4.31
version: 8.4.38
@@ -1003,7 +1003,7 @@ importers:
version: 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-tooltip':
specifier: ^1.0.7
'@react-router/fs-routes':
specifier: ^7.4.0
@@ -1036,10 +1036,10 @@ importers:
version: 0.436.0([email protected])
next:
specifier: 'catalog:'
next-contentlayer2:
specifier: 0.4.6
next-themes:
specifier: ^0.3.0
@@ -1274,7 +1274,7 @@ importers:
version: 1.2.0
next:
specifier: 'catalog:'
next-contentlayer2:
specifier: 0.5.3
@@ -1528,7 +1528,7 @@ importers:
version: 0.7.12
'@vercel/flags':
specifier: ^2.6.0
api-types:
specifier: workspace:*
version: link:../api-types
@@ -1543,7 +1543,7 @@ importers:
version: 4.17.21
next:
specifier: 'catalog:'
next-themes:
specifier: ^0.3.0
@@ -1721,8 +1721,8 @@ importers:
specifier: ^2.1.5
'@radix-ui/react-dialog':
- specifier: ^1.0.5
+ specifier: ^1.1.4
'@radix-ui/react-dropdown-menu':
specifier: ^2.0.6
@@ -1754,14 +1754,14 @@ importers:
specifier: ^2.0.0
'@radix-ui/react-separator':
- specifier: ^1.0.3
+ specifier: ^1.1.1
'@radix-ui/react-slider':
specifier: ^1.1.2
'@radix-ui/react-slot':
- specifier: ^1.0.2
- version: 1.1.0(@types/[email protected])([email protected])
+ specifier: ^1.1.1
+ version: 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-switch':
specifier: ^1.0.3
@@ -1775,10 +1775,19 @@ importers:
specifier: ^1.0.4
'@radix-ui/react-tooltip':
- specifier: ^1.0.7
+ specifier: ^1.1.6
+ '@tailwindcss/forms':
+ specifier: ^0.5.0
+ '@tailwindcss/typography':
+ specifier: ^0.5.9
+ autoprefixer:
+ specifier: ^10.4.14
+ version: 10.4.16([email protected])
class-variance-authority:
- specifier: ^0.6.0
+ specifier: ^0.6.1
version: 0.6.1
clsx:
specifier: ^1.2.1
@@ -1812,7 +1821,7 @@ importers:
version: 0.436.0([email protected])
next:
specifier: 'catalog:'
next-themes:
specifier: ^0.3.0
@@ -1966,7 +1975,7 @@ importers:
version: 0.33.0
next:
specifier: 'catalog:'
next-themes:
specifier: '*'
@@ -2075,7 +2084,7 @@ importers:
version: link:../api-types
next-router-mock:
specifier: ^0.9.13
typescript:
specifier: ~5.5.0
version: 5.5.2
@@ -2325,6 +2334,10 @@ packages:
resolution: {integrity: sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==}
engines: {node: '>=6.9.0'}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==}
+ engines: {node: '>=6.9.0'}
+
resolution: {integrity: sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw==}
engines: {node: '>=6.9.0'}
@@ -2415,6 +2428,10 @@ packages:
resolution: {integrity: sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==}
engines: {node: '>=6.9.0'}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==}
+ engines: {node: '>=6.9.0'}
+
resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==}
engines: {node: '>=6.9.0'}
@@ -2581,10 +2598,6 @@ packages:
resolution: {integrity: sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==}
engines: {node: '>=6.9.0'}
- '@babel/[email protected]':
- resolution: {integrity: sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==}
- engines: {node: '>=6.9.0'}
-
resolution: {integrity: sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==}
engines: {node: '>=6.9.0'}
@@ -4347,6 +4360,9 @@ packages:
'@radix-ui/[email protected]':
resolution: {integrity: sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA==}
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-fDG7jcoNKVjSK6yfmuAs0EnPDro0WMXIhMtXdTBWqEioVW206ku+4Lw07e+13lUkFkpoEQ2PdeMIAGpdqEAmDg==}
peerDependencies:
@@ -4399,6 +4415,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-G+KcpzXHq24iH0uGG/pF8LyzpFJYGD4RfLjCIBfGdSLXvjLHST31RUiRVrupIBMvIppMgSzQ6l66iAxl03tdlg==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-fXR5kbMan9oQqMuacfzlGG/SQMcmMlZ4wrvpckv8SgUulD0MMpspxJrxg/Gp/ISV3JfV1AeSWTYK9GvxA4ySwA==}
peerDependencies:
@@ -4522,6 +4551,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-UASk9zi+crv9WteK/NU4PLvOoL3OuE6BWVKNF6hPRBtYBDXQ2u5iu3O59zUlJiTVvkyuycnqrztsHVJwcK9K+Q==}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q==}
peerDependencies:
@@ -4535,6 +4573,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-/IVhJV5AceX620DUJ4uYVMymzsipdKBzo3edo+omeskCKGm9FRHM0ebIdbPnlQVJqyuHbuBltQUOG2mOTq2IYw==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA==}
peerDependencies:
@@ -4570,6 +4621,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-E4TywXY6UsXNRhFrECa5HAvE5/4BFcGyfTyK36gP+pAW1ed7UTK4vKwdr53gAJYwqbfCWC6ATvJa3J3R/9+Qrg==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-i6TuFOoWmLWq+M/eCLGd/bQ2HfAX1RJgvrBQ6AQLmzfvsLdefxbWu8G9zczcPFfcSPehz9GcpF6K9QYreFV8hA==}
peerDependencies:
@@ -4601,6 +4665,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-pSIwfrT1a6sIoDASCSpFwOasEwKTZWDw/iBdtnqKO7v6FeOzYJ7U53cPzYFVR3geGGXgVHaH+CdngrrAzqUGxg==}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==}
peerDependencies:
@@ -4627,6 +4700,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-zxwE80FCU7lcXUGWkdt6XpTTCKPitG1XKOwViTxHVKIJhZl9MvIl2dVHeZENCWD9+EdWv05wlaEkRXUykU27RA==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-OcUN2FU0YpmajD/qkph3XzMcK/NmSk9hGWnjV68p6QiZMgILugusgQwnLSDs3oFSJYGKf3Y49zgFedhGh04k9A==}
peerDependencies:
@@ -4749,6 +4835,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-Rvqc3nOpwseCyj/rgjlJDYAgyfw7OC1tTkKn2ivhaMGcYt8FSBlahHOZak2i3QwkRXUXgGgzeEe2RuqeEHuHgA==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==}
peerDependencies:
@@ -4775,6 +4874,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-sn2O9k1rPFYVyKd5LAJfo96JlSGVFpa1fS6UuBJfrZadudiw5tAmru+n1x7aMRQ84qDM71Zh1+SzK5QwU0tJfA==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==}
peerDependencies:
@@ -4801,6 +4913,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-18TFr80t5EVgL9x1SwF/YGtfG+l0BS0PRAlCWBDoBEiDQjeKgnNZRVJp/oVBl24sr3Gbfwc/Qpj4OcWTQMsAEg==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==}
peerDependencies:
@@ -4827,6 +4952,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-5G6Om/tYSxjSeEdrb1VfKkfZfn/1IlPWd731h2RfPuSbIfNUgfqAwbKfJCg/PP6nuUCTrYzalwHSpSinoWoCag==}
peerDependencies:
@@ -4892,13 +5030,13 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-itYmTy/kokS21aiV5+Z56MZB54KrhPgn6eHDKkFeOLR34HMN2s8PaN47qZZAGnvupcjxHaFZnW4pQEh0BvvVuw==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-oZfHcaAp2Y6KFBX6I5P1u7CQoy4lheCGiYj+pGFrHy8E/VNRb5E39TkTr3JrV520csPBTZjkuKFdEsjS5EUNKQ==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
- react: ^16.8 || ^17.0 || ^18.0
- react-dom: ^16.8 || ^17.0 || ^18.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
@@ -5010,6 +5148,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-YAA2cu48EkJZdAMHC0dqo9kialOcRStbtiY4nJPaht7Ptrhcvpo+eDChaM6BIs8kL6a8Z5l5poiqLnXcNduOkA==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==}
peerDependencies:
@@ -5140,6 +5291,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-1SzA4ns2M1aRlvxErqhLHsBHoS5eI5UUcI2awAMgGUp4LoaoWOKYmvqDY2s/tltuPkh3Yk77YF/r3IRj+Amx4Q==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-fyrgCaedtvMg9NK3en0pnOYJdtfwxUcNolezkNPUsoX57X8oQk+NkqcvzHXD2uKNij6GXmWU9NDru2IWjrO4BQ==}
@@ -6648,7 +6812,6 @@ packages:
'@vercel/[email protected]':
resolution: {integrity: sha512-GvLX0CK/OsIqq672OBvcCeu0k3tb3QdE0lRn1P5zulMQJIPTLlUDEH0y9TeAyC7TMWlpTTT5Bealqu0rmncyXQ==}
- deprecated: This package was renamed to flags, which offers the same functionality. https://vercel.com/changelog/npm-i-flags
peerDependencies:
'@sveltejs/kit': '*'
next: '*'
@@ -7058,6 +7221,10 @@ packages:
resolution: {integrity: sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==}
engines: {node: '>=10'}
+ resolution: {integrity: sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==}
+ engines: {node: '>=10'}
+
resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==}
@@ -9150,8 +9317,8 @@ packages:
resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==}
engines: {node: '>= 0.4'}
- resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==}
+ resolution: {integrity: sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==}
engines: {node: '>= 0.4'}
@@ -9166,9 +9333,6 @@ packages:
resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==}
engines: {node: '>=8.0.0'}
- resolution: {integrity: sha512-3UBAyM3u4ZBVYDsxOQfJDxEa6XTbpBDrOjp4mf7ExFRt5BKs/QywQQiJsh2B+hxcZLSapWqCRvElUe8DnKcFHA==}
-
resolution: {integrity: sha512-Gxc29eLs1fbn6LQ4jSU4vXjlwyZhF5HsGuMAa7gqBP4Rw4yxxltyDUuF5MBclFzDTXO+ACchGQoeela4DSfzdQ==}
@@ -12547,6 +12711,16 @@ packages:
'@types/react':
optional: true
+ resolution: {integrity: sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==}
+ engines: {node: '>=10'}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
resolution: {integrity: sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==}
engines: {node: '>=10'}
@@ -12567,6 +12741,16 @@ packages:
'@types/react':
optional: true
+ resolution: {integrity: sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ==}
+ engines: {node: '>=10'}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
resolution: {integrity: sha512-kzue8lsoSBdyyd2IfXLQMMhNujOxRoGVus+63K95fQqleGxTfvgYLTzbwYMOODeAHqnkjb3WV/Ks7f5+gDYZuQ==}
peerDependencies:
@@ -12611,6 +12795,16 @@ packages:
'@types/react':
optional: true
+ resolution: {integrity: sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==}
+ engines: {node: '>=10'}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
resolution: {integrity: sha512-+zq2myprEnQmH5yw6Gqc8lD55QHnpKaU8TOcFeC/Lg/MQSs8UknEA0JC4nTZGFAXC2J2Hyj/ijJ7NlabyPi2gg==}
peerDependencies:
@@ -14352,6 +14546,16 @@ packages:
'@types/react':
optional: true
+ resolution: {integrity: sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==}
+ engines: {node: '>=10'}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
resolution: {integrity: sha512-fOrzIw2wstbAJuv8PC9Vg4XgwyTLEOdq4y/Z3IhVl8DAE4svRcgyEUvrEXu+BMNgMoc3YND6qLT61kkgEKXh7Q==}
engines: {node: '>= 10.0.0'}
@@ -14373,6 +14577,16 @@ packages:
'@types/react':
optional: true
+ resolution: {integrity: sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==}
+ engines: {node: '>=10'}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==}
peerDependencies:
@@ -15355,6 +15569,26 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ dependencies:
+ '@ampproject/remapping': 2.3.0
+ '@babel/code-frame': 7.26.2
+ '@babel/generator': 7.27.0
+ '@babel/helper-compilation-targets': 7.26.5
+ '@babel/helper-module-transforms': 7.26.0(@babel/[email protected]([email protected]))([email protected])
+ '@babel/helpers': 7.26.9
+ '@babel/parser': 7.27.0
+ '@babel/template': 7.27.0
+ '@babel/traverse': 7.27.0([email protected])
+ '@babel/types': 7.27.0
+ convert-source-map: 2.0.0
+ debug: 4.4.0([email protected])
+ gensync: 1.0.0-beta.2
+ json5: 2.2.3
+ semver: 6.3.1
+ transitivePeerDependencies:
+ - supports-color
+
dependencies:
'@babel/parser': 7.27.0
@@ -15375,13 +15609,13 @@ snapshots:
lru-cache: 5.1.1
semver: 6.3.1
dependencies:
- '@babel/core': 7.26.10([email protected])
+ '@babel/core': 7.26.9([email protected])
'@babel/helper-annotate-as-pure': 7.25.9
'@babel/helper-member-expression-to-functions': 7.25.9([email protected])
'@babel/helper-optimise-call-expression': 7.25.9
- '@babel/helper-replace-supers': 7.26.5(@babel/[email protected]([email protected]))([email protected])
+ '@babel/helper-replace-supers': 7.26.5(@babel/[email protected]([email protected]))([email protected])
'@babel/helper-skip-transparent-expression-wrappers': 7.25.9([email protected])
'@babel/traverse': 7.27.0([email protected])
semver: 6.3.1
@@ -15424,15 +15658,24 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ dependencies:
+ '@babel/core': 7.26.9([email protected])
+ '@babel/helper-module-imports': 7.25.9([email protected])
+ '@babel/helper-validator-identifier': 7.25.9
+ '@babel/traverse': 7.27.0([email protected])
+ transitivePeerDependencies:
+ - supports-color
+
dependencies:
'@babel/types': 7.27.0
'@babel/[email protected]': {}
dependencies:
- '@babel/core': 7.26.10([email protected])
+ '@babel/core': 7.26.9([email protected])
'@babel/helper-member-expression-to-functions': 7.25.9([email protected])
'@babel/helper-optimise-call-expression': 7.25.9
'@babel/traverse': 7.27.0([email protected])
@@ -15465,6 +15708,11 @@ snapshots:
'@babel/template': 7.27.0
'@babel/types': 7.27.0
+ '@babel/[email protected]':
+ dependencies:
+ '@babel/template': 7.27.0
+ '@babel/types': 7.27.0
+
dependencies:
'@babel/helper-validator-identifier': 7.25.9
@@ -15508,9 +15756,9 @@ snapshots:
'@babel/helper-plugin-utils': 7.26.5
optional: true
dependencies:
- '@babel/core': 7.26.10([email protected])
+ '@babel/core': 7.26.9([email protected])
'@babel/helper-plugin-utils': 7.26.5
@@ -15535,6 +15783,12 @@ snapshots:
dependencies:
'@babel/core': 7.26.10([email protected])
'@babel/helper-plugin-utils': 7.26.5
+ optional: true
+
+ dependencies:
+ '@babel/core': 7.26.9([email protected])
+ '@babel/helper-plugin-utils': 7.26.5
dependencies:
@@ -15588,44 +15842,50 @@ snapshots:
dependencies:
'@babel/core': 7.26.10([email protected])
'@babel/helper-plugin-utils': 7.26.5
+ optional: true
dependencies:
- '@babel/core': 7.26.10([email protected])
- '@babel/helper-module-transforms': 7.26.0(@babel/[email protected]([email protected]))([email protected])
+ '@babel/core': 7.26.9([email protected])
+ '@babel/helper-plugin-utils': 7.26.5
+
+ dependencies:
+ '@babel/core': 7.26.9([email protected])
+ '@babel/helper-module-transforms': 7.26.0(@babel/[email protected]([email protected]))([email protected])
'@babel/helper-plugin-utils': 7.26.5
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.26.10([email protected])
+ '@babel/core': 7.26.9([email protected])
'@babel/helper-plugin-utils': 7.26.5
dependencies:
- '@babel/core': 7.26.10([email protected])
+ '@babel/core': 7.26.9([email protected])
'@babel/helper-plugin-utils': 7.26.5
dependencies:
- '@babel/core': 7.26.10([email protected])
+ '@babel/core': 7.26.9([email protected])
'@babel/helper-annotate-as-pure': 7.25.9
- '@babel/helper-create-class-features-plugin': 7.27.0(@babel/[email protected]([email protected]))([email protected])
+ '@babel/helper-create-class-features-plugin': 7.27.0(@babel/[email protected]([email protected]))([email protected])
'@babel/helper-plugin-utils': 7.26.5
'@babel/helper-skip-transparent-expression-wrappers': 7.25.9([email protected])
- '@babel/plugin-syntax-typescript': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/plugin-syntax-typescript': 7.25.9(@babel/[email protected]([email protected]))
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.26.10([email protected])
+ '@babel/core': 7.26.9([email protected])
'@babel/helper-plugin-utils': 7.26.5
'@babel/helper-validator-option': 7.25.9
- '@babel/plugin-syntax-jsx': 7.25.9(@babel/[email protected]([email protected]))
- '@babel/plugin-transform-modules-commonjs': 7.26.3(@babel/[email protected]([email protected]))([email protected])
- '@babel/plugin-transform-typescript': 7.27.0(@babel/[email protected]([email protected]))([email protected])
+ '@babel/plugin-syntax-jsx': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/plugin-transform-modules-commonjs': 7.26.3(@babel/[email protected]([email protected]))([email protected])
+ '@babel/plugin-transform-typescript': 7.27.0(@babel/[email protected]([email protected]))([email protected])
transitivePeerDependencies:
- supports-color
@@ -15672,11 +15932,6 @@ snapshots:
'@babel/helper-validator-identifier': 7.24.7
to-fast-properties: 2.0.0
- '@babel/[email protected]':
- dependencies:
- '@babel/helper-string-parser': 7.25.9
- '@babel/helper-validator-identifier': 7.25.9
-
dependencies:
'@babel/helper-string-parser': 7.25.9
@@ -17897,6 +18152,8 @@ snapshots:
'@radix-ui/[email protected]': {}
+ '@radix-ui/[email protected]': {}
+
dependencies:
'@babel/runtime': 7.26.10
@@ -17949,6 +18206,15 @@ snapshots:
'@types/react': 18.3.3
'@types/react-dom': 18.3.0
+ dependencies:
+ '@radix-ui/react-primitive': 2.0.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.3
+ '@types/react-dom': 18.3.0
+
dependencies:
'@babel/runtime': 7.26.10
@@ -18066,6 +18332,12 @@ snapshots:
optionalDependencies:
'@types/react': 18.3.3
+ dependencies:
+ react: 18.2.0
+ optionalDependencies:
+ '@types/react': 18.3.3
+
dependencies:
'@babel/runtime': 7.26.10
@@ -18089,6 +18361,28 @@ snapshots:
'@types/react': 18.3.3
'@types/react-dom': 18.3.0
+ dependencies:
+ '@radix-ui/primitive': 1.1.1
+ '@radix-ui/react-compose-refs': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-dismissable-layer': 1.1.5(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-focus-guards': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-focus-scope': 1.1.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-id': 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/react-primitive': 2.0.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-slot': 1.1.2(@types/[email protected])([email protected])
+ '@radix-ui/react-use-controllable-state': 1.1.0(@types/[email protected])([email protected])
+ aria-hidden: 1.2.4
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ react-remove-scroll: 2.6.3(@types/[email protected])([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.3
+ '@types/react-dom': 18.3.0
+
dependencies:
'@babel/runtime': 7.26.10
@@ -18123,6 +18417,19 @@ snapshots:
'@types/react': 18.3.3
'@types/react-dom': 18.3.0
+ dependencies:
+ '@radix-ui/primitive': 1.1.1
+ '@radix-ui/react-compose-refs': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-primitive': 2.0.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-use-callback-ref': 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-escape-keydown': 1.1.0(@types/[email protected])([email protected])
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.3
+ '@types/react-dom': 18.3.0
+
dependencies:
'@babel/runtime': 7.26.10
@@ -18152,6 +18459,12 @@ snapshots:
optionalDependencies:
'@types/react': 18.3.3
+ dependencies:
+ react: 18.2.0
+ optionalDependencies:
+ '@types/react': 18.3.3
+
dependencies:
'@babel/runtime': 7.26.10
@@ -18175,6 +18488,17 @@ snapshots:
'@types/react': 18.3.3
'@types/react-dom': 18.3.0
+ dependencies:
+ '@radix-ui/react-compose-refs': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-primitive': 2.0.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-use-callback-ref': 1.1.0(@types/[email protected])([email protected])
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.3
+ '@types/react-dom': 18.3.0
+
dependencies:
'@babel/runtime': 7.26.10
@@ -18237,7 +18561,7 @@ snapshots:
'@radix-ui/react-roving-focus': 1.0.4(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-slot': 1.0.2(@types/[email protected])([email protected])
'@radix-ui/react-use-callback-ref': 1.0.1(@types/[email protected])([email protected])
- aria-hidden: 1.2.3
+ aria-hidden: 1.2.4
react: 18.2.0
react-dom: 18.2.0([email protected])
react-remove-scroll: 2.5.5(@types/[email protected])([email protected])
@@ -18347,6 +18671,24 @@ snapshots:
'@types/react': 18.3.3
'@types/react-dom': 18.3.0
+ dependencies:
+ '@floating-ui/react-dom': 2.0.2([email protected]([email protected]))([email protected])
+ '@radix-ui/react-compose-refs': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-primitive': 2.0.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-use-callback-ref': 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-rect': 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-size': 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/rect': 1.1.0
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.3
+ '@types/react-dom': 18.3.0
+
dependencies:
'@babel/runtime': 7.26.10
@@ -18367,6 +18709,16 @@ snapshots:
'@types/react': 18.3.3
'@types/react-dom': 18.3.0
+ dependencies:
+ '@radix-ui/react-primitive': 2.0.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.0(@types/[email protected])([email protected])
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.3
+ '@types/react-dom': 18.3.0
+
dependencies:
'@babel/runtime': 7.26.10
@@ -18388,6 +18740,16 @@ snapshots:
'@types/react': 18.3.3
'@types/react-dom': 18.3.0
+ dependencies:
+ '@radix-ui/react-compose-refs': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.0(@types/[email protected])([email protected])
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.3
+ '@types/react-dom': 18.3.0
+
dependencies:
'@babel/runtime': 7.26.10
@@ -18407,6 +18769,15 @@ snapshots:
'@types/react': 18.3.3
'@types/react-dom': 18.3.0
+ dependencies:
+ '@radix-ui/react-slot': 1.1.2(@types/[email protected])([email protected])
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.3
+ '@types/react-dom': 18.3.0
+
dependencies:
'@babel/runtime': 7.26.10
@@ -18503,10 +18874,9 @@ snapshots:
'@types/react': 18.3.3
'@types/react-dom': 18.3.0
dependencies:
- '@babel/runtime': 7.26.10
- '@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-primitive': 2.0.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
react: 18.2.0
react-dom: 18.2.0([email protected])
optionalDependencies:
@@ -18637,6 +19007,26 @@ snapshots:
'@types/react': 18.3.3
'@types/react-dom': 18.3.0
+ dependencies:
+ '@radix-ui/primitive': 1.1.1
+ '@radix-ui/react-compose-refs': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-dismissable-layer': 1.1.5(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-id': 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/react-primitive': 2.0.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-slot': 1.1.2(@types/[email protected])([email protected])
+ '@radix-ui/react-use-controllable-state': 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/react-visually-hidden': 1.1.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.3
+ '@types/react-dom': 18.3.0
+
dependencies:
'@babel/runtime': 7.26.10
@@ -18740,6 +19130,15 @@ snapshots:
'@types/react': 18.3.3
'@types/react-dom': 18.3.0
+ dependencies:
+ '@radix-ui/react-primitive': 2.0.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.3
+ '@types/react-dom': 18.3.0
+
'@radix-ui/[email protected]':
dependencies:
'@babel/runtime': 7.26.10
@@ -18764,14 +19163,14 @@ snapshots:
dependencies:
- '@babel/core': 7.26.10([email protected])
+ '@babel/core': 7.26.9([email protected])
'@babel/generator': 7.27.0
'@babel/parser': 7.26.10
- '@babel/plugin-syntax-decorators': 7.25.9(@babel/[email protected]([email protected]))
- '@babel/plugin-syntax-jsx': 7.25.9(@babel/[email protected]([email protected]))
- '@babel/preset-typescript': 7.26.0(@babel/[email protected]([email protected]))([email protected])
+ '@babel/plugin-syntax-decorators': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/plugin-syntax-jsx': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/preset-typescript': 7.26.0(@babel/[email protected]([email protected]))([email protected])
'@babel/traverse': 7.27.0([email protected])
- '@babel/types': 7.26.10
+ '@babel/types': 7.27.0
'@npmcli/package-json': 4.0.1
arg: 5.0.2
@@ -19199,7 +19598,7 @@ snapshots:
dependencies:
- '@babel/core': 7.26.10([email protected])
+ '@babel/core': 7.26.9([email protected])
'@sentry/babel-plugin-component-annotate': 2.22.7
'@sentry/cli': 2.39.1([email protected])([email protected])
dotenv: 16.4.7
@@ -19253,7 +19652,7 @@ snapshots:
'@sentry/[email protected]': {}
dependencies:
'@opentelemetry/api': 1.9.0
'@opentelemetry/semantic-conventions': 1.28.0
@@ -19266,7 +19665,7 @@ snapshots:
'@sentry/vercel-edge': 8.52.1
'@sentry/webpack-plugin': 2.22.7([email protected])([email protected])([email protected])
chalk: 3.0.0
resolve: 1.22.8
rollup: 3.29.5
stacktrace-parser: 0.1.10
@@ -19826,9 +20225,9 @@ snapshots:
dependencies:
'@babel/code-frame': 7.26.2
- '@babel/core': 7.26.10([email protected])
- '@babel/plugin-syntax-jsx': 7.25.9(@babel/[email protected]([email protected]))
- '@babel/plugin-syntax-typescript': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/core': 7.26.9([email protected])
+ '@babel/plugin-syntax-jsx': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/plugin-syntax-typescript': 7.25.9(@babel/[email protected]([email protected]))
'@babel/template': 7.27.0
'@babel/traverse': 7.27.0([email protected])
'@babel/types': 7.27.0
@@ -20018,9 +20417,9 @@ snapshots:
dependencies:
'@babel/code-frame': 7.26.2
- '@babel/core': 7.26.10([email protected])
- '@babel/plugin-syntax-jsx': 7.25.9(@babel/[email protected]([email protected]))
- '@babel/plugin-syntax-typescript': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/core': 7.26.9([email protected])
+ '@babel/plugin-syntax-jsx': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/plugin-syntax-typescript': 7.25.9(@babel/[email protected]([email protected]))
'@babel/template': 7.27.0
'@babel/traverse': 7.27.0([email protected])
'@babel/types': 7.27.0
@@ -20191,9 +20590,9 @@ snapshots:
dependencies:
- '@babel/core': 7.26.10([email protected])
- '@babel/plugin-syntax-jsx': 7.25.9(@babel/[email protected]([email protected]))
- '@babel/plugin-syntax-typescript': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/core': 7.26.9([email protected])
+ '@babel/plugin-syntax-jsx': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/plugin-syntax-typescript': 7.25.9(@babel/[email protected]([email protected]))
'@babel/template': 7.27.0
'@babel/traverse': 7.27.0([email protected])
'@babel/types': 7.27.0
@@ -20225,9 +20624,9 @@ snapshots:
dependencies:
'@babel/code-frame': 7.26.2
- '@babel/core': 7.26.10([email protected])
- '@babel/plugin-syntax-jsx': 7.25.9(@babel/[email protected]([email protected]))
- '@babel/plugin-syntax-typescript': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/core': 7.26.9([email protected])
+ '@babel/plugin-syntax-jsx': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/plugin-syntax-typescript': 7.25.9(@babel/[email protected]([email protected]))
'@babel/template': 7.27.0
'@babel/traverse': 7.27.0([email protected])
'@babel/types': 7.27.0
@@ -20414,7 +20813,7 @@ snapshots:
lz-string: 1.5.0
pretty-format: 27.5.1
dependencies:
'@adobe/css-tools': 4.4.0
'@babel/runtime': 7.26.10
@@ -21074,11 +21473,11 @@ snapshots:
'@ungap/[email protected]': {}
dependencies:
jose: 5.2.1
optionalDependencies:
react: 18.2.0
react-dom: 18.2.0([email protected])
@@ -21116,7 +21515,7 @@ snapshots:
consola: 3.4.2
defu: 6.1.4
get-port-please: 3.1.2
- h3: 1.13.0
+ h3: 1.15.1
http-shutdown: 1.2.2
jiti: 1.21.7
mlly: 1.7.4
@@ -21129,9 +21528,9 @@ snapshots:
dependencies:
- '@babel/core': 7.26.10([email protected])
- '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/[email protected]([email protected]))
- '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/core': 7.26.9([email protected])
+ '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/[email protected]([email protected]))
'@types/babel__core': 7.20.5
react-refresh: 0.14.2
@@ -21140,9 +21539,9 @@ snapshots:
dependencies:
- '@babel/core': 7.26.10([email protected])
- '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/[email protected]([email protected]))
- '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/core': 7.26.9([email protected])
+ '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/[email protected]([email protected]))
'@types/babel__core': 7.20.5
react-refresh: 0.14.2
@@ -21420,6 +21819,10 @@ snapshots:
dependencies:
acorn: 8.11.3
+ dependencies:
+ acorn: 8.14.0
+
dependencies:
acorn: 8.14.1
@@ -21629,6 +22032,10 @@ snapshots:
dependencies:
tslib: 2.8.1
+ dependencies:
+ tslib: 2.8.1
+
dependencies:
deep-equal: 2.2.2
@@ -21795,7 +22202,7 @@ snapshots:
dependencies:
- '@babel/core': 7.26.10([email protected])
+ '@babel/core': 7.26.9([email protected])
'@babel/parser': 7.27.0
'@babel/traverse': 7.27.0([email protected])
'@babel/types': 7.27.0
@@ -23152,7 +23559,7 @@ snapshots:
dependencies:
es-errors: 1.3.0
- get-intrinsic: 1.3.0
+ get-intrinsic: 1.2.7
has-tostringtag: 1.0.2
hasown: 2.0.2
@@ -23363,7 +23770,7 @@ snapshots:
debug: 4.4.0([email protected])
enhanced-resolve: 5.17.1
eslint: 8.57.0([email protected])
fast-glob: 3.3.2
get-tsconfig: 4.7.2
@@ -23375,7 +23782,7 @@ snapshots:
- eslint-import-resolver-webpack
- supports-color
dependencies:
debug: 3.2.7([email protected])
optionalDependencies:
@@ -23402,7 +23809,7 @@ snapshots:
doctrine: 2.1.0
eslint: 8.57.0([email protected])
eslint-import-resolver-node: 0.3.9([email protected])
hasown: 2.0.2
is-core-module: 2.13.1
is-glob: 4.0.3
@@ -24053,7 +24460,7 @@ snapshots:
has-symbols: 1.0.3
hasown: 2.0.2
dependencies:
call-bind-apply-helpers: 1.0.2
es-define-property: 1.0.1
@@ -24073,8 +24480,6 @@ snapshots:
optional: true
-
@@ -26693,8 +27098,8 @@ snapshots:
dependencies:
- acorn: 8.14.1
- acorn-jsx: 5.3.2([email protected])
+ acorn: 8.14.0
+ acorn-jsx: 5.3.2([email protected])
micromark-extension-mdx-expression: 3.0.0
micromark-extension-mdx-jsx: 3.0.0
micromark-extension-mdx-md: 2.0.0
@@ -27102,7 +27507,7 @@ snapshots:
dependencies:
- acorn: 8.14.1
+ acorn: 8.14.0
pathe: 2.0.3
pkg-types: 1.3.1
ufo: 1.5.4
@@ -27279,12 +27684,26 @@ snapshots:
- markdown-wasm
- supports-color
+ dependencies:
+ '@contentlayer2/core': 0.4.3([email protected])([email protected])([email protected])
+ '@contentlayer2/utils': 0.4.3
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ transitivePeerDependencies:
+ - '@effect-ts/otel-node'
+ - esbuild
+ - markdown-wasm
+ - supports-color
+
dependencies:
'@contentlayer2/utils': 0.5.3
react: 18.2.0
react-dom: 18.2.0([email protected])
transitivePeerDependencies:
@@ -27308,14 +27727,14 @@ snapshots:
dependencies:
js-yaml-loader: 1.2.2
dependencies:
react: 18.2.0
dependencies:
react: 18.2.0
react-dom: 18.2.0([email protected])
@@ -27354,6 +27773,34 @@ snapshots:
- '@babel/core'
- babel-plugin-macros
+ dependencies:
+ '@next/env': 14.2.26
+ '@swc/helpers': 0.5.5
+ busboy: 1.6.0
+ caniuse-lite: 1.0.30001695
+ graceful-fs: 4.2.11
+ postcss: 8.4.31
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ optionalDependencies:
+ '@next/swc-darwin-arm64': 14.2.26
+ '@next/swc-darwin-x64': 14.2.26
+ '@next/swc-linux-arm64-gnu': 14.2.26
+ '@next/swc-linux-arm64-musl': 14.2.26
+ '@next/swc-linux-x64-gnu': 14.2.26
+ '@next/swc-linux-x64-musl': 14.2.26
+ '@next/swc-win32-arm64-msvc': 14.2.26
+ '@next/swc-win32-ia32-msvc': 14.2.26
+ '@next/swc-win32-x64-msvc': 14.2.26
+ '@opentelemetry/api': 1.9.0
+ '@playwright/test': 1.49.1
+ sass: 1.72.0
+ transitivePeerDependencies:
+ - '@babel/core'
+ - babel-plugin-macros
+
@@ -27644,14 +28091,14 @@ snapshots:
dependencies:
mitt: 3.0.1
dependencies:
mitt: 3.0.1
react: 18.2.0
optionalDependencies:
@@ -28762,6 +29209,14 @@ snapshots:
optionalDependencies:
'@types/react': 18.3.3
+ dependencies:
+ react: 18.2.0
+ react-style-singleton: 2.2.3(@types/[email protected])([email protected])
+ tslib: 2.8.1
+ optionalDependencies:
+ '@types/react': 18.3.3
+
dependencies:
react: 18.2.0
@@ -28784,6 +29239,17 @@ snapshots:
optionalDependencies:
'@types/react': 18.3.3
+ dependencies:
+ react: 18.2.0
+ react-remove-scroll-bar: 2.3.8(@types/[email protected])([email protected])
+ react-style-singleton: 2.2.3(@types/[email protected])([email protected])
+ tslib: 2.8.1
+ use-callback-ref: 1.3.3(@types/[email protected])([email protected])
+ use-sidecar: 1.1.3(@types/[email protected])([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.3
+
dependencies:
react: 18.2.0
@@ -28834,6 +29300,14 @@ snapshots:
optionalDependencies:
'@types/react': 18.3.3
+ dependencies:
+ get-nonce: 1.0.1
+ react: 18.2.0
+ tslib: 2.8.1
+ optionalDependencies:
+ '@types/react': 18.3.3
+
dependencies:
'@babel/runtime': 7.26.10
@@ -28982,7 +29456,7 @@ snapshots:
esprima: 4.0.1
source-map: 0.6.1
tiny-invariant: 1.3.3
- tslib: 2.8.1
+ tslib: 2.6.2
dependencies:
@@ -29602,9 +30076,9 @@ snapshots:
dependencies:
'@antfu/ni': 23.3.1
- '@babel/core': 7.26.10([email protected])
+ '@babel/core': 7.26.9([email protected])
'@babel/parser': 7.26.10
- '@babel/plugin-transform-typescript': 7.27.0(@babel/[email protected]([email protected]))([email protected])
+ '@babel/plugin-transform-typescript': 7.27.0(@babel/[email protected]([email protected]))([email protected])
commander: 10.0.1
cosmiconfig: 8.3.6([email protected])
deepmerge: 4.3.1
@@ -30122,6 +30596,13 @@ snapshots:
optionalDependencies:
'@babel/core': 7.26.10([email protected])
+ dependencies:
+ client-only: 0.0.1
+ react: 18.2.0
+ optionalDependencies:
+ '@babel/core': 7.26.9([email protected])
+
@@ -30338,7 +30819,7 @@ snapshots:
dependencies:
'@jridgewell/source-map': 0.3.6
- acorn: 8.14.1
+ acorn: 8.14.0
commander: 2.20.3
source-map-support: 0.5.21
@@ -30708,7 +31189,7 @@ snapshots:
dependencies:
- acorn: 8.14.1
+ acorn: 8.14.0
estree-walker: 3.0.3
magic-string: 0.30.17
unplugin: 2.2.2
@@ -30764,7 +31245,7 @@ snapshots:
dependencies:
- acorn: 8.14.1
+ acorn: 8.14.0
escape-string-regexp: 5.0.0
estree-walker: 3.0.3
local-pkg: 1.1.1
@@ -30906,7 +31387,7 @@ snapshots:
dependencies:
- acorn: 8.14.1
+ acorn: 8.14.0
webpack-virtual-modules: 0.6.2
@@ -30993,6 +31474,13 @@ snapshots:
optionalDependencies:
'@types/react': 18.3.3
+ dependencies:
+ react: 18.2.0
+ tslib: 2.8.1
+ optionalDependencies:
+ '@types/react': 18.3.3
+
dependencies:
react: 18.2.0
@@ -31009,6 +31497,14 @@ snapshots:
optionalDependencies:
'@types/react': 18.3.3
+ dependencies:
+ detect-node-es: 1.1.0
+ react: 18.2.0
+ tslib: 2.8.1
+ optionalDependencies:
+ '@types/react': 18.3.3
+
dependencies:
react: 18.2.0
@@ -31066,7 +31562,7 @@ snapshots:
dependencies:
react: 18.2.0
react-dom: 18.2.0([email protected])
transitivePeerDependencies:
@@ -31143,9 +31639,9 @@ snapshots:
dependencies:
- '@babel/core': 7.26.10([email protected])
- '@babel/plugin-syntax-jsx': 7.25.9(@babel/[email protected]([email protected]))
- '@babel/plugin-syntax-typescript': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/core': 7.26.9([email protected])
+ '@babel/plugin-syntax-jsx': 7.25.9(@babel/[email protected]([email protected]))
+ '@babel/plugin-syntax-typescript': 7.25.9(@babel/[email protected]([email protected]))
'@types/micromatch': 4.0.9
'@vinxi/listhen': 1.5.6
boxen: 7.1.1
@@ -31157,8 +31653,8 @@ snapshots:
defu: 6.1.4
es-module-lexer: 1.6.0
esbuild: 0.25.2
- fast-glob: 3.3.2
- get-port-please: 3.1.1
+ fast-glob: 3.3.3
+ get-port-please: 3.1.2
h3: 1.13.0
hookable: 5.5.3
http-proxy: 1.18.1