From ecbdd49cea22103837f209f882fdbef79280548a Mon Sep 17 00:00:00 2001 From: ghaddaditw <40211818-ghaddaditw@users.noreply.replit.com> Date: Fri, 30 May 2025 17:33:32 +0000 Subject: [PATCH] Allow new users to create accounts in addition to logging in Implements registration functionality on LoginPage.tsx with fields for first name, last name, username, account type, and confirm password. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 556aa286-edd2-4cea-8583-f4fc3cfd119b Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/81470e0d-8ae8-4335-9301-cd9a69e670fa/96467e4f-00f2-4d88-82b1-142a9b24784c.jpg --- client/src/pages/LoginPage.tsx | 101 +++++++++++++++++++++++++++++++-- 1 file changed, 96 insertions(+), 5 deletions(-) diff --git a/client/src/pages/LoginPage.tsx b/client/src/pages/LoginPage.tsx index e23dcd1..9bbaff7 100644 --- a/client/src/pages/LoginPage.tsx +++ b/client/src/pages/LoginPage.tsx @@ -119,9 +119,14 @@ export default function LoginPage() { {/* Main Login Card */} - Welcome Back + + {isRegisterMode ? "Create Account" : "Welcome Back"} + - Sign in to your TaskFin account to access your voice-powered productivity tools + {isRegisterMode + ? "Join TaskFin to manage your tasks and finances with AI" + : "Sign in to your TaskFin account to access your voice-powered productivity tools" + } {/* Features Badge */} @@ -147,6 +152,62 @@ export default function LoginPage() { )} + {/* Registration Fields */} + {isRegisterMode && ( + <> +
+
+ + handleInputChange("firstName", e.target.value)} + disabled={isSubmitting} + required + /> +
+
+ + handleInputChange("lastName", e.target.value)} + disabled={isSubmitting} + required + /> +
+
+ +
+ + handleInputChange("username", e.target.value)} + disabled={isSubmitting} + required + /> +
+ +
+ + +
+ + )} + {/* Email Field */}
@@ -177,6 +238,23 @@ export default function LoginPage() { />
+ {/* Confirm Password Field - Registration Only */} + {isRegisterMode && ( +
+ + handleInputChange("confirmPassword", e.target.value)} + disabled={isSubmitting} + required + className="focus-ring" + /> +
+ )} + {/* Remember Me & Forgot Password */}
@@ -210,18 +288,31 @@ export default function LoginPage() { + {/* Switch between Login/Register */} +
+ + {isRegisterMode ? "Already have an account? " : "Don't have an account? "} + + + {isRegisterMode ? "Sign in" : "Create one"} + +
+ {/* Divider */}