diff --git a/frontend/src/components/Auth/AuthModal.tsx b/frontend/src/components/Auth/AuthModal.tsx index 7188c94..7613322 100644 --- a/frontend/src/components/Auth/AuthModal.tsx +++ b/frontend/src/components/Auth/AuthModal.tsx @@ -48,7 +48,7 @@ const AuthModal: React.FC = ({ onClose }) => { id="auth-modal" className="fixed inset-0 flex items-start justify-center z-[9000] h-[95vh] m-auto pt-[15vh] rounded-[5rem] transition-all animate-floating" > -
+
{/* Login/Register Buttons Container */}
{/* Login Toggle */} @@ -75,14 +75,14 @@ const AuthModal: React.FC = ({ onClose }) => { {/* Form Container */}
{/*Border Container*/}
{authSwitch()}
diff --git a/frontend/src/components/Auth/LoginForm.tsx b/frontend/src/components/Auth/LoginForm.tsx index 23757aa..54d0ee0 100644 --- a/frontend/src/components/Auth/LoginForm.tsx +++ b/frontend/src/components/Auth/LoginForm.tsx @@ -71,7 +71,6 @@ const LoginForm: React.FC = ({ onSubmit, onForgotPassword }) => { const data = await response.json(); if (data.logged_in) { - //TODO: Handle successful login (e.g., redirect to home page) console.log("Login successful! Details: ", data); setIsLoggedIn(true); window.location.reload(); @@ -101,15 +100,15 @@ const LoginForm: React.FC = ({ onSubmit, onForgotPassword }) => { return ( <> -
+

Login

-
+
{errors.general && (

@@ -127,7 +126,7 @@ const LoginForm: React.FC = ({ onSubmit, onForgotPassword }) => { placeholder="Username" value={formData.username} onChange={handleInputChange} - extraClasses={`w-full mb-[2em] p-3 ${ + extraClasses={`w-full focus:w-[120%] p-3 ${ errors.username ? "border-red-500" : "" }`} /> @@ -138,43 +137,34 @@ const LoginForm: React.FC = ({ onSubmit, onForgotPassword }) => {

)} -
+
-
- +
-
- -
+
diff --git a/frontend/src/components/Auth/OAuth.tsx b/frontend/src/components/Auth/OAuth.tsx index 014a5c5..ed2c2e7 100644 --- a/frontend/src/components/Auth/OAuth.tsx +++ b/frontend/src/components/Auth/OAuth.tsx @@ -6,7 +6,7 @@ export default function GoogleLogin() { }; return ( -
+
diff --git a/frontend/src/components/Auth/RegisterForm.tsx b/frontend/src/components/Auth/RegisterForm.tsx index c39e55f..9572116 100644 --- a/frontend/src/components/Auth/RegisterForm.tsx +++ b/frontend/src/components/Auth/RegisterForm.tsx @@ -136,7 +136,7 @@ const RegisterForm: React.FC = ({ onSubmit }) => { placeholder="Username" value={formData.username} onChange={handleInputChange} - extraClasses={`w-full mb-[1.5em] p-[0.5rem] ${ + extraClasses={`w-full focus:w-[120%] mb-[1.5em] p-[0.5rem] ${ errors.username ? "border-red-500" : "" }`} /> @@ -154,7 +154,7 @@ const RegisterForm: React.FC = ({ onSubmit }) => { placeholder="Email" value={formData.email} onChange={handleInputChange} - extraClasses={`w-full mb-[1.5em] p-[0.5rem] ${ + extraClasses={`w-full focus:w-[120%] mb-[1.5em] p-[0.5rem] ${ errors.email ? "border-red-500" : "" }`} /> @@ -172,7 +172,7 @@ const RegisterForm: React.FC = ({ onSubmit }) => { placeholder="Password" value={formData.password} onChange={handleInputChange} - extraClasses={`w-full mb-[1.5em] p-[0.5rem] ${ + extraClasses={`w-full focus:w-[120%] mb-[1.5em] p-[0.5rem] ${ errors.password ? "border-red-500" : "" }`} /> @@ -189,7 +189,7 @@ const RegisterForm: React.FC = ({ onSubmit }) => { placeholder="Confirm Password" value={formData.confirmPassword} onChange={handleInputChange} - extraClasses={`w-full mb-[1.5em] p-[0.5rem] ${ + extraClasses={`w-full focus:w-[120%] mb-[1.5em] p-[0.5rem] ${ errors.confirmPassword ? "border-red-500" : "" }`} /> diff --git a/web_server/blueprints/authentication.py b/web_server/blueprints/authentication.py index 21bd2af..64ac430 100644 --- a/web_server/blueprints/authentication.py +++ b/web_server/blueprints/authentication.py @@ -145,7 +145,7 @@ def login(): except ValueError as e: return jsonify({ "account_created": False, - "error_fields": [username, password], + "error_fields": ["username", "password"], "message": "Invalid input received" }), 400