Binary files a/public/images/dashboard.png and b/public/images/dashboard.png differ @@ -22,9 +22,10 @@ import { useDeviceType } from '#/shared/lib/hooks/use-device-type' interface IRegisterEmailFormProps { successLogin: () => void + inputClassName?: string } -export const RegisterEmailForm: React.FC = ({ successLogin }) => { +export const RegisterEmailForm: React.FC = ({ successLogin, inputClassName }) => { const { register, handleSubmit, reset, watch } = useForm() const { desktop } = useDeviceType() @@ -94,45 +95,19 @@ export const RegisterEmailForm: React.FC = ({ successLo return (
- - Email - - - Пароль - - @@ -153,30 +128,18 @@ export const RegisterEmailForm: React.FC = ({ successLo ), }} + className={inputClassName} sx={{ ...InputStyleDark }} {...register('password1', { ...PasswordOptions, })} /> - - Подтвердите пароль - - { - const device = getDeviceType() - + const [desktop, setDesktop] = React.useState(true) const { query, push } = useRouter() const [, setCookie] = useCookies() @@ -34,14 +33,16 @@ const Login: NextPageWithLayout = () => { Object.entries(query).forEach(([key, value]) => setCookie(key, value)) }, []) + React.useEffect(() => { + setDesktop(getDeviceType() === 'desktop') + }, []) + const { showMessage } = useShowDataStore() const [loading, setLoading] = React.useState(false) const [passwordShowed, showPassword] = React.useState(false) - const desktop = device === 'desktop' - const { register, handleSubmit } = useForm() useEffect(() => { @@ -96,40 +97,20 @@ const Login: NextPageWithLayout = () => { direction={desktop ? 'row' : 'column'} alignItems='center' justifyContent={desktop ? 'space-between' : 'center'} - sx={{ - overflow: 'hidden', - padding: 0, - margin: desktop ? 0 : '0px auto', - backgroundColor: '#303035', - }} > {!desktop && ( {''} )} - + { if (e.key === 'Enter') { await handleSubmit(onSubmit, checkError) @@ -142,98 +123,32 @@ const Login: NextPageWithLayout = () => { alignItems='center' spacing={2} > - - Вход - + Вход - - или email - - - Email - + +
+ или email +
+
+ - - - - - Пароль - - - - - - Забыли пароль? - - - -
- showPassword((x) => !x) - } - style={{ - cursor: 'pointer', - display: 'flex', - alignItems: 'center', - }} + className={styles.eyeToggle} + onClick={() => showPassword((x) => !x)} > {passwordShowed ? ( { ), }} + + className={styles.inputField} sx={{ ...InputStyleDark }} {...register('password', { ...PasswordOptions, })} /> - + + + + Забыли пароль? + + + + {!loading ? ( ) : ( - - + + )} - - + + Нет аккаунта? + Зарегистрироваться @@ -321,38 +207,29 @@ const Login: NextPageWithLayout = () => { {desktop && ( - + {''} {''} + + + Творчество. Технологии. Ты. + + + {`Создавай уникальный контент и общайся с продвинутыми чат-ботами,\n используя современные нейросети.`} + + )} @@ -1,11 +1,139 @@ +.container { + overflow: hidden; + padding: 0; + background-color: #151518; + + @media screen and (max-width: 1000px) { + margin: 0 auto; + } +} + +.form { + width: 50%; + height: 100vh; + display: flex; + justify-content: center; + align-items: center; + + @media screen and (max-width: 1000px) { + width: 100%; + align-items: flex-start; + margin-top: 10px; + } +} + +.formInner { + width: 40vh; + height: 80%; + display: flex; + justify-content: center; + align-items: center; + + @media screen and (max-width: 1000px) { + margin-top: 16px; + } +} + +.logoMobile { + margin-top: 20px; +} + +.title { + color: #e1e1e1; + line-height: 36.4px; + font-size: 26px; + font-weight: bold; + margin-bottom: 20px; +} + +.orEmailWrapper { + display: flex; + justify-content: center; + align-items: center; + gap: 12px; + width: 100%; +} + +.orEmailLine { + height: 1px; + flex: 1; + background-color: #44444a; +} + +.orEmail { + flex: 1; + font-size: 15px; + color: #a4aab5; + display: flex; + justify-content: center; + align-items: center; +} + +.successText { + text-align: center; + color: #e1e1e1; +} + .imagebox { + width: 50%; + height: 100vh; + background-color: #8280ff; + overflow: hidden; + position: relative; + display: flex; + align-items: center; + justify-content: center; + @media screen and (max-width: 1000px) { display: none; } } -.form{ - @media screen and (max-width: 1000px) { - width: 100%; +.imageboxLogo { + position: absolute; + top: 35px; + left: 35px; +} + +.dashboardImage { + position: absolute; + transform: scale(1.15); + bottom: 60px; + transform-origin: center; +} + +.imageboxLogoContent { + z-index: 1; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.imageboxLogoText { + font-weight: 800; + font-size: 48px; + color: #ffffff; +} + +.imageboxLogoSubText { + font-weight: 400; + font-style: Regular; + line-height: 24px; + font-size: 20px; + text-align: center; + white-space: pre-line; +} + +.inputField { + margin-bottom: 16px; + + :global(.MuiInputBase-input) { + padding-block: 10px; + + &::placeholder { + color: #a4aab5; + opacity: 1; + } } } \ No newline at end of file @@ -17,11 +17,12 @@ import { getDeviceType } from '#/shared/lib/helpers' import styles from './register.module.scss' const Register: NextPageWithLayout = () => { - const device = getDeviceType() - - const desktop = device === 'desktop' - + const [desktop, setDesktop] = useState(true) const [success, setSuccess] = useState(false) + + React.useEffect(() => { + setDesktop(getDeviceType() === 'desktop') + }, []) const [isReferral, setIsReferral] = useState(true) const referral = useAppSelector((state) => state.user.referral) @@ -45,49 +46,25 @@ const Register: NextPageWithLayout = () => { return ( {!desktop && ( {''} )} - - + + {success ? ( - - + + Вы успешно зарегистрированы.
Мы отправили письмо для верификации на ваш email. В случае отсутствия, проверьте @@ -100,66 +77,49 @@ const Register: NextPageWithLayout = () => {
) : ( - - Регистрация - + Регистрация {referral === '' && isReferral && ( <> - - или email - + +
+ или email +
+ )} - + )} {desktop && ( - - {''} - {''} - - )} + + {''} + {''} + + + Творчество. Технологии. Ты. + + + {`Создавай уникальный контент и общайся с продвинутыми чат-ботами,\n используя современные нейросети.`} + + + + )} ) }