Skip to content

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

cleans up forgot password screens

Alaister Young683cab46ecc6
diff --git a/studio/components/interfaces/SignIn/ForgotPasswordForm.tsx b/studio/components/interfaces/SignIn/ForgotPasswordForm.tsx
index 770c356b78b..9527ca2d17f 100644
--- a/studio/components/interfaces/SignIn/ForgotPasswordForm.tsx
+++ b/studio/components/interfaces/SignIn/ForgotPasswordForm.tsx
@@ -47,7 +47,7 @@ const ForgotPasswordForm = () => {
>
{({ isSubmitting }: { isSubmitting: boolean }) => {
return (
- <div className="mb-4 space-y-4 pt-4">
+ <div className="space-y-4 pt-4">
<Input
id="email"
name="email"
diff --git a/studio/components/interfaces/SignIn/ResetPasswordForm.tsx b/studio/components/interfaces/SignIn/ResetPasswordForm.tsx
index 335ddfd6206..581ac7e4299 100644
--- a/studio/components/interfaces/SignIn/ResetPasswordForm.tsx
+++ b/studio/components/interfaces/SignIn/ResetPasswordForm.tsx
@@ -49,7 +49,7 @@ const ResetPasswordForm = () => {
>
{({ isSubmitting }: { isSubmitting: boolean }) => {
return (
- <div className="mb-4 space-y-4 pt-4">
+ <div className="space-y-4 pt-4">
<Input
id="password"
name="password"
diff --git a/studio/components/interfaces/SignIn/SignInForm.tsx b/studio/components/interfaces/SignIn/SignInForm.tsx
index 852370bd567..5d5dc753ff3 100644
--- a/studio/components/interfaces/SignIn/SignInForm.tsx
+++ b/studio/components/interfaces/SignIn/SignInForm.tsx
@@ -66,18 +66,20 @@ const SignInForm = () => {
placeholder="[email protected]"
/>
- <Input
- id="password"
- name="password"
- type="password"
- label="Password"
- placeholder="&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;"
- labelOptional={
- <Link href="/forgot-password">
- <a>Forgot Password?</a>
- </Link>
- }
- />
+ <div className="relative">
+ <Input
+ id="password"
+ name="password"
+ type="password"
+ label="Password"
+ placeholder="&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;"
+ />
+
+ {/* positioned using absolute instead of labelOptional prop so tabbing between inputs works smoothly */}
+ <Link href="/forgot-password">
+ <a className="text-scale-900 text-sm absolute top-0 right-0">Forgot Password?</a>
+ </Link>
+ </div>
<Button
block
diff --git a/studio/components/layouts/SignInLayout/ForgotPasswordLayout.tsx b/studio/components/layouts/SignInLayout/ForgotPasswordLayout.tsx
index 6a43d5ab2e9..a0b945032e4 100644
--- a/studio/components/layouts/SignInLayout/ForgotPasswordLayout.tsx
+++ b/studio/components/layouts/SignInLayout/ForgotPasswordLayout.tsx
@@ -5,14 +5,14 @@ import Link from 'next/link'
import { PropsWithChildren } from 'react'
type ForgotPasswordLayoutProps = {
- title: string
- showDisclaimer?: boolean
+ heading: string
+ subheading: string
logoLinkToMarketingSite?: boolean
}
const ForgotPasswordLayout = ({
- title,
- showDisclaimer = true,
+ heading,
+ subheading,
logoLinkToMarketingSite = false,
children,
}: PropsWithChildren<ForgotPasswordLayoutProps>) => {
@@ -21,7 +21,7 @@ const ForgotPasswordLayout = ({
} = useStore()
return (
- <div className="flex flex-col gap-8 mb-5">
+ <div className="flex-1 bg-scale-200 flex flex-col gap-8 lg:gap-16 xl:gap-32">
<div className="sticky top-0 mx-auto w-full max-w-7xl px-8 pt-6 sm:px-6 lg:px-8">
<nav className="relative flex items-center justify-between sm:h-10">
<div className="flex flex-shrink-0 flex-grow items-center lg:flex-grow-0">
@@ -50,35 +50,16 @@ const ForgotPasswordLayout = ({
</nav>
</div>
- <h1 className="text-2xl self-center mt-8">{title}</h1>
-
<div className="flex flex-col justify-center items-center">
- <main className="min-w-[448px] flex flex-col bg-scale-400 px-5 rounded-lg shadow-lg">
- <img
- src="/supabase-logo.svg"
- alt="Supabase Logo"
- className="block w-20 mt-8 mb-10 self-center"
- />
+ <main className="max-w-[448px] w-full flex flex-col px-5">
+ <div className="mb-6">
+ <h1 className="text-3xl mt-8 mb-2">{heading}</h1>
+ <h2 className="text-scale-1100">{subheading}</h2>
+ </div>
{children}
</main>
</div>
-
- {showDisclaimer && (
- <div className="sm:text-center">
- <p className="text-xs text-scale-900 sm:mx-auto sm:max-w-sm">
- By continuing, you agree to Supabase's{' '}
- <Link href="https://supabase.com/docs/company/terms">
- <a className="underline hover:text-scale-1100">Terms of Service</a>
- </Link>{' '}
- and{' '}
- <Link href="https://supabase.com/docs/company/privacy">
- <a className="underline hover:text-scale-1100">Privacy Policy</a>
- </Link>
- , and to receive periodic emails with updates.
- </p>
- </div>
- )}
</div>
)
}
diff --git a/studio/pages/forgot-password.tsx b/studio/pages/forgot-password.tsx
index a54f141b78b..759be4e231d 100644
--- a/studio/pages/forgot-password.tsx
+++ b/studio/pages/forgot-password.tsx
@@ -10,10 +10,8 @@ const ForgotPasswordPage: NextPageWithLayout = () => {
<ForgotPasswordForm />
</div>
- <div className="w-full border-t border-scale-700 my-4" />
-
- <div className="mb-4">
- <span className="text-scale-1000">Already have an account?</span>{' '}
+ <div className="my-8 self-center">
+ <span className="text-scale-1100">Already have an account?</span>{' '}
<Link href="/sign-in">
<a className="underline hover:text-scale-1100">Sign In</a>
</Link>
@@ -23,7 +21,10 @@ const ForgotPasswordPage: NextPageWithLayout = () => {
}
ForgotPasswordPage.getLayout = (page) => (
- <ForgotPasswordLayout title="Forgot Password" showDisclaimer={false}>
+ <ForgotPasswordLayout
+ heading="Reset Your Password"
+ subheading="Type in your email and we'll send you a link to reset your password"
+ >
{page}
</ForgotPasswordLayout>
)
diff --git a/studio/pages/reset-password.tsx b/studio/pages/reset-password.tsx
index 5801048c121..e5a29d13085 100644
--- a/studio/pages/reset-password.tsx
+++ b/studio/pages/reset-password.tsx
@@ -10,10 +10,8 @@ const ResetPasswordPage: NextPageWithLayout = () => {
<ResetPasswordForm />
</div>
- <div className="w-full border-t border-scale-700 my-4" />
-
- <div className="mb-4">
- <span className="text-scale-1000">Already have an account?</span>{' '}
+ <div className="my-8 self-center">
+ <span className="text-scale-1100">Already have an account?</span>{' '}
<Link href="/sign-in">
<a className="underline hover:text-scale-1100">Sign In</a>
</Link>
@@ -23,7 +21,10 @@ const ResetPasswordPage: NextPageWithLayout = () => {
}
ResetPasswordPage.getLayout = (page) => (
- <ForgotPasswordLayout title="Reset Password" showDisclaimer={false}>
+ <ForgotPasswordLayout
+ heading="Reset Your Password"
+ subheading="Type in a new secure password and press save to update your password"
+ >
{page}
</ForgotPasswordLayout>
)