Skip to content

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

feat(studio): update other account sections to match access tokens (#38034)

kemal.earth92e694944a3b
diff --git a/apps/studio/pages/account/me.tsx b/apps/studio/pages/account/me.tsx
index 28eee68c799..6c7fed647c9 100644
--- a/apps/studio/pages/account/me.tsx
+++ b/apps/studio/pages/account/me.tsx
@@ -15,6 +15,11 @@ import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { useProfile } from 'lib/profile'
import type { NextPageWithLayout } from 'types'
+import {
+ ScaffoldContainer,
+ ScaffoldHeader,
+ ScaffoldSectionTitle,
+} from 'components/layouts/Scaffold'
const User: NextPageWithLayout = () => {
return <ProfileCard />
@@ -39,43 +44,52 @@ const ProfileCard = () => {
const { error, isLoading, isError, isSuccess } = useProfile()
return (
- <article>
- {isLoading && (
- <Panel>
- <div className="p-4">
- <GenericSkeletonLoader />
- </div>
- </Panel>
- )}
- {isError && (
- <Panel>
- <div className="p-4">
- <AlertError error={error} subject="Failed to retrieve account information" />
- </div>
- </Panel>
- )}
- {isSuccess && (
- <>
- {profileShowInformation && isSuccess ? <ProfileInformation /> : null}
- <AccountIdentities />
- </>
- )}
+ <>
+ <ScaffoldContainer>
+ <ScaffoldHeader className="pt-0">
+ <ScaffoldSectionTitle>Preferences</ScaffoldSectionTitle>
+ </ScaffoldHeader>
+ </ScaffoldContainer>
+ <ScaffoldContainer bottomPadding>
+ <article>
+ {isLoading && (
+ <Panel>
+ <div className="p-4">
+ <GenericSkeletonLoader />
+ </div>
+ </Panel>
+ )}
+ {isError && (
+ <Panel>
+ <div className="p-4">
+ <AlertError error={error} subject="Failed to retrieve account information" />
+ </div>
+ </Panel>
+ )}
+ {isSuccess && (
+ <>
+ {profileShowInformation && isSuccess ? <ProfileInformation /> : null}
+ <AccountIdentities />
+ </>
+ )}
- <section>
- <AccountConnections />
- </section>
+ <section>
+ <AccountConnections />
+ </section>
- <section>
- <ThemeSettings />
- </section>
+ <section>
+ <ThemeSettings />
+ </section>
- <section>
- <AnalyticsSettings />
- </section>
+ <section>
+ <AnalyticsSettings />
+ </section>
- <section>
- <AccountDeletion />
- </section>
- </article>
+ <section>
+ <AccountDeletion />
+ </section>
+ </article>
+ </ScaffoldContainer>
+ </>
)
}
diff --git a/apps/studio/pages/account/security.tsx b/apps/studio/pages/account/security.tsx
index 8e2a33a3e8a..a1ff44e7546 100644
--- a/apps/studio/pages/account/security.tsx
+++ b/apps/studio/pages/account/security.tsx
@@ -15,6 +15,11 @@ import {
CollapsibleContent_Shadcn_,
CollapsibleTrigger_Shadcn_,
} from 'ui'
+import {
+ ScaffoldContainer,
+ ScaffoldHeader,
+ ScaffoldSectionTitle,
+} from 'components/layouts/Scaffold'
const collapsibleClasses = [
'bg-surface-100',
@@ -33,28 +38,37 @@ const Security: NextPageWithLayout = () => {
const { data } = useMfaListFactorsQuery()
return (
- <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>
+ <>
+ <ScaffoldContainer>
+ <ScaffoldHeader className="pt-0">
+ <ScaffoldSectionTitle>Security</ScaffoldSectionTitle>
+ </ScaffoldHeader>
+ </ScaffoldContainer>
+ <ScaffoldContainer bottomPadding>
+ <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_>
+ {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_>
+ </ScaffoldContainer>
+ </>
)
}
diff --git a/apps/studio/pages/account/tokens.tsx b/apps/studio/pages/account/tokens.tsx
index 1d9ea7e999a..89f6e224111 100644
--- a/apps/studio/pages/account/tokens.tsx
+++ b/apps/studio/pages/account/tokens.tsx
@@ -11,7 +11,6 @@ import DefaultLayout from 'components/layouts/DefaultLayout'
import OrganizationLayout from 'components/layouts/OrganizationLayout'
import {
ScaffoldContainer,
- ScaffoldDescription,
ScaffoldHeader,
ScaffoldSectionTitle,
} from 'components/layouts/Scaffold'
@@ -27,12 +26,8 @@ const UserAccessTokens: NextPageWithLayout = () => {
return (
<>
<ScaffoldContainer>
- <ScaffoldHeader className="pt-0 mb-6">
+ <ScaffoldHeader className="pt-0">
<ScaffoldSectionTitle>Access Tokens</ScaffoldSectionTitle>
- <ScaffoldDescription>
- Personal access tokens can be used to control your whole account and use features added
- in the future. Be careful when sharing them!
- </ScaffoldDescription>
</ScaffoldHeader>
</ScaffoldContainer>
<ScaffoldContainer bottomPadding>