From 6d94a0d037b5bec1cc2d923a8232db467f19483e Mon Sep 17 00:00:00 2001 From: Koosha Lahouti Date: Tue, 22 Jul 2025 12:08:48 +0330 Subject: [PATCH] fix: styles --- public/locales/en/completionForm.json | 31 +++++ public/locales/fa/completionForm.json | 3 +- src/App.tsx | 2 + .../components/EmailSection.tsx | 59 ++++----- .../components/PasswordSection.tsx | 118 ++++++++++++------ .../components/PasswordValidation.tsx | 2 +- .../components/PersonalInfoFields.tsx | 4 +- .../components/SubmitSection.tsx | 2 +- .../components/UserCompletionForm.tsx | 8 +- 9 files changed, 152 insertions(+), 77 deletions(-) create mode 100644 public/locales/en/completionForm.json diff --git a/public/locales/en/completionForm.json b/public/locales/en/completionForm.json new file mode 100644 index 0000000..4ffaedd --- /dev/null +++ b/public/locales/en/completionForm.json @@ -0,0 +1,31 @@ +{ + "completion": { + "title": "Completion of user account information", + "description": "Enter your business information", + "name": "Name", + "familyName": "Family Name", + "gender": "Gender", + "optionalNationalCode": "National Code(Optional)", + "determinePassword": "Determine Password", + "password": "Password", + "passwordRepetition": "Repeat password", + "determineEmail": "Connect your email", + "email": "Email", + "vericationCodeButton": "Send verification code", + "verificationCode": "verification code", + "checkCodeButton": "Check code", + "registerButton": "Confirm and Register", + "man": "male", + "woman": "female", + "hasNumber": "includes number", + "hasMinLength": "at least 8 characters", + "hasUpperAndLower": "includes a lowercase and uppercase letter", + "hasSpecialChar": "includes sign (!@#$%^&*)", + "notCompatibility": "does not match", + "emailCorrectForm": "Enter the correct email form.", + "agreementPart1": "By continuing the registration process, you agree to the", + "agreementLinkText": " Harmony Terms and Conditions", + "agreementPart2": ".", + "sent": "sent" + } +} diff --git a/public/locales/fa/completionForm.json b/public/locales/fa/completionForm.json index bd9a9bd..0f7e883 100644 --- a/public/locales/fa/completionForm.json +++ b/public/locales/fa/completionForm.json @@ -25,6 +25,7 @@ "emailCorrectForm": "فرم درست ایمیل را وارد کنید", "agreementPart1": " ادامه فرایند ثبت نام به منزله تایید و قبول", "agreementLinkText": " قوانین و مقررات هارمونی", - "agreementPart2": "می باشد." + "agreementPart2": "می باشد.", + "sent": "ارسال شد!" } } diff --git a/src/App.tsx b/src/App.tsx index f1bd30e..dcc2651 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -9,6 +9,7 @@ import { import './App.css'; import { useTranslation } from 'react-i18next'; import { LanguageManager } from './components/LanguageManager'; +import { UserCompletionForm } from './features/authentication/components/UserCompletionForm'; function App() { const { t } = useTranslation(); @@ -18,6 +19,7 @@ function App() { <> +
{t('helloWorld')} - + {t('completion.determineEmail')} @@ -89,33 +78,45 @@ export function EmailSection({ }} InputProps={{ startAdornment: - buttonState === 'counting' ? ( - - - - + !isVerifyingCode && emailVerified ? ( + + ) : null, endAdornment: - !isVerifyingCode && emailVerified ? ( - + buttonState === 'counting' ? ( + + + + + ) : null, }} + inputProps={{ + style: { + paddingLeft: buttonState === 'counting' ? '0px' : undefined, + }, + }} /> - {email && ( - - {correctEmail ? '' : t('completion.emailCorrectForm')} - - )} {!isVerifyingCode && !emailVerified && (