From 601b0324b80a1d618e9e53978d7ce9baf2672b4a Mon Sep 17 00:00:00 2001 From: sageTheDM Date: Tue, 8 Oct 2024 07:22:09 +0200 Subject: [PATCH 1/4] Removed the empty account creation bug --- app/components/Login.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/components/Login.tsx b/app/components/Login.tsx index a2c0f7f..146e86c 100644 --- a/app/components/Login.tsx +++ b/app/components/Login.tsx @@ -79,12 +79,16 @@ const Login: React.FC = () => { // Function to handle account creation const handleCreateAccount = async () => { - const success = await createAccount(newAccountName, newAccountEmail, newAccountPassword); - if (success) { - alert('Account created successfully! You can now log in.'); - toggleSignUpPopup(); // Close sign-up popup + if (newAccountName !== "" && newAccountEmail !== "" && newAccountPassword !== "") { + const success = await createAccount(newAccountName, newAccountEmail, newAccountPassword); + if (success) { + alert('Account created successfully! You can now log in.'); + toggleSignUpPopup(); // Close sign-up popup + } else { + alert('Account creation failed. Please try again.'); + } } else { - alert('Account creation failed. Please try again.'); + alert('Account creation failed. Please do not leave any field empty.'); } }; -- 2.39.5 From d1602e3ad7f6e50a683113d0df08a379acf0f0a9 Mon Sep 17 00:00:00 2001 From: sageTheDM Date: Tue, 8 Oct 2024 07:33:02 +0200 Subject: [PATCH 2/4] Input fields now do update the text color --- app/components/InputFrontend.tsx | 1 + app/components/settings/TextSettings.tsx | 1 + app/styles/input.css | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/app/components/InputFrontend.tsx b/app/components/InputFrontend.tsx index 9589096..fec7713 100644 --- a/app/components/InputFrontend.tsx +++ b/app/components/InputFrontend.tsx @@ -47,6 +47,7 @@ const InputFrontend = React.forwardRef( value={inputValue} onChange={handleInputChange} onKeyDown={handleKeyDown} + className='textInputField' />