From 79f626ef3416daceaf2ba8e7807a25ae160b4ed4 Mon Sep 17 00:00:00 2001 From: nevainero Date: Tue, 26 Apr 2022 16:10:07 +0300 Subject: [PATCH] feat(ott-2356): add comany info --- .../AuthServiceApp/components/App/index.tsx | 4 +- .../AuthServiceApp/components/Login/index.tsx | 131 +++++++++--------- src/features/AuthServiceApp/styled.tsx | 16 +++ src/features/CompanyInfo/config.tsx | 6 + src/features/CompanyInfo/index.tsx | 38 +++++ src/features/CompanyInfo/styled.tsx | 21 +++ .../components/PersonalInfoForm/styled.tsx | 2 + src/features/UserAccount/index.tsx | 2 + src/features/UserAccount/styled.tsx | 4 +- 9 files changed, 159 insertions(+), 65 deletions(-) create mode 100644 src/features/CompanyInfo/config.tsx create mode 100644 src/features/CompanyInfo/index.tsx create mode 100644 src/features/CompanyInfo/styled.tsx diff --git a/src/features/AuthServiceApp/components/App/index.tsx b/src/features/AuthServiceApp/components/App/index.tsx index b56fb81b..97c98ccb 100644 --- a/src/features/AuthServiceApp/components/App/index.tsx +++ b/src/features/AuthServiceApp/components/App/index.tsx @@ -21,11 +21,13 @@ const ChangePassword = lazy(() => import('../ChangePassword')) const Main = styled.main` width: 100%; + overflow-y: scroll; + ${isMobileDevice ? css` padding: 0 12px; @media screen and (orientation: landscape){ - min-height: 100vh; + max-height: 100vh; } ` : ''}; diff --git a/src/features/AuthServiceApp/components/Login/index.tsx b/src/features/AuthServiceApp/components/Login/index.tsx index 1f5215e8..d9a70d8d 100644 --- a/src/features/AuthServiceApp/components/Login/index.tsx +++ b/src/features/AuthServiceApp/components/Login/index.tsx @@ -19,8 +19,10 @@ import { ButtonSolid, Error, LanguageSelectWrapper, + Wrapper, } from '../../styled' import { RegisterButton } from './styled' +import { CompanyInfo } from '../../../CompanyInfo' const Login = () => { const { @@ -49,71 +51,74 @@ const Login = () => { } = useLoginForm() return ( - - -
- + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - { - isFetching - ? - : - } - - - - - - - - - - - - - - - - + + + + + + + { + isFetching + ? + : + } + + + + + + + + + + + + + + + +
+ + ) } diff --git a/src/features/AuthServiceApp/styled.tsx b/src/features/AuthServiceApp/styled.tsx index 9b32ea81..ee892d67 100644 --- a/src/features/AuthServiceApp/styled.tsx +++ b/src/features/AuthServiceApp/styled.tsx @@ -16,7 +16,23 @@ export const InputGroup = styled.div` ${client.styles.inputGroup} ` +export const Wrapper = styled.div` + display: flex; + flex-direction: column; + min-height: 100%; + align-items: center; + padding-bottom: 1%; + + ${isMobileDevice + ? css` + @media screen and (orientation: landscape) { + min-height: 450px; + } + ` : ''}; +` + export const CenterBlock = styled.div` + width: 100%; display: flex; flex-direction: column; align-items: center; diff --git a/src/features/CompanyInfo/config.tsx b/src/features/CompanyInfo/config.tsx new file mode 100644 index 00000000..b741b1b7 --- /dev/null +++ b/src/features/CompanyInfo/config.tsx @@ -0,0 +1,6 @@ +export const lexics = [ + 18081, + 18082, + 18083, + 18084, +] diff --git a/src/features/CompanyInfo/index.tsx b/src/features/CompanyInfo/index.tsx new file mode 100644 index 00000000..25459619 --- /dev/null +++ b/src/features/CompanyInfo/index.tsx @@ -0,0 +1,38 @@ +import { T9n } from 'features/T9n' +import { useLexicsConfig } from 'features/LexicsStore' + +import { + CompanyInfoText, + CompanyInfoWrapper, + CompanyName, +} from './styled' +import { lexics } from './config' + +export type TCompanyInfo = { + textAlign?: 'center' | 'left', + width?: string, +} + +export const CompanyInfo = ({ + textAlign = 'left', + width = '100%', +}: TCompanyInfo) => { + useLexicsConfig(lexics) + + return ( + + + + + + + + + + + + + + + ) +} diff --git a/src/features/CompanyInfo/styled.tsx b/src/features/CompanyInfo/styled.tsx new file mode 100644 index 00000000..0e89b6bd --- /dev/null +++ b/src/features/CompanyInfo/styled.tsx @@ -0,0 +1,21 @@ +import styled, { css } from 'styled-components/macro' + +import { isMobileDevice } from 'config/userAgent' + +export const CompanyInfoWrapper = styled.div` + margin-top: auto; + font-family: 'Montserrat', sans-serif; + font-weight: 400; + font-size: 12px; + line-height: 15px; + color: rgba(255, 255, 255, 0.6); + + ${isMobileDevice ? css` + margin-top: 20px; + ` : ''} +` + +export const CompanyName = styled.div` + color: rgba(255, 255, 255, 0.8); +` +export const CompanyInfoText = styled.div`` diff --git a/src/features/UserAccount/components/PersonalInfoForm/styled.tsx b/src/features/UserAccount/components/PersonalInfoForm/styled.tsx index e48e856a..bdda810c 100644 --- a/src/features/UserAccount/components/PersonalInfoForm/styled.tsx +++ b/src/features/UserAccount/components/PersonalInfoForm/styled.tsx @@ -8,6 +8,8 @@ import { Column, InputWrapper } from 'features/Common/Input/styled' export const Form = styled.div` padding-top: 26px; min-width: 560px; + display: flex; + flex-direction: column; ${Column}:first-child ${InputWrapper} { margin-top: 0; diff --git a/src/features/UserAccount/index.tsx b/src/features/UserAccount/index.tsx index 4695c483..0b552a71 100644 --- a/src/features/UserAccount/index.tsx +++ b/src/features/UserAccount/index.tsx @@ -24,6 +24,7 @@ import { StyledLink, UserAccountWrapper, } from './styled' +import { CompanyInfo } from '../CompanyInfo' const UserAccount = () => { usePageLogger(PAGES.useraccount) @@ -68,6 +69,7 @@ const UserAccount = () => { + diff --git a/src/features/UserAccount/styled.tsx b/src/features/UserAccount/styled.tsx index da752007..fe124656 100644 --- a/src/features/UserAccount/styled.tsx +++ b/src/features/UserAccount/styled.tsx @@ -83,8 +83,10 @@ export const Icon = styled.span` export const ContentWrapper = styled.div` width: 100%; display: flex; + flex-direction: column; padding-left: 3.3rem; - + height: 100%; + @media ${devices.tablet} { padding-top: 0; padding-left: 0;