Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

feat: verify page to match login

Marc Seitz37280427a7ec
diff --git a/app/(auth)/auth/email/[[...params]]/page-client.tsx b/app/(auth)/auth/email/[[...params]]/page-client.tsx
index 00b61a28..afdfca15 100644
--- a/app/(auth)/auth/email/[[...params]]/page-client.tsx
+++ b/app/(auth)/auth/email/[[...params]]/page-client.tsx
@@ -19,41 +19,23 @@ export default function EmailVerificationClient() {
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState<string | null>(null);
const [isExpired, setIsExpired] = useState(false);
- const [showEmailDeliveryNotice, setShowEmailDeliveryNotice] = useState(false);
- // Check sessionStorage for pending verification email on mount
useEffect(() => {
try {
const pendingEmail = sessionStorage.getItem("pendingVerificationEmail");
if (pendingEmail) {
setEmail(pendingEmail);
setEmailLocked(true);
- // Clear the stored email after reading
sessionStorage.removeItem("pendingVerificationEmail");
- // Focus the code input
setTimeout(() => {
codeInputRef.current?.focus();
}, 100);
}
} catch {
- // sessionStorage not available, user will need to enter email manually
+ // sessionStorage not available
}
}, []);
- // Show email delivery notice after 5 seconds when waiting for verification
- useEffect(() => {
- if (!emailLocked) {
- setShowEmailDeliveryNotice(false);
- return;
- }
-
- const timer = setTimeout(() => {
- setShowEmailDeliveryNotice(true);
- }, 10000);
-
- return () => clearTimeout(timer);
- }, [emailLocked]);
-
// Code verification
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
@@ -108,18 +90,17 @@ export default function EmailVerificationClient() {
}
};
- // Show expired state
if (isExpired) {
return (
<div className="flex h-screen w-full flex-wrap">
- <div className="flex w-full justify-center bg-white md:w-1/2 lg:w-1/2">
- <div className="z-10 mx-5 mt-[calc(1vh)] h-fit w-full max-w-md overflow-hidden sm:mx-0 sm:mt-[calc(2vh)] md:mt-[calc(3vh)]">
- <div className="items-left flex flex-col space-y-3 px-4 py-6 pt-8 sm:px-12">
+ <div className="flex w-full justify-center bg-white md:w-[55%] lg:w-[55%]">
+ <div className="z-10 mx-5 mt-0 h-fit w-full max-w-md overflow-hidden sm:mx-0 sm:mt-[calc(0.5vh)] md:mt-[calc(1vh)]">
+ <div className="items-left flex flex-col space-y-3 px-4 py-6 pt-5 sm:px-12 sm:pt-6">
<Link href="https://www.papermark.com" target="_blank">
<img
src="/_static/papermark-logo.svg"
alt="Papermark Logo"
- className="-mt-8 mb-36 h-7 w-auto self-start sm:mb-32 md:mb-48"
+ className="mb-24 h-7 w-auto self-start sm:mb-20"
/>
</Link>
<span className="text-balance text-3xl font-semibold text-gray-900">
@@ -129,9 +110,9 @@ export default function EmailVerificationClient() {
This login code has expired or has already been used.
</h3>
</div>
- <div className="flex flex-col gap-4 px-4 pt-8 sm:px-12">
+ <div className="flex flex-col gap-4 px-4 pt-4 sm:px-12">
<Link href="/login">
- <Button className="focus:shadow-outline w-full transform rounded-sm bg-gray-800 px-4 py-2 text-white transition-colors duration-300 ease-in-out hover:bg-gray-900 focus:outline-none">
+ <Button className="focus:shadow-outline w-full transform rounded-[4px] bg-black px-4 py-2 text-white transition-colors duration-300 ease-in-out hover:bg-gray-900 focus:outline-none">
Request a new code
</Button>
</Link>
@@ -146,14 +127,14 @@ export default function EmailVerificationClient() {
return (
<div className="flex h-screen w-full flex-wrap">
{/* Left part */}
- <div className="flex w-full justify-center bg-white md:w-1/2 lg:w-1/2">
- <div className="z-10 mx-5 mt-[calc(1vh)] h-fit w-full max-w-md overflow-hidden sm:mx-0 sm:mt-[calc(2vh)] md:mt-[calc(3vh)]">
- <div className="items-left flex flex-col space-y-3 px-4 py-6 pt-8 sm:px-12">
+ <div className="flex w-full justify-center bg-white md:w-[55%] lg:w-[55%]">
+ <div className="z-10 mx-5 mt-0 h-fit w-full max-w-md overflow-hidden sm:mx-0 sm:mt-[calc(0.5vh)] md:mt-[calc(1vh)]">
+ <div className="items-left flex flex-col space-y-3 px-4 py-6 pt-5 sm:px-12 sm:pt-6">
<Link href="https://www.papermark.com" target="_blank">
<img
src="/_static/papermark-logo.svg"
alt="Papermark Logo"
- className="-mt-8 mb-36 h-7 w-auto self-start sm:mb-32 md:mb-48"
+ className="mb-24 h-7 w-auto self-start sm:mb-20"
/>
</Link>
<Link href="/">
@@ -173,31 +154,10 @@ export default function EmailVerificationClient() {
</h3>
</div>
- {/* Delayed email delivery notice */}
- {showEmailDeliveryNotice && emailLocked && (
- <div className="mx-4 mt-4 rounded-lg border border-orange-200 bg-orange-50 p-4 sm:mx-12">
- <p className="text-sm text-orange-800">
- Due to a recent Microsoft outage, we are experiencing delivery
- issues with Outlook and Microsoft email accounts.
- </p>
- <p className="mt-2 text-sm text-orange-800">
- Check your junk/spam and quarantine folders and ensure that{" "}
- <a
- href="mailto:[email protected]"
- className="font-medium text-orange-600 underline hover:text-orange-700"
- >
- </a>{" "}
- is on your allowed senders list.
- </p>
- </div>
- )}
-
<form
- className="flex flex-col gap-4 px-4 pt-8 sm:px-12"
+ className="flex flex-col gap-4 px-4 pt-4 sm:px-12"
onSubmit={handleSubmit}
>
- {/* Only show email field if not locked from sessionStorage */}
{!emailLocked && (
<div className="space-y-2">
<Label htmlFor="email">Email</Label>
@@ -211,7 +171,7 @@ export default function EmailVerificationClient() {
disabled={isLoading}
value={email}
onChange={(e) => setEmail(e.target.value)}
- className="flex h-10 w-full rounded-sm border-0 bg-background bg-white px-3 py-2 text-sm text-gray-900 ring-1 ring-gray-200 transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
+ className="flex h-10 w-full rounded-[4px] border-0 bg-background bg-white px-3 py-2 text-sm text-gray-900 ring-1 ring-gray-200 transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 dark:bg-white"
/>
</div>
)}
@@ -229,7 +189,7 @@ export default function EmailVerificationClient() {
value={code}
onChange={(e) => setCode(e.target.value.toUpperCase())}
maxLength={10}
- className="flex h-10 w-full rounded-sm border-0 bg-background bg-white px-3 py-2 font-mono text-lg tracking-widest text-gray-900 ring-1 ring-gray-200 transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground placeholder:font-sans placeholder:text-sm placeholder:tracking-normal focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
+ className="flex h-10 w-full rounded-[4px] border-0 bg-background bg-white px-3 py-2 font-mono text-lg tracking-widest text-gray-900 ring-1 ring-gray-200 transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground placeholder:font-sans placeholder:text-sm placeholder:tracking-normal focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 dark:bg-white"
/>
</div>
@@ -243,7 +203,7 @@ export default function EmailVerificationClient() {
type="submit"
loading={isLoading}
disabled={isLoading || !email || code.length < 10}
- className="focus:shadow-outline w-full transform rounded-sm bg-gray-800 px-4 py-2 text-white transition-colors duration-300 ease-in-out hover:bg-gray-900 focus:outline-none"
+ className="focus:shadow-outline w-full transform rounded-[4px] bg-black px-4 py-2 text-white transition-colors duration-300 ease-in-out hover:bg-gray-900 focus:outline-none disabled:opacity-100"
>
Verify
</Button>
@@ -257,8 +217,7 @@ export default function EmailVerificationClient() {
</p>
<p className="mt-10 w-full max-w-md px-4 text-xs text-muted-foreground sm:px-12">
- By clicking continue, you acknowledge that you have read and agree
- to Papermark&apos;s{" "}
+ By continuing, you agree to Papermark&apos;s{" "}
<a
href="https://www.papermark.com/terms"
target="_blank"
@@ -286,14 +245,14 @@ export default function EmailVerificationClient() {
function TestimonialSection() {
return (
<div
- className="relative hidden w-full justify-center overflow-hidden md:flex md:w-1/2 lg:w-1/2"
+ className="relative hidden w-full justify-center overflow-hidden md:flex md:w-[45%] lg:w-[45%]"
style={{ backgroundColor: "#f9fafb" }}
>
<div className="flex h-full w-full flex-col items-center justify-center px-4 py-10">
<div className="flex w-full max-w-xl flex-col items-center">
<div className="mb-6 w-full max-w-md">
<img
- className="h-auto w-full rounded-[6px] object-cover shadow-lg"
+ className="h-auto w-full rounded-[4px] object-cover "
src="/_static/testimonials/backtrace.jpeg"
alt="Backtrace Capital"
/>
@@ -307,8 +266,9 @@ function TestimonialSection() {
}}
>
<p>
- &quot;We raised our €30M Fund with Papermark Data Rooms. Love
- the customization, security and ease of use.&quot;
+ &quot;We raised €50M Fund with Papermark Data Rooms.
+ <br />
+ Secure, branded, and incredibly easy to use.&quot;
</p>
</blockquote>
<figcaption className="mt-4">