diff --git a/src/pages/public/Login.jsx b/src/pages/public/Login.jsx index 125ad09..02b90c6 100644 --- a/src/pages/public/Login.jsx +++ b/src/pages/public/Login.jsx @@ -11,7 +11,7 @@ import { AuthService } from '@api' import Logo from '@images/Logo' -import '@styles/index.css' +import '@styles/pages/login.less' const Login = memo(() => { const [showLoader, setShowLoader] = useState(false) @@ -36,10 +36,10 @@ const Login = memo(() => {
- +
- } /> + } /> } /> diff --git a/src/pages/public/Register.jsx b/src/pages/public/Register.jsx index 8154059..d3e6d2b 100644 --- a/src/pages/public/Register.jsx +++ b/src/pages/public/Register.jsx @@ -8,7 +8,6 @@ import { EyeTwoTone } from '@ant-design/icons' -import { AuthService } from '@api' import LoaderPortal from '@components/LoaderPortal' import { invokeWebApiWrapperAsync } from '@components/factory' import { @@ -21,9 +20,12 @@ import { phoneRules } from '@utils/validationRules' import { withPermissions } from '@utils' +import { AuthService } from '@api' import Logo from '@images/Logo' +import '@styles/pages/login.less' + const surnameRules = [...nameRules, { required: true, message: 'Пожалуйста, введите фамилию!' }] const regEmailRules = [{ required: true, message: 'Пожалуйста, введите email!' }, ...emailRules] const confirmPasswordRules = [ @@ -38,7 +40,6 @@ const confirmPasswordRules = [ }) ] -const logoIcon = const showPasswordIcon = visible => (visible ? : ) const createInput = (name, placeholder, rules, isPassword, dependencies) => ( @@ -66,29 +67,34 @@ export const Register = memo(() => { ), [navigate]) return ( - - - - {createInput('login', 'Пользователь', [...loginRules, ...createLoginRules])} - {createInput('password', 'Пароль', [...passwordRules, ...createPasswordRules], true, null)} - {createInput('confirmPassword', 'Подтверждение пароля', confirmPasswordRules, true, ['password'])} - {createInput('name', 'Имя', nameRules)} - {createInput('surName', 'Фамилия', surnameRules)} - {createInput('patronymic', 'Отчество', nameRules)} - {createInput('email', 'Email', regEmailRules)} - {createInput('phone', 'Номер телефона', phoneRules)} - {createInput('position', 'Должность')} - -
- -
-
-
- Назад -
- -
-
+
+
+ + + +
+ {createInput('login', 'Логин', [...loginRules, ...createLoginRules])} + {createInput('password', 'Пароль', [...passwordRules, ...createPasswordRules], true, null)} + {createInput('confirmPassword', 'Подтверждение пароля', confirmPasswordRules, true, ['password'])} + {createInput('name', 'Имя', nameRules)} + {createInput('surName', 'Фамилия', surnameRules)} + {createInput('patronymic', 'Отчество', nameRules)} + {createInput('email', 'Email', regEmailRules)} + {createInput('phone', 'Номер телефона', phoneRules)} + {createInput('position', 'Должность')} + +
+ +
+
+
+ Назад +
+
+
+
+
+
) }) diff --git a/src/styles/pages/App.less b/src/styles/pages/App.less index 4fc5892..28cfdd4 100644 --- a/src/styles/pages/App.less +++ b/src/styles/pages/App.less @@ -25,17 +25,6 @@ html { margin-left: 30px; } -.login_page { - position: absolute; - height: 100%; - width: 100%; - display: flex; - justify-content: center; - align-items: center; - padding: 24px; - background-color: #9d9d9d; -} - .shadow{ box-shadow: 1px 1px 4px #00000033; } diff --git a/src/styles/pages/login.less b/src/styles/pages/login.less new file mode 100644 index 0000000..623164f --- /dev/null +++ b/src/styles/pages/login.less @@ -0,0 +1,20 @@ +.login-button { + width: 20%; + margin: auto; +} + +.register-button { + width: 50%; + margin: auto; +} + +.login_page { + position: absolute; + height: 100%; + width: 100%; + display: flex; + justify-content: center; + align-items: center; + padding: 24px; + background-color: #232323; +} diff --git a/src/utils/validationRules.ts b/src/utils/validationRules.ts index a59de26..905b8d7 100755 --- a/src/utils/validationRules.ts +++ b/src/utils/validationRules.ts @@ -15,7 +15,7 @@ export const createLoginRules: Readonly = [_min1, { export const loginRules: Readonly = [...createLoginRules, { required: true, - message: 'Пожалуйста, введите логин', + message: 'Пожалуйста, введите логин!', }] export const nameRules: Readonly = [_min1, {