Skip to content

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

Auth pages new page components (#40669)

Saxon Fletcher3d7d192ff614
diff --git a/apps/studio/components/interfaces/Auth/OAuthApps/OAuthServerSettingsForm.tsx b/apps/studio/components/interfaces/Auth/OAuthApps/OAuthServerSettingsForm.tsx
index 82c554c7a6a..4d0551730e3 100644
--- a/apps/studio/components/interfaces/Auth/OAuthApps/OAuthServerSettingsForm.tsx
+++ b/apps/studio/components/interfaces/Auth/OAuthApps/OAuthServerSettingsForm.tsx
@@ -7,11 +7,6 @@ import { toast } from 'sonner'
import * as z from 'zod'
import { useParams } from 'common'
-import {
- ScaffoldSection,
- ScaffoldSectionContent,
- ScaffoldSectionTitle,
-} from 'components/layouts/Scaffold'
import { InlineLink } from 'components/ui/InlineLink'
import NoPermission from 'components/ui/NoPermission'
import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
@@ -181,44 +176,126 @@ export const OAuthServerSettingsForm = () => {
}
if (isPermissionsLoaded && !canReadConfig) {
- return (
- <ScaffoldSection isFullWidth>
- <ScaffoldSectionTitle className="mb-4">OAuth Server</ScaffoldSectionTitle>
- <div className="mt-8">
- <NoPermission resourceText="view OAuth server settings" />
- </div>
- </ScaffoldSection>
- )
+ return <NoPermission resourceText="view OAuth server settings" />
}
if (isAuthConfigLoading || isLoadingPermissions) {
- return (
- <div className="pt-12">
- <GenericSkeletonLoader />
- </div>
- )
+ return <GenericSkeletonLoader />
}
return (
<>
- <ScaffoldSection isFullWidth>
- <ScaffoldSectionContent>
- <Form_Shadcn_ {...form}>
- <form onSubmit={form.handleSubmit(onSubmit)} className="pb-10">
- <Card>
+ <Form_Shadcn_ {...form}>
+ <form onSubmit={form.handleSubmit(onSubmit)} className="pb-10">
+ <Card>
+ <CardContent className="flex flex-col py-6 gap-y-4">
+ <FormField_Shadcn_
+ control={form.control}
+ name="OAUTH_SERVER_ENABLED"
+ render={({ field }) => (
+ <FormItemLayout
+ layout="flex-row-reverse"
+ label="Enable the Supabase OAuth Server"
+ description={
+ <>
+ Enable OAuth server functionality for your project to create and manage
+ OAuth applications.{' '}
+ <InlineLink href={`${DOCS_URL}/guides/auth/oauth-server`}>
+ Learn more
+ </InlineLink>
+ </>
+ }
+ >
+ <FormControl_Shadcn_>
+ <Switch
+ checked={field.value}
+ onCheckedChange={handleOAuthServerToggle}
+ disabled={!canUpdateConfig}
+ />
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+ </CardContent>
+ {/* Site URL and Authorization Path - Only show when OAuth Server is enabled */}
+ {form.watch('OAUTH_SERVER_ENABLED') && (
+ <>
<CardContent className="flex flex-col py-6 gap-y-4">
+ <FormItemLayout
+ label="Site URL"
+ description={
+ <>
+ The base URL of your application, configured in{' '}
+ <Link
+ href={`/project/${projectRef}/auth/url-configuration`}
+ rel="noreferrer"
+ className="text-foreground-light underline hover:text-foreground transition"
+ >
+ Auth URL Configuration
+ </Link>{' '}
+ settings.
+ </>
+ }
+ >
+ <Input_Shadcn_
+ value={authConfig?.SITE_URL}
+ disabled
+ placeholder="https://example.com"
+ />
+ </FormItemLayout>
+
+ <FormField_Shadcn_
+ control={form.control}
+ name="OAUTH_SERVER_AUTHORIZATION_PATH"
+ render={({ field }) => (
+ <FormItemLayout
+ label="Authorization Path"
+ description="Path where you'll implement the OAuth authorization UI (consent screens)."
+ >
+ <FormControl_Shadcn_>
+ <Input_Shadcn_ {...field} placeholder="/auth/authorize" />
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+ {(() => {
+ const authorizationUrl = `${authConfig?.SITE_URL}${form.watch('OAUTH_SERVER_AUTHORIZATION_PATH') || '/oauth/consent'}`
+ return (
+ <Admonition
+ type="tip"
+ title="Make sure this path is implemented in your application."
+ description={
+ <>
+ Preview Authorization URL:{' '}
+ <a
+ href={authorizationUrl}
+ target="_blank"
+ rel="noreferrer"
+ className="text-foreground-light underline hover:text-foreground transition"
+ >
+ {authorizationUrl}
+ </a>
+ </>
+ }
+ />
+ )
+ })()}
+ </CardContent>
+ <CardContent className="py-6">
<FormField_Shadcn_
control={form.control}
- name="OAUTH_SERVER_ENABLED"
+ name="OAUTH_SERVER_ALLOW_DYNAMIC_REGISTRATION"
render={({ field }) => (
<FormItemLayout
layout="flex-row-reverse"
- label="Enable the Supabase OAuth Server"
+ label="Allow Dynamic OAuth Apps"
description={
<>
- Enable OAuth server functionality for your project to create and manage
- OAuth applications.{' '}
- <InlineLink href={`${DOCS_URL}/guides/auth/oauth-server`}>
+ Enable dynamic OAuth app registration. Apps can be registered
+ programmatically via APIs.{' '}
+ <InlineLink
+ href={`${DOCS_URL}/guides/auth/oauth-server/mcp-authentication#oauth-client-setup`}
+ >
Learn more
</InlineLink>
</>
@@ -227,7 +304,7 @@ export const OAuthServerSettingsForm = () => {
<FormControl_Shadcn_>
<Switch
checked={field.value}
- onCheckedChange={handleOAuthServerToggle}
+ onCheckedChange={handleDynamicAppsToggle}
disabled={!canUpdateConfig}
/>
</FormControl_Shadcn_>
@@ -235,122 +312,25 @@ export const OAuthServerSettingsForm = () => {
)}
/>
</CardContent>
- {/* Site URL and Authorization Path - Only show when OAuth Server is enabled */}
- {form.watch('OAUTH_SERVER_ENABLED') && (
- <>
- <CardContent className="flex flex-col py-6 gap-y-4">
- <FormItemLayout
- label="Site URL"
- description={
- <>
- The base URL of your application, configured in{' '}
- <Link
- href={`/project/${projectRef}/auth/url-configuration`}
- rel="noreferrer"
- className="text-foreground-light underline hover:text-foreground transition"
- >
- Auth URL Configuration
- </Link>{' '}
- settings.
- </>
- }
- >
- <Input_Shadcn_
- value={authConfig?.SITE_URL}
- disabled
- placeholder="https://example.com"
- />
- </FormItemLayout>
-
- <FormField_Shadcn_
- control={form.control}
- name="OAUTH_SERVER_AUTHORIZATION_PATH"
- render={({ field }) => (
- <FormItemLayout
- label="Authorization Path"
- description="Path where you'll implement the OAuth authorization UI (consent screens)."
- >
- <FormControl_Shadcn_>
- <Input_Shadcn_ {...field} placeholder="/auth/authorize" />
- </FormControl_Shadcn_>
- </FormItemLayout>
- )}
- />
- {(() => {
- const authorizationUrl = `${authConfig?.SITE_URL}${form.watch('OAUTH_SERVER_AUTHORIZATION_PATH') || '/oauth/consent'}`
- return (
- <Admonition
- type="tip"
- title="Make sure this path is implemented in your application."
- description={
- <>
- Preview Authorization URL:{' '}
- <a
- href={authorizationUrl}
- target="_blank"
- rel="noreferrer"
- className="text-foreground-light underline hover:text-foreground transition"
- >
- {authorizationUrl}
- </a>
- </>
- }
- />
- )
- })()}
- </CardContent>
- <CardContent className="py-6">
- <FormField_Shadcn_
- control={form.control}
- name="OAUTH_SERVER_ALLOW_DYNAMIC_REGISTRATION"
- render={({ field }) => (
- <FormItemLayout
- layout="flex-row-reverse"
- label="Allow Dynamic OAuth Apps"
- description={
- <>
- Enable dynamic OAuth app registration. Apps can be registered
- programmatically via APIs.{' '}
- <InlineLink
- href={`${DOCS_URL}/guides/auth/oauth-server/mcp-authentication#oauth-client-setup`}
- >
- Learn more
- </InlineLink>
- </>
- }
- >
- <FormControl_Shadcn_>
- <Switch
- checked={field.value}
- onCheckedChange={handleDynamicAppsToggle}
- disabled={!canUpdateConfig}
- />
- </FormControl_Shadcn_>
- </FormItemLayout>
- )}
- />
- </CardContent>
- </>
- )}
+ </>
+ )}
- <CardFooter className="justify-end space-x-2">
- <Button type="default" onClick={() => form.reset()} disabled={isPending}>
- Cancel
- </Button>
- <Button
- type="primary"
- htmlType="submit"
- disabled={!canUpdateConfig || !form.formState.isDirty}
- loading={isPending}
- >
- Save changes
- </Button>
- </CardFooter>
- </Card>
- </form>
- </Form_Shadcn_>
- </ScaffoldSectionContent>
- </ScaffoldSection>
+ <CardFooter className="justify-end space-x-2">
+ <Button type="default" onClick={() => form.reset()} disabled={isPending}>
+ Cancel
+ </Button>
+ <Button
+ type="primary"
+ htmlType="submit"
+ disabled={!canUpdateConfig || !form.formState.isDirty}
+ loading={isPending}
+ >
+ Save changes
+ </Button>
+ </CardFooter>
+ </Card>
+ </form>
+ </Form_Shadcn_>
{/* Dynamic Apps Confirmation Modal */}
<ConfirmationModal
diff --git a/apps/studio/pages/project/[ref]/auth/advanced.tsx b/apps/studio/pages/project/[ref]/auth/advanced.tsx
index 923f7014305..0ea79ceb40b 100644
--- a/apps/studio/pages/project/[ref]/auth/advanced.tsx
+++ b/apps/studio/pages/project/[ref]/auth/advanced.tsx
@@ -4,14 +4,21 @@ import { useParams } from 'common'
import { AdvancedAuthSettingsForm } from 'components/interfaces/Auth/AdvancedAuthSettingsForm'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
-import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
import NoPermission from 'components/ui/NoPermission'
import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { UnknownInterface } from 'components/ui/UnknownInterface'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import type { NextPageWithLayout } from 'types'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import {
+ PageHeader,
+ PageHeaderDescription,
+ PageHeaderMeta,
+ PageHeaderSummary,
+ PageHeaderTitle,
+} from 'ui-patterns/PageHeader'
+import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'
const AdvancedPage: NextPageWithLayout = () => {
const { ref } = useParams()
@@ -31,25 +38,35 @@ const AdvancedPage: NextPageWithLayout = () => {
}
return (
- <ScaffoldContainer>
- {!isPermissionsLoaded ? (
- <ScaffoldSection isFullWidth>
- <GenericSkeletonLoader />
- </ScaffoldSection>
- ) : (
- <AdvancedAuthSettingsForm />
- )}
- </ScaffoldContainer>
+ <>
+ <PageHeader size="default">
+ <PageHeaderMeta>
+ <PageHeaderSummary>
+ <PageHeaderTitle>Advanced</PageHeaderTitle>
+ <PageHeaderDescription>
+ Configure advanced authentication server settings
+ </PageHeaderDescription>
+ </PageHeaderSummary>
+ </PageHeaderMeta>
+ </PageHeader>
+ <PageContainer size="default">
+ {!isPermissionsLoaded ? (
+ <PageSection>
+ <PageSectionContent>
+ <GenericSkeletonLoader />
+ </PageSectionContent>
+ </PageSection>
+ ) : (
+ <AdvancedAuthSettingsForm />
+ )}
+ </PageContainer>
+ </>
)
}
AdvancedPage.getLayout = (page) => (
<DefaultLayout>
- <AuthLayout>
- <PageLayout title="Advanced" subtitle="Configure advanced authentication server settings">
- {page}
- </PageLayout>
- </AuthLayout>
+ <AuthLayout>{page}</AuthLayout>
</DefaultLayout>
)
diff --git a/apps/studio/pages/project/[ref]/auth/audit-logs.tsx b/apps/studio/pages/project/[ref]/auth/audit-logs.tsx
index b3ed3be5f2f..7897a65e163 100644
--- a/apps/studio/pages/project/[ref]/auth/audit-logs.tsx
+++ b/apps/studio/pages/project/[ref]/auth/audit-logs.tsx
@@ -3,14 +3,22 @@ import { PermissionAction } from '@supabase/shared-types/out/constants'
import { AuditLogsForm } from 'components/interfaces/Auth/AuditLogsForm'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
-import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
import { DocsButton } from 'components/ui/DocsButton'
import NoPermission from 'components/ui/NoPermission'
import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { DOCS_URL } from 'lib/constants'
import type { NextPageWithLayout } from 'types'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import {
+ PageHeader,
+ PageHeaderAside,
+ PageHeaderDescription,
+ PageHeaderMeta,
+ PageHeaderSummary,
+ PageHeaderTitle,
+} from 'ui-patterns/PageHeader'
+import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'
const AuditLogsPage: NextPageWithLayout = () => {
const { can: canReadAuthSettings, isSuccess: isPermissionsLoaded } = useAsyncCheckPermissions(
@@ -23,31 +31,38 @@ const AuditLogsPage: NextPageWithLayout = () => {
}
return (
- <ScaffoldContainer>
- {!isPermissionsLoaded ? (
- <ScaffoldSection isFullWidth>
- <GenericSkeletonLoader />
- </ScaffoldSection>
- ) : (
- <AuditLogsForm />
- )}
- </ScaffoldContainer>
+ <>
+ <PageHeader size="default">
+ <PageHeaderMeta>
+ <PageHeaderSummary>
+ <PageHeaderTitle>Audit Logs</PageHeaderTitle>
+ <PageHeaderDescription>
+ Track and monitor auth events in your project
+ </PageHeaderDescription>
+ </PageHeaderSummary>
+ <PageHeaderAside>
+ <DocsButton href={`${DOCS_URL}/guides/auth/audit-logs`} />
+ </PageHeaderAside>
+ </PageHeaderMeta>
+ </PageHeader>
+ <PageContainer size="default">
+ {!isPermissionsLoaded ? (
+ <PageSection>
+ <PageSectionContent>
+ <GenericSkeletonLoader />
+ </PageSectionContent>
+ </PageSection>
+ ) : (
+ <AuditLogsForm />
+ )}
+ </PageContainer>
+ </>
)
}
-const secondaryActions = [<DocsButton key="docs" href={`${DOCS_URL}/guides/auth/audit-logs`} />]
-
AuditLogsPage.getLayout = (page) => (
<DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="Audit Logs"
- subtitle="Track and monitor auth events in your project"
- secondaryActions={secondaryActions}
- >
- {page}
- </PageLayout>
- </AuthLayout>
+ <AuthLayout>{page}</AuthLayout>
</DefaultLayout>
)
diff --git a/apps/studio/pages/project/[ref]/auth/hooks.tsx b/apps/studio/pages/project/[ref]/auth/hooks.tsx
index 302f3129d17..84fa9b5cf39 100644
--- a/apps/studio/pages/project/[ref]/auth/hooks.tsx
+++ b/apps/studio/pages/project/[ref]/auth/hooks.tsx
@@ -3,14 +3,22 @@ import { PermissionAction } from '@supabase/shared-types/out/constants'
import { HooksListing } from 'components/interfaces/Auth/Hooks/HooksListing'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
-import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
import { DocsButton } from 'components/ui/DocsButton'
import NoPermission from 'components/ui/NoPermission'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { DOCS_URL } from 'lib/constants'
import type { NextPageWithLayout } from 'types'
import { GenericSkeletonLoader } from 'ui-patterns'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import {
+ PageHeader,
+ PageHeaderAside,
+ PageHeaderDescription,
+ PageHeaderMeta,
+ PageHeaderSummary,
+ PageHeaderTitle,
+} from 'ui-patterns/PageHeader'
+import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'
const Hooks: NextPageWithLayout = () => {
const { can: canReadAuthSettings, isSuccess: isPermissionsLoaded } = useAsyncCheckPermissions(
@@ -23,30 +31,38 @@ const Hooks: NextPageWithLayout = () => {
}
return (
- <ScaffoldContainer>
- {!isPermissionsLoaded ? (
- <ScaffoldSection isFullWidth>
- <GenericSkeletonLoader />
- </ScaffoldSection>
- ) : (
- <HooksListing />
- )}
- </ScaffoldContainer>
+ <>
+ <PageHeader size="default">
+ <PageHeaderMeta>
+ <PageHeaderSummary>
+ <PageHeaderTitle>Auth Hooks</PageHeaderTitle>
+ <PageHeaderDescription>
+ Use Postgres functions or HTTP endpoints to customize the behavior of Supabase Auth
+ </PageHeaderDescription>
+ </PageHeaderSummary>
+ <PageHeaderAside>
+ <DocsButton href={`${DOCS_URL}/guides/auth/auth-hooks`} />
+ </PageHeaderAside>
+ </PageHeaderMeta>
+ </PageHeader>
+ <PageContainer size="default">
+ {!isPermissionsLoaded ? (
+ <PageSection>
+ <PageSectionContent>
+ <GenericSkeletonLoader />
+ </PageSectionContent>
+ </PageSection>
+ ) : (
+ <HooksListing />
+ )}
+ </PageContainer>
+ </>
)
}
-const secondaryActions = [<DocsButton key="docs" href={`${DOCS_URL}/guides/auth/auth-hooks`} />]
Hooks.getLayout = (page) => (
<DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="Auth Hooks"
- subtitle="Use Postgres functions or HTTP endpoints to customize the behavior of Supabase Auth"
- secondaryActions={secondaryActions}
- >
- {page}
- </PageLayout>
- </AuthLayout>
+ <AuthLayout>{page}</AuthLayout>
</DefaultLayout>
)
diff --git a/apps/studio/pages/project/[ref]/auth/mfa.tsx b/apps/studio/pages/project/[ref]/auth/mfa.tsx
index d6919211c31..3b530fb2e99 100644
--- a/apps/studio/pages/project/[ref]/auth/mfa.tsx
+++ b/apps/studio/pages/project/[ref]/auth/mfa.tsx
@@ -4,14 +4,21 @@ import { useParams } from 'common'
import { MfaAuthSettingsForm } from 'components/interfaces/Auth/MfaAuthSettingsForm/MfaAuthSettingsForm'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
-import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
import NoPermission from 'components/ui/NoPermission'
import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { UnknownInterface } from 'components/ui/UnknownInterface'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import type { NextPageWithLayout } from 'types'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import {
+ PageHeader,
+ PageHeaderDescription,
+ PageHeaderMeta,
+ PageHeaderSummary,
+ PageHeaderTitle,
+} from 'ui-patterns/PageHeader'
+import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'
const MfaPage: NextPageWithLayout = () => {
const { ref } = useParams()
@@ -31,28 +38,35 @@ const MfaPage: NextPageWithLayout = () => {
}
return (
- <ScaffoldContainer>
- {!isPermissionsLoaded ? (
- <ScaffoldSection isFullWidth>
- <GenericSkeletonLoader />
- </ScaffoldSection>
- ) : (
- <MfaAuthSettingsForm />
- )}
- </ScaffoldContainer>
+ <>
+ <PageHeader size="default">
+ <PageHeaderMeta>
+ <PageHeaderSummary>
+ <PageHeaderTitle>Multi-Factor Authentication (MFA)</PageHeaderTitle>
+ <PageHeaderDescription>
+ Requires users to provide additional verification factors to authenticate
+ </PageHeaderDescription>
+ </PageHeaderSummary>
+ </PageHeaderMeta>
+ </PageHeader>
+ <PageContainer size="default">
+ {!isPermissionsLoaded ? (
+ <PageSection>
+ <PageSectionContent>
+ <GenericSkeletonLoader />
+ </PageSectionContent>
+ </PageSection>
+ ) : (
+ <MfaAuthSettingsForm />
+ )}
+ </PageContainer>
+ </>
)
}
MfaPage.getLayout = (page) => (
<DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="Multi-Factor Authentication (MFA)"
- subtitle="Requires users to provide additional verification factors to authenticate"
- >
- {page}
- </PageLayout>
- </AuthLayout>
+ <AuthLayout>{page}</AuthLayout>
</DefaultLayout>
)
diff --git a/apps/studio/pages/project/[ref]/auth/oauth-apps.tsx b/apps/studio/pages/project/[ref]/auth/oauth-apps.tsx
index 837250177bd..1afacb80cc8 100644
--- a/apps/studio/pages/project/[ref]/auth/oauth-apps.tsx
+++ b/apps/studio/pages/project/[ref]/auth/oauth-apps.tsx
@@ -1,20 +1,39 @@
import { OAuthAppsList } from 'components/interfaces/Auth/OAuthApps/OAuthAppsList'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
-import { FormHeader } from 'components/ui/Forms/FormHeader'
+import { DocsButton } from 'components/ui/DocsButton'
import { DOCS_URL } from 'lib/constants'
import type { NextPageWithLayout } from 'types'
+import { PageSection, PageSectionContent } from 'ui-patterns'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import {
+ PageHeader,
+ PageHeaderAside,
+ PageHeaderMeta,
+ PageHeaderSummary,
+ PageHeaderTitle,
+} from 'ui-patterns/PageHeader'
const OAuthApps: NextPageWithLayout = () => (
- <ScaffoldContainer>
- <ScaffoldSection>
- <div className="col-span-12">
- <FormHeader title="OAuth Apps" docsUrl={`${DOCS_URL}/guides/auth/oauth-server`} />
- <OAuthAppsList />
- </div>
- </ScaffoldSection>
- </ScaffoldContainer>
+ <>
+ <PageHeader size="default">
+ <PageHeaderMeta>
+ <PageHeaderSummary>
+ <PageHeaderTitle>OAuth Apps</PageHeaderTitle>
+ </PageHeaderSummary>
+ <PageHeaderAside>
+ <DocsButton href={`${DOCS_URL}/guides/auth/oauth-server`} />
+ </PageHeaderAside>
+ </PageHeaderMeta>
+ </PageHeader>
+ <PageContainer size="default">
+ <PageSection>
+ <PageSectionContent>
+ <OAuthAppsList />
+ </PageSectionContent>
+ </PageSection>
+ </PageContainer>
+ </>
)
OAuthApps.getLayout = (page) => (
diff --git a/apps/studio/pages/project/[ref]/auth/oauth-server.tsx b/apps/studio/pages/project/[ref]/auth/oauth-server.tsx
index d98b2c4fc5d..169a032c191 100644
--- a/apps/studio/pages/project/[ref]/auth/oauth-server.tsx
+++ b/apps/studio/pages/project/[ref]/auth/oauth-server.tsx
@@ -1,33 +1,50 @@
import { OAuthServerSettingsForm } from 'components/interfaces/Auth/OAuthApps/OAuthServerSettingsForm'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
import { DocsButton } from 'components/ui/DocsButton'
-import { ScaffoldContainer } from 'components/layouts/Scaffold'
import { DOCS_URL } from 'lib/constants'
import type { NextPageWithLayout } from 'types'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import {
+ PageHeader,
+ PageHeaderAside,
+ PageHeaderDescription,
+ PageHeaderMeta,
+ PageHeaderSummary,
+ PageHeaderTitle,
+} from 'ui-patterns/PageHeader'
+import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'
const ProvidersPage: NextPageWithLayout = () => {
return (
- <ScaffoldContainer>
- <OAuthServerSettingsForm />
- </ScaffoldContainer>
+ <>
+ <PageHeader size="default">
+ <PageHeaderMeta>
+ <PageHeaderSummary>
+ <PageHeaderTitle>OAuth Server</PageHeaderTitle>
+ <PageHeaderDescription>
+ Configure your project to act as an identity provider for third-party applications
+ </PageHeaderDescription>
+ </PageHeaderSummary>
+ <PageHeaderAside>
+ <DocsButton href={`${DOCS_URL}/guides/auth/oauth-server`} />
+ </PageHeaderAside>
+ </PageHeaderMeta>
+ </PageHeader>
+ <PageContainer size="default">
+ <PageSection>
+ <PageSectionContent>
+ <OAuthServerSettingsForm />
+ </PageSectionContent>
+ </PageSection>
+ </PageContainer>
+ </>
)
}
-const secondaryActions = [<DocsButton key="docs" href={`${DOCS_URL}/guides/auth/oauth-server`} />]
-
ProvidersPage.getLayout = (page) => (
<DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="OAuth Server"
- subtitle="Configure your project to act as an identity provider for third-party applications"
- secondaryActions={secondaryActions}
- >
- {page}
- </PageLayout>
- </AuthLayout>
+ <AuthLayout>{page}</AuthLayout>
</DefaultLayout>
)
diff --git a/apps/studio/pages/project/[ref]/auth/overview.tsx b/apps/studio/pages/project/[ref]/auth/overview.tsx
index d68f9c83617..619e0208e1c 100644
--- a/apps/studio/pages/project/[ref]/auth/overview.tsx
+++ b/apps/studio/pages/project/[ref]/auth/overview.tsx
@@ -3,14 +3,20 @@ import { OverviewLearnMore } from 'components/interfaces/Auth/Overview/OverviewL
import { OverviewMetrics } from 'components/interfaces/Auth/Overview/OverviewMetrics'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
-import { ScaffoldContainer } from 'components/layouts/Scaffold'
import { DocsButton } from 'components/ui/DocsButton'
import { DOCS_URL } from 'lib/constants'
import { useRouter } from 'next/router'
import { useContext, useEffect } from 'react'
import type { NextPageWithLayout } from 'types'
import { useAuthOverviewQuery } from 'data/auth/auth-overview-query'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import {
+ PageHeader,
+ PageHeaderAside,
+ PageHeaderMeta,
+ PageHeaderSummary,
+ PageHeaderTitle,
+} from 'ui-patterns/PageHeader'
const AuthOverview: NextPageWithLayout = () => {
const router = useRouter()
@@ -36,33 +42,33 @@ const AuthOverview: NextPageWithLayout = () => {
}
return (
- <ScaffoldContainer size="large">
- <div className="mb-4 flex flex-col gap-2">
+ <>
+ <PageHeader size="large">
+ <PageHeaderMeta>
+ <PageHeaderSummary>
+ <PageHeaderTitle>Overview</PageHeaderTitle>
+ </PageHeaderSummary>
+ <PageHeaderAside>
+ <div className="flex items-center gap-2">
+ <span className="text-sm text-foreground-light">
+ <span className="text-foreground">Last 24 hours</span>
+ </span>
+ <DocsButton href={`${DOCS_URL}/guides/auth`} />
+ </div>
+ </PageHeaderAside>
+ </PageHeaderMeta>
+ </PageHeader>
+ <PageContainer size="large">
<OverviewMetrics metrics={metrics} isLoading={isLoading} error={error} />
<OverviewLearnMore />
- </div>
- </ScaffoldContainer>
+ </PageContainer>
+ </>
)
}
AuthOverview.getLayout = (page) => (
<DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="Overview"
- secondaryActions={
- <div className="flex items-center gap-2">
- <span className="text-sm text-foreground-light">
- <span className="text-foreground">Last 24 hours</span>
- </span>
- <DocsButton href={`${DOCS_URL}/guides/auth`} />
- </div>
- }
- size="large"
- >
- {page}
- </PageLayout>
- </AuthLayout>
+ <AuthLayout>{page}</AuthLayout>
</DefaultLayout>
)
diff --git a/apps/studio/pages/project/[ref]/auth/policies.tsx b/apps/studio/pages/project/[ref]/auth/policies.tsx
index d39387fd8c8..c6503701a2a 100644
--- a/apps/studio/pages/project/[ref]/auth/policies.tsx
+++ b/apps/studio/pages/project/[ref]/auth/policies.tsx
@@ -13,9 +13,7 @@ import { PolicyEditorPanel } from 'components/interfaces/Auth/Policies/PolicyEdi
import { generatePolicyUpdateSQL } from 'components/interfaces/Auth/Policies/PolicyTableRow/PolicyTableRow.utils'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
import { SIDEBAR_KEYS } from 'components/layouts/ProjectLayout/LayoutSidebar/LayoutSidebarProvider'
-import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
import AlertError from 'components/ui/AlertError'
import { DocsButton } from 'components/ui/DocsButton'
import NoPermission from 'components/ui/NoPermission'
@@ -34,6 +32,16 @@ import { useSidebarManagerSnapshot } from 'state/sidebar-manager-state'
import type { NextPageWithLayout } from 'types'
import { Button } from 'ui'
import { Input } from 'ui-patterns/DataInputs/Input'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import {
+ PageHeader,
+ PageHeaderAside,
+ PageHeaderDescription,
+ PageHeaderMeta,
+ PageHeaderSummary,
+ PageHeaderTitle,
+} from 'ui-patterns/PageHeader'
+import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'
/**
* Filter tables by table name and policy name
@@ -213,106 +221,112 @@ const AuthPoliciesPage: NextPageWithLayout = () => {
}
return (
- <ScaffoldContainer size="large">
- <ScaffoldSection isFullWidth>
- <div className="mb-4 flex flex-row gap-x-2">
- <SchemaSelector
- className="w-full lg:w-[180px]"
- size="tiny"
- align="end"
- showError={false}
- selectedSchemaName={schema}
- onSelectSchema={(schemaName) => {
- setSchema(schemaName)
- setSearchString('')
- }}
- />
- <Input
- size="tiny"
- placeholder="Filter tables and policies"
- className="w-full lg:w-52"
- value={searchString || ''}
- onChange={(e) => {
- const str = e.target.value
- setSearchString(str)
- }}
- icon={<Search />}
- actions={
- searchString ? (
- <Button
- size="tiny"
- type="text"
- className="p-0 h-5 w-5"
- icon={<X />}
- onClick={() => setSearchString('')}
- />
- ) : null
- }
- />
- </div>
+ <>
+ <PageHeader size="large">
+ <PageHeaderMeta>
+ <PageHeaderSummary>
+ <PageHeaderTitle>Policies</PageHeaderTitle>
+ <PageHeaderDescription>
+ Manage Row Level Security policies for your tables
+ </PageHeaderDescription>
+ </PageHeaderSummary>
+ <PageHeaderAside>
+ <DocsButton href={`${DOCS_URL}/learn/auth-deep-dive/auth-row-level-security`} />
+ </PageHeaderAside>
+ </PageHeaderMeta>
+ </PageHeader>
+ <PageContainer size="large">
+ <PageSection>
+ <PageSectionContent>
+ <div className="mb-4 flex flex-row gap-x-2">
+ <SchemaSelector
+ className="w-full lg:w-[180px]"
+ size="tiny"
+ align="end"
+ showError={false}
+ selectedSchemaName={schema}
+ onSelectSchema={(schemaName) => {
+ setSchema(schemaName)
+ setSearchString('')
+ }}
+ />
+ <Input
+ size="tiny"
+ placeholder="Filter tables and policies"
+ className="block w-full lg:w-52"
+ containerClassName="[&>div>svg]:-mt-0.5"
+ value={searchString || ''}
+ onChange={(e) => {
+ const str = e.target.value
+ setSearchString(str)
+ }}
+ icon={<Search size={14} />}
+ actions={
+ searchString ? (
+ <Button
+ size="tiny"
+ type="text"
+ className="p-0 h-5 w-5"
+ icon={<X />}
+ onClick={() => setSearchString('')}
+ />
+ ) : null
+ }
+ />
+ </div>
+
+ {isLoading && <GenericSkeletonLoader />}
- {isLoading && <GenericSkeletonLoader />}
+ {isError && <AlertError error={error} subject="Failed to retrieve tables" />}
- {isError && <AlertError error={error} subject="Failed to retrieve tables" />}
+ {isSuccess && (
+ <PoliciesDataProvider
+ policies={policies ?? []}
+ isPoliciesLoading={isLoadingPolicies}
+ isPoliciesError={isPoliciesError}
+ policiesError={policiesError ?? undefined}
+ exposedSchemas={exposedSchemas}
+ >
+ <Policies
+ search={deferredSearchString}
+ schema={schema}
+ tables={tablesWithVisibility}
+ hasTables={(tables ?? []).length > 0}
+ isLocked={isSchemaLocked}
+ visibleTableIds={visibleTableIds}
+ onSelectCreatePolicy={handleSelectCreatePolicy}
+ onSelectEditPolicy={handleSelectEditPolicy}
+ onResetSearch={handleResetSearch}
+ />
+ </PoliciesDataProvider>
+ )}
- {isSuccess && (
- <PoliciesDataProvider
- policies={policies ?? []}
- isPoliciesLoading={isLoadingPolicies}
- isPoliciesError={isPoliciesError}
- policiesError={policiesError ?? undefined}
- exposedSchemas={exposedSchemas}
- >
- <Policies
- search={deferredSearchString}
+ <PolicyEditorPanel
+ visible={showCreatePolicy || isUpdatingPolicy}
schema={schema}
- tables={tablesWithVisibility}
- hasTables={(tables ?? []).length > 0}
- isLocked={isSchemaLocked}
- visibleTableIds={visibleTableIds}
- onSelectCreatePolicy={handleSelectCreatePolicy}
- onSelectEditPolicy={handleSelectEditPolicy}
- onResetSearch={handleResetSearch}
+ searchString={searchString}
+ selectedTable={isUpdatingPolicy ? undefined : selectedTable}
+ selectedPolicy={isUpdatingPolicy ? selectedPolicyIdToEdit : undefined}
+ onSelectCancel={() => {
+ setSelectedTable(undefined)
+ if (isUpdatingPolicy) {
+ setSelectedPolicyIdToEdit(null)
+ } else {
+ setShowCreatePolicy(false)
+ }
+ }}
+ authContext="database"
/>
- </PoliciesDataProvider>
- )}
-
- {/* Create or Edit Policy */}
- <PolicyEditorPanel
- visible={showCreatePolicy || isUpdatingPolicy}
- schema={schema}
- searchString={searchString}
- selectedTable={isUpdatingPolicy ? undefined : selectedTable}
- selectedPolicy={isUpdatingPolicy ? selectedPolicyIdToEdit : undefined}
- onSelectCancel={() => {
- setSelectedTable(undefined)
- if (isUpdatingPolicy) {
- setSelectedPolicyIdToEdit(null)
- } else {
- setShowCreatePolicy(false)
- }
- }}
- authContext="database"
- />
- </ScaffoldSection>
- </ScaffoldContainer>
+ </PageSectionContent>
+ </PageSection>
+ </PageContainer>
+ </>
)
}
AuthPoliciesPage.getLayout = (page) => (
<DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="Policies"
- subtitle="Manage Row Level Security policies for your tables"
- secondaryActions={
- <DocsButton href={`${DOCS_URL}/learn/auth-deep-dive/auth-row-level-security`} />
- }
- size="large"
- >
- {page}
- </PageLayout>
- </AuthLayout>
+ <AuthLayout>{page}</AuthLayout>
</DefaultLayout>
)
diff --git a/apps/studio/pages/project/[ref]/auth/protection.tsx b/apps/studio/pages/project/[ref]/auth/protection.tsx
index efd6eec56a1..967a9b15c0a 100644
--- a/apps/studio/pages/project/[ref]/auth/protection.tsx
+++ b/apps/studio/pages/project/[ref]/auth/protection.tsx
@@ -4,14 +4,21 @@ import { useParams } from 'common'
import { ProtectionAuthSettingsForm } from 'components/interfaces/Auth/ProtectionAuthSettingsForm/ProtectionAuthSettingsForm'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
-import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
import NoPermission from 'components/ui/NoPermission'
import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { UnknownInterface } from 'components/ui/UnknownInterface'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import type { NextPageWithLayout } from 'types'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import {
+ PageHeader,
+ PageHeaderDescription,
+ PageHeaderMeta,
+ PageHeaderSummary,
+ PageHeaderTitle,
+} from 'ui-patterns/PageHeader'
+import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'
const ProtectionPage: NextPageWithLayout = () => {
const { ref } = useParams()
@@ -31,28 +38,35 @@ const ProtectionPage: NextPageWithLayout = () => {
}
return (
- <ScaffoldContainer>
- {!isPermissionsLoaded ? (
- <ScaffoldSection isFullWidth>
- <GenericSkeletonLoader />
- </ScaffoldSection>
- ) : (
- <ProtectionAuthSettingsForm />
- )}
- </ScaffoldContainer>
+ <>
+ <PageHeader size="default">
+ <PageHeaderMeta>
+ <PageHeaderSummary>
+ <PageHeaderTitle>Attack Protection</PageHeaderTitle>
+ <PageHeaderDescription>
+ Configure security settings to protect your project from attacks
+ </PageHeaderDescription>
+ </PageHeaderSummary>
+ </PageHeaderMeta>
+ </PageHeader>
+ <PageContainer size="default">
+ {!isPermissionsLoaded ? (
+ <PageSection>
+ <PageSectionContent>
+ <GenericSkeletonLoader />
+ </PageSectionContent>
+ </PageSection>
+ ) : (
+ <ProtectionAuthSettingsForm />
+ )}
+ </PageContainer>
+ </>
)
}
ProtectionPage.getLayout = (page) => (
<DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="Attack Protection"
- subtitle="Configure security settings to protect your project from attacks"
- >
- {page}
- </PageLayout>
- </AuthLayout>
+ <AuthLayout>{page}</AuthLayout>
</DefaultLayout>
)
diff --git a/apps/studio/pages/project/[ref]/auth/providers.tsx b/apps/studio/pages/project/[ref]/auth/providers.tsx
index ce10e26e708..10b456a1ce4 100644
--- a/apps/studio/pages/project/[ref]/auth/providers.tsx
+++ b/apps/studio/pages/project/[ref]/auth/providers.tsx
@@ -2,18 +2,18 @@ import { AuthProvidersForm } from 'components/interfaces/Auth/AuthProvidersForm'
import { BasicAuthSettingsForm } from 'components/interfaces/Auth/BasicAuthSettingsForm'
import { AuthProvidersLayout } from 'components/layouts/AuthLayout/AuthProvidersLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { ScaffoldContainer } from 'components/layouts/Scaffold'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import type { NextPageWithLayout } from 'types'
+import { PageContainer } from 'ui-patterns/PageContainer'
const ProvidersPage: NextPageWithLayout = () => {
const showProviders = useIsFeatureEnabled('authentication:show_providers')
return (
- <ScaffoldContainer>
+ <PageContainer size="default">
<BasicAuthSettingsForm />
{showProviders && <AuthProvidersForm />}
- </ScaffoldContainer>
+ </PageContainer>
)
}
diff --git a/apps/studio/pages/project/[ref]/auth/rate-limits.tsx b/apps/studio/pages/project/[ref]/auth/rate-limits.tsx
index a58829a8791..bb85a7b1911 100644
--- a/apps/studio/pages/project/[ref]/auth/rate-limits.tsx
+++ b/apps/studio/pages/project/[ref]/auth/rate-limits.tsx
@@ -4,8 +4,6 @@ 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'
-import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
-import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
import { DocsButton } from 'components/ui/DocsButton'
import NoPermission from 'components/ui/NoPermission'
import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
@@ -14,6 +12,16 @@ import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { DOCS_URL } from 'lib/constants'
import type { NextPageWithLayout } from 'types'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import {
+ PageHeader,
+ PageHeaderAside,
+ PageHeaderDescription,
+ PageHeaderMeta,
+ PageHeaderSummary,
+ PageHeaderTitle,
+} from 'ui-patterns/PageHeader'
+import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'
const RateLimitsPage: NextPageWithLayout = () => {
const { ref } = useParams()
@@ -33,33 +41,40 @@ const RateLimitsPage: NextPageWithLayout = () => {
}
return (
- <ScaffoldContainer>
- {!isPermissionsLoaded ? (
- <ScaffoldSection isFullWidth>
- <GenericSkeletonLoader />
- </ScaffoldSection>
- ) : (
- <RateLimits />
- )}
- </ScaffoldContainer>
+ <>
+ <PageHeader size="default">
+ <PageHeaderMeta>
+ <PageHeaderSummary>
+ <PageHeaderTitle>Rate Limits</PageHeaderTitle>
+ <PageHeaderDescription>
+ Safeguard against bursts of incoming traffic to prevent abuse and maximize stability
+ </PageHeaderDescription>
+ </PageHeaderSummary>
+ <PageHeaderAside>
+ <DocsButton
+ href={`${DOCS_URL}/guides/platform/going-into-prod#rate-limiting-resource-allocation--abuse-prevention`}
+ />
+ </PageHeaderAside>
+ </PageHeaderMeta>
+ </PageHeader>
+ <PageContainer size="default">
+ {!isPermissionsLoaded ? (
+ <PageSection>
+ <PageSectionContent>
+ <GenericSkeletonLoader />
+ </PageSectionContent>
+ </PageSection>
+ ) : (
+ <RateLimits />
+ )}
+ </PageContainer>
+ </>
)
}
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={`${DOCS_URL}/guides/platform/going-into-prod#rate-limiting-resource-allocation--abuse-prevention`}
- />
- }
- >
- {page}
- </PageLayout>
- </AuthLayout>
+ <AuthLayout>{page}</AuthLayout>
</DefaultLayout>
)
diff --git a/apps/studio/pages/project/[ref]/auth/sessions.tsx b/apps/studio/pages/project/[ref]/auth/sessions.tsx
index eb22314bb1d..b1a1e588016 100644
--- a/apps/studio/pages/project/[ref]/auth/sessions.tsx
+++ b/apps/studio/pages/project/[ref]/auth/sessions.tsx
@@ -3,12 +3,19 @@ import { PermissionAction } from '@supabase/shared-types/out/constants'
import { SessionsAuthSettingsForm } from 'components/interfaces/Auth/SessionsAuthSettingsForm/SessionsAuthSettingsForm'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
-import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
import NoPermission from 'components/ui/NoPermission'
import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import type { NextPageWithLayout } from 'types'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import {
+ PageHeader,
+ PageHeaderDescription,
+ PageHeaderMeta,
+ PageHeaderSummary,
+ PageHeaderTitle,
+} from 'ui-patterns/PageHeader'
+import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'
const SessionsPage: NextPageWithLayout = () => {
const { can: canReadAuthSettings, isSuccess: isPermissionsLoaded } = useAsyncCheckPermissions(
@@ -21,28 +28,35 @@ const SessionsPage: NextPageWithLayout = () => {
}
return (
- <ScaffoldContainer>
- {!isPermissionsLoaded ? (
- <ScaffoldSection isFullWidth>
- <GenericSkeletonLoader />
- </ScaffoldSection>
- ) : (
- <SessionsAuthSettingsForm />
- )}
- </ScaffoldContainer>
+ <>
+ <PageHeader size="default">
+ <PageHeaderMeta>
+ <PageHeaderSummary>
+ <PageHeaderTitle>User Sessions</PageHeaderTitle>
+ <PageHeaderDescription>
+ Configure settings for user sessions and refresh tokens
+ </PageHeaderDescription>
+ </PageHeaderSummary>
+ </PageHeaderMeta>
+ </PageHeader>
+ <PageContainer size="default">
+ {!isPermissionsLoaded ? (
+ <PageSection>
+ <PageSectionContent>
+ <GenericSkeletonLoader />
+ </PageSectionContent>
+ </PageSection>
+ ) : (
+ <SessionsAuthSettingsForm />
+ )}
+ </PageContainer>
+ </>
)
}
SessionsPage.getLayout = (page) => (
<DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="User Sessions"
- subtitle="Configure settings for user sessions and refresh tokens"
- >
- {page}
- </PageLayout>
- </AuthLayout>
+ <AuthLayout>{page}</AuthLayout>
</DefaultLayout>
)
diff --git a/apps/studio/pages/project/[ref]/auth/smtp.tsx b/apps/studio/pages/project/[ref]/auth/smtp.tsx
index ba95e4c9eed..7bc3cf592a5 100644
--- a/apps/studio/pages/project/[ref]/auth/smtp.tsx
+++ b/apps/studio/pages/project/[ref]/auth/smtp.tsx
@@ -3,11 +3,12 @@ import { PermissionAction } from '@supabase/shared-types/out/constants'
import { SmtpForm } from 'components/interfaces/Auth/SmtpForm/SmtpForm'
import { AuthEmailsLayout } from 'components/layouts/AuthLayout/AuthEmailsLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
import NoPermission from 'components/ui/NoPermission'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import type { NextPageWithLayout } from 'types'
import { GenericSkeletonLoader } from 'ui-patterns'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'
const SmtpPage: NextPageWithLayout = () => {
const { can: canReadAuthSettings, isSuccess: isPermissionsLoaded } = useAsyncCheckPermissions(
@@ -20,15 +21,17 @@ const SmtpPage: NextPageWithLayout = () => {
}
return (
- <ScaffoldContainer>
+ <PageContainer size="default">
{!isPermissionsLoaded ? (
- <ScaffoldSection isFullWidth>
- <GenericSkeletonLoader />
- </ScaffoldSection>
+ <PageSection>
+ <PageSectionContent>
+ <GenericSkeletonLoader />
+ </PageSectionContent>
+ </PageSection>
) : (
<SmtpForm />
)}
- </ScaffoldContainer>
+ </PageContainer>
)
}
diff --git a/apps/studio/pages/project/[ref]/auth/templates/[templateId].tsx b/apps/studio/pages/project/[ref]/auth/templates/[templateId].tsx
index e8578974935..9ff95a3a5f9 100644
--- a/apps/studio/pages/project/[ref]/auth/templates/[templateId].tsx
+++ b/apps/studio/pages/project/[ref]/auth/templates/[templateId].tsx
@@ -14,12 +14,6 @@ import { slugifyTitle } from 'components/interfaces/Auth/EmailTemplates/EmailTem
import { TemplateEditor } from 'components/interfaces/Auth/EmailTemplates/TemplateEditor'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
-import {
- ScaffoldContainer,
- ScaffoldSection,
- ScaffoldSectionTitle,
-} from 'components/layouts/Scaffold'
import { DocsButton } from 'components/ui/DocsButton'
import NoPermission from 'components/ui/NoPermission'
import { useAuthConfigQuery } from 'data/auth/auth-config-query'
@@ -39,6 +33,30 @@ import {
} from 'ui'
import { Admonition, GenericSkeletonLoader } from 'ui-patterns'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import {
+ PageHeader,
+ PageHeaderAside,
+ PageHeaderBreadcrumb,
+ PageHeaderDescription,
+ PageHeaderMeta,
+ PageHeaderSummary,
+ PageHeaderTitle,
+} from 'ui-patterns/PageHeader'
+import {
+ PageSection,
+ PageSectionContent,
+ PageSectionMeta,
+ PageSectionSummary,
+ PageSectionTitle,
+} from 'ui-patterns/PageSection'
+import {
+ BreadcrumbItem,
+ BreadcrumbLink,
+ BreadcrumbList,
+ BreadcrumbPage,
+ BreadcrumbSeparator,
+} from 'ui/src/components/shadcn/ui/breadcrumb'
const TemplatePage: NextPageWithLayout = () => {
return <RedirectToTemplates />
@@ -158,92 +176,120 @@ const RedirectToTemplates = () => {
}
return (
- <PageLayout
- title={template.title}
- subtitle={template.purpose || 'Configure and customize email templates.'}
- breadcrumbs={[
- {
- label: 'Emails',
- href: `/project/${ref}/auth/templates`,
- },
- ]}
- secondaryActions={[
- <DocsButton
- key="docs"
- href={`${DOCS_URL}/guides/local-development/customizing-email-templates#${isSecurityTemplate ? 'security' : 'auth'}emailtemplate${templateIdForDocs}`}
- />,
- ]}
- >
- <ScaffoldContainer bottomPadding>
+ <>
+ <PageHeader size="default">
+ <PageHeaderBreadcrumb>
+ <BreadcrumbList>
+ <BreadcrumbItem>
+ <BreadcrumbLink asChild>
+ <Link href={`/project/${ref}/auth/templates`}>Emails</Link>
+ </BreadcrumbLink>
+ </BreadcrumbItem>
+ <BreadcrumbSeparator />
+ <BreadcrumbItem>
+ <BreadcrumbPage>{template.title}</BreadcrumbPage>
+ </BreadcrumbItem>
+ </BreadcrumbList>
+ </PageHeaderBreadcrumb>
+ <PageHeaderMeta>
+ <PageHeaderSummary>
+ <PageHeaderTitle>{template.title}</PageHeaderTitle>
+ <PageHeaderDescription>
+ {template.purpose || 'Configure and customize email templates.'}
+ </PageHeaderDescription>
+ </PageHeaderSummary>
+ <PageHeaderAside>
+ <DocsButton
+ href={`${DOCS_URL}/guides/local-development/customizing-email-templates#${isSecurityTemplate ? 'security' : 'auth'}emailtemplate${templateIdForDocs}`}
+ />
+ </PageHeaderAside>
+ </PageHeaderMeta>
+ </PageHeader>
+ <PageContainer size="default" className="pb-16">
{!isPermissionsLoaded || isLoadingConfig ? (
- <ScaffoldSection isFullWidth>
- <GenericSkeletonLoader />
- </ScaffoldSection>
+ <PageSection>
+ <PageSectionContent>
+ <GenericSkeletonLoader />
+ </PageSectionContent>
+ </PageSection>
) : (
<>
{showConfigurationSection && (
- <ScaffoldSection isFullWidth>
- <ScaffoldSectionTitle className="mb-4">Configuration</ScaffoldSectionTitle>
- <Form_Shadcn_ {...templateForm}>
- <form onSubmit={templateForm.handleSubmit(onSubmit)} className="space-y-4">
- <Card>
- <CardContent>
- <FormField_Shadcn_
- control={templateForm.control}
- name={templateEnabledKey as keyof z.infer<typeof TemplateFormSchema>}
- render={({ field }) => (
- <FormItemLayout
- layout="flex-row-reverse"
- label="Enable notification"
- description="Send this email to users when triggered"
- >
- <FormControl_Shadcn_>
- <Switch
- checked={field.value}
- onCheckedChange={field.onChange}
- disabled={!canUpdateConfig}
- />
- </FormControl_Shadcn_>
- </FormItemLayout>
+ <PageSection>
+ <PageSectionMeta>
+ <PageSectionSummary>
+ <PageSectionTitle>Configuration</PageSectionTitle>
+ </PageSectionSummary>
+ </PageSectionMeta>
+ <PageSectionContent>
+ <Form_Shadcn_ {...templateForm}>
+ <form onSubmit={templateForm.handleSubmit(onSubmit)} className="space-y-4">
+ <Card>
+ <CardContent>
+ <FormField_Shadcn_
+ control={templateForm.control}
+ name={templateEnabledKey as keyof z.infer<typeof TemplateFormSchema>}
+ render={({ field }) => (
+ <FormItemLayout
+ layout="flex-row-reverse"
+ label="Enable notification"
+ description="Send this email to users when triggered"
+ >
+ <FormControl_Shadcn_>
+ <Switch
+ checked={field.value}
+ onCheckedChange={field.onChange}
+ disabled={!canUpdateConfig}
+ />
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+ </CardContent>
+ <CardFooter className="justify-end space-x-2">
+ {templateForm.formState.isDirty && (
+ <Button type="default" onClick={() => templateForm.reset()}>
+ Cancel
+ </Button>
)}
- />
- </CardContent>
- <CardFooter className="justify-end space-x-2">
- {templateForm.formState.isDirty && (
- <Button type="default" onClick={() => templateForm.reset()}>
- Cancel
+ <Button
+ type="primary"
+ htmlType="submit"
+ disabled={
+ !canUpdateConfig ||
+ isUpdatingConfig ||
+ !templateForm.formState.isDirty
+ }
+ loading={isUpdatingConfig}
+ >
+ Save changes
</Button>
- )}
- <Button
- type="primary"
- htmlType="submit"
- disabled={
- !canUpdateConfig || isUpdatingConfig || !templateForm.formState.isDirty
- }
- loading={isUpdatingConfig}
- >
- Save changes
- </Button>
- </CardFooter>
- </Card>
- </form>
- </Form_Shadcn_>
- </ScaffoldSection>
+ </CardFooter>
+ </Card>
+ </form>
+ </Form_Shadcn_>
+ </PageSectionContent>
+ </PageSection>
)}
- <ScaffoldSection isFullWidth>
- {/* Only show title if there is an another section above */}
+ <PageSection>
{showConfigurationSection && (
- <ScaffoldSectionTitle className="mb-4">Content</ScaffoldSectionTitle>
+ <PageSectionMeta>
+ <PageSectionSummary>
+ <PageSectionTitle>Content</PageSectionTitle>
+ </PageSectionSummary>
+ </PageSectionMeta>
)}
- <Card>
- <TemplateEditor template={template} />
- </Card>
- </ScaffoldSection>
+ <PageSectionContent>
+ <Card>
+ <TemplateEditor template={template} />
+ </Card>
+ </PageSectionContent>
+ </PageSection>
</>
)}
- </ScaffoldContainer>
- </PageLayout>
+ </PageContainer>
+ </>
)
}
diff --git a/apps/studio/pages/project/[ref]/auth/templates/index.tsx b/apps/studio/pages/project/[ref]/auth/templates/index.tsx
index dbd048e4938..77e7eebe71a 100644
--- a/apps/studio/pages/project/[ref]/auth/templates/index.tsx
+++ b/apps/studio/pages/project/[ref]/auth/templates/index.tsx
@@ -3,11 +3,12 @@ import { PermissionAction } from '@supabase/shared-types/out/constants'
import { EmailTemplates } from 'components/interfaces/Auth/EmailTemplates/EmailTemplates'
import { AuthEmailsLayout } from 'components/layouts/AuthLayout/AuthEmailsLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
import NoPermission from 'components/ui/NoPermission'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import type { NextPageWithLayout } from 'types'
import { GenericSkeletonLoader } from 'ui-patterns'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'
const TemplatesPage: NextPageWithLayout = () => {
const { can: canReadAuthSettings, isSuccess: isPermissionsLoaded } = useAsyncCheckPermissions(
@@ -20,15 +21,17 @@ const TemplatesPage: NextPageWithLayout = () => {
}
return (
- <ScaffoldContainer bottomPadding>
+ <PageContainer size="default" className="pb-16">
{!isPermissionsLoaded ? (
- <ScaffoldSection isFullWidth>
- <GenericSkeletonLoader />
- </ScaffoldSection>
+ <PageSection>
+ <PageSectionContent>
+ <GenericSkeletonLoader />
+ </PageSectionContent>
+ </PageSection>
) : (
<EmailTemplates />
)}
- </ScaffoldContainer>
+ </PageContainer>
)
}
diff --git a/apps/studio/pages/project/[ref]/auth/third-party.tsx b/apps/studio/pages/project/[ref]/auth/third-party.tsx
index 6e989a5d6c5..1ce5724e89e 100644
--- a/apps/studio/pages/project/[ref]/auth/third-party.tsx
+++ b/apps/studio/pages/project/[ref]/auth/third-party.tsx
@@ -5,12 +5,12 @@ import { ThirdPartyAuthForm } from 'components/interfaces/Auth/ThirdPartyAuthFor
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
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 { UnknownInterface } from 'components/ui/UnknownInterface'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import type { NextPageWithLayout } from 'types'
+import { PageContainer } from 'ui-patterns/PageContainer'
const ThirdPartyPage: NextPageWithLayout = () => {
const { ref } = useParams()
@@ -34,9 +34,9 @@ const ThirdPartyPage: NextPageWithLayout = () => {
{isPermissionsLoaded && !canReadAuthSettings ? (
<NoPermission isFullPage resourceText="access your project's auth provider settings" />
) : (
- <ScaffoldContainer className="pb-16">
+ <PageContainer size="default" className="pb-16">
<ThirdPartyAuthForm />
- </ScaffoldContainer>
+ </PageContainer>
)}
</AuthProvidersLayout>
)
diff --git a/apps/studio/pages/project/[ref]/auth/url-configuration.tsx b/apps/studio/pages/project/[ref]/auth/url-configuration.tsx
index 442d9e9e257..d74b75461a0 100644
--- a/apps/studio/pages/project/[ref]/auth/url-configuration.tsx
+++ b/apps/studio/pages/project/[ref]/auth/url-configuration.tsx
@@ -4,12 +4,19 @@ import { RedirectUrls } from 'components/interfaces/Auth/RedirectUrls/RedirectUr
import SiteUrl from 'components/interfaces/Auth/SiteUrl/SiteUrl'
import AuthLayout from 'components/layouts/AuthLayout/AuthLayout'
import DefaultLayout from 'components/layouts/DefaultLayout'
-import { PageLayout } from 'components/layouts/PageLayout/PageLayout'
-import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
import NoPermission from 'components/ui/NoPermission'
import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import type { NextPageWithLayout } from 'types'
+import { PageContainer } from 'ui-patterns/PageContainer'
+import {
+ PageHeader,
+ PageHeaderDescription,
+ PageHeaderMeta,
+ PageHeaderSummary,
+ PageHeaderTitle,
+} from 'ui-patterns/PageHeader'
+import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'
const URLConfiguration: NextPageWithLayout = () => {
const { can: canReadAuthSettings, isSuccess: isPermissionsLoaded } = useAsyncCheckPermissions(
@@ -22,31 +29,38 @@ const URLConfiguration: NextPageWithLayout = () => {
}
return (
- <ScaffoldContainer>
- {!isPermissionsLoaded ? (
- <ScaffoldSection isFullWidth>
- <GenericSkeletonLoader />
- </ScaffoldSection>
- ) : (
- <>
- <SiteUrl />
- <RedirectUrls />
- </>
- )}
- </ScaffoldContainer>
+ <>
+ <PageHeader size="default">
+ <PageHeaderMeta>
+ <PageHeaderSummary>
+ <PageHeaderTitle>URL Configuration</PageHeaderTitle>
+ <PageHeaderDescription>
+ Configure site URL and redirect URLs for authentication
+ </PageHeaderDescription>
+ </PageHeaderSummary>
+ </PageHeaderMeta>
+ </PageHeader>
+ <PageContainer size="default">
+ {!isPermissionsLoaded ? (
+ <PageSection>
+ <PageSectionContent>
+ <GenericSkeletonLoader />
+ </PageSectionContent>
+ </PageSection>
+ ) : (
+ <>
+ <SiteUrl />
+ <RedirectUrls />
+ </>
+ )}
+ </PageContainer>
+ </>
)
}
URLConfiguration.getLayout = (page) => (
<DefaultLayout>
- <AuthLayout>
- <PageLayout
- title="URL Configuration"
- subtitle="Configure site URL and redirect URLs for authentication"
- >
- {page}
- </PageLayout>
- </AuthLayout>
+ <AuthLayout>{page}</AuthLayout>
</DefaultLayout>
)