fix: typography styling
This commit is contained in:
parent
6eaebc3108
commit
771a60a4ad
11 changed files with 35 additions and 65 deletions
|
|
@ -8,7 +8,7 @@ import {
|
||||||
fontPrimary,
|
fontPrimary,
|
||||||
fontSecondary,
|
fontSecondary,
|
||||||
fontMonospaced,
|
fontMonospaced,
|
||||||
fontSize2FA
|
codeInputFontSize
|
||||||
} from 'src/styling/variables'
|
} from 'src/styling/variables'
|
||||||
|
|
||||||
const base = {
|
const base = {
|
||||||
|
|
@ -128,7 +128,7 @@ export default {
|
||||||
},
|
},
|
||||||
confirmationCode: {
|
confirmationCode: {
|
||||||
extend: base,
|
extend: base,
|
||||||
fontSize: fontSize2FA,
|
fontSize: codeInputFontSize,
|
||||||
fontFamily: fontPrimary,
|
fontFamily: fontPrimary,
|
||||||
fontWeight: 900
|
fontWeight: 900
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ import { useHistory } from 'react-router-dom'
|
||||||
import AppContext from 'src/AppContext'
|
import AppContext from 'src/AppContext'
|
||||||
import { Button } from 'src/components/buttons'
|
import { Button } from 'src/components/buttons'
|
||||||
import { CodeInput } from 'src/components/inputs/base'
|
import { CodeInput } from 'src/components/inputs/base'
|
||||||
import { H2, P } from 'src/components/typography'
|
import { TL1, P } from 'src/components/typography'
|
||||||
|
|
||||||
import styles from './Login.styles'
|
import styles from './shared.styles'
|
||||||
import { STATES } from './states'
|
import { STATES } from './states'
|
||||||
|
|
||||||
const useStyles = makeStyles(styles)
|
const useStyles = makeStyles(styles)
|
||||||
|
|
@ -99,9 +99,9 @@ const Input2FAState = ({ state, dispatch }) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<H2 className={classes.info}>
|
<TL1 className={classes.info}>
|
||||||
Enter your two-factor authentication code
|
Enter your two-factor authentication code
|
||||||
</H2>
|
</TL1>
|
||||||
<CodeInput
|
<CodeInput
|
||||||
name="2fa"
|
name="2fa"
|
||||||
value={state.twoFAField}
|
value={state.twoFAField}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { makeStyles, Grid } from '@material-ui/core'
|
import { makeStyles, Grid } from '@material-ui/core'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
import styles from './Login.styles'
|
|
||||||
import LoginCard from './LoginCard'
|
import LoginCard from './LoginCard'
|
||||||
|
import styles from './shared.styles'
|
||||||
|
|
||||||
const useStyles = makeStyles(styles)
|
const useStyles = makeStyles(styles)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,13 @@ import Paper from '@material-ui/core/Paper'
|
||||||
import { makeStyles } from '@material-ui/core/styles'
|
import { makeStyles } from '@material-ui/core/styles'
|
||||||
import React, { useReducer } from 'react'
|
import React, { useReducer } from 'react'
|
||||||
|
|
||||||
import { H2 } from 'src/components/typography'
|
import { H5 } from 'src/components/typography'
|
||||||
import { ReactComponent as Logo } from 'src/styling/icons/menu/logo.svg'
|
import { ReactComponent as Logo } from 'src/styling/icons/menu/logo.svg'
|
||||||
|
|
||||||
import Input2FAState from './Input2FAState'
|
import Input2FAState from './Input2FAState'
|
||||||
import styles from './Login.styles'
|
|
||||||
import LoginState from './LoginState'
|
import LoginState from './LoginState'
|
||||||
import Setup2FAState from './Setup2FAState'
|
import Setup2FAState from './Setup2FAState'
|
||||||
|
import styles from './shared.styles'
|
||||||
import { STATES } from './states'
|
import { STATES } from './states'
|
||||||
|
|
||||||
const useStyles = makeStyles(styles)
|
const useStyles = makeStyles(styles)
|
||||||
|
|
@ -49,7 +49,7 @@ const LoginCard = () => {
|
||||||
<div className={classes.wrapper}>
|
<div className={classes.wrapper}>
|
||||||
<div className={classes.titleWrapper}>
|
<div className={classes.titleWrapper}>
|
||||||
<Logo className={classes.icon} />
|
<Logo className={classes.icon} />
|
||||||
<H2 className={classes.title}>Lamassu Admin</H2>
|
<H5 className={classes.title}>Lamassu Admin</H5>
|
||||||
</div>
|
</div>
|
||||||
{renderState()}
|
{renderState()}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ import * as Yup from 'yup'
|
||||||
|
|
||||||
import { Button } from 'src/components/buttons'
|
import { Button } from 'src/components/buttons'
|
||||||
import { Checkbox, SecretInput, TextInput } from 'src/components/inputs/formik'
|
import { Checkbox, SecretInput, TextInput } from 'src/components/inputs/formik'
|
||||||
import { Label2, P } from 'src/components/typography'
|
import { Label3, P } from 'src/components/typography'
|
||||||
|
|
||||||
import styles from './Login.styles'
|
import styles from './shared.styles'
|
||||||
import { STATES } from './states'
|
import { STATES } from './states'
|
||||||
|
|
||||||
const useStyles = makeStyles(styles)
|
const useStyles = makeStyles(styles)
|
||||||
|
|
@ -104,7 +104,7 @@ const LoginState = ({ state, dispatch }) => {
|
||||||
className={classes.checkbox}
|
className={classes.checkbox}
|
||||||
component={Checkbox}
|
component={Checkbox}
|
||||||
/>
|
/>
|
||||||
<Label2 className={classes.inputLabel}>Keep me logged in</Label2>
|
<Label3>Keep me logged in</Label3>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes.footer}>
|
<div className={classes.footer}>
|
||||||
{getErrorMsg(errors, touched) && (
|
{getErrorMsg(errors, touched) && (
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ import * as Yup from 'yup'
|
||||||
|
|
||||||
import { Button } from 'src/components/buttons'
|
import { Button } from 'src/components/buttons'
|
||||||
import { SecretInput } from 'src/components/inputs/formik'
|
import { SecretInput } from 'src/components/inputs/formik'
|
||||||
import { H2, Label2, P } from 'src/components/typography'
|
import { H2, Label3, P } from 'src/components/typography'
|
||||||
import { ReactComponent as Logo } from 'src/styling/icons/menu/logo.svg'
|
import { ReactComponent as Logo } from 'src/styling/icons/menu/logo.svg'
|
||||||
|
|
||||||
import styles from './Login.styles'
|
import styles from './shared.styles'
|
||||||
|
|
||||||
const QueryParams = () => new URLSearchParams(useLocation().search)
|
const QueryParams = () => new URLSearchParams(useLocation().search)
|
||||||
const useStyles = makeStyles(styles)
|
const useStyles = makeStyles(styles)
|
||||||
|
|
@ -178,9 +178,7 @@ const Register = () => {
|
||||||
)}
|
)}
|
||||||
{!loading && !state.wasSuccessful && (
|
{!loading && !state.wasSuccessful && (
|
||||||
<>
|
<>
|
||||||
<Label2 className={classes.inputLabel}>
|
<Label3>Link has expired</Label3>
|
||||||
Link has expired
|
|
||||||
</Label2>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,11 @@ import { useLocation, useHistory } from 'react-router-dom'
|
||||||
|
|
||||||
import { ActionButton, Button } from 'src/components/buttons'
|
import { ActionButton, Button } from 'src/components/buttons'
|
||||||
import { CodeInput } from 'src/components/inputs/base'
|
import { CodeInput } from 'src/components/inputs/base'
|
||||||
import { H2, Label2, P } from 'src/components/typography'
|
import { H2, Label2, Label3, P } from 'src/components/typography'
|
||||||
import { ReactComponent as Logo } from 'src/styling/icons/menu/logo.svg'
|
import { ReactComponent as Logo } from 'src/styling/icons/menu/logo.svg'
|
||||||
import { primaryColor } from 'src/styling/variables'
|
import { primaryColor } from 'src/styling/variables'
|
||||||
|
|
||||||
import styles from './Login.styles'
|
import styles from './shared.styles'
|
||||||
|
|
||||||
const QueryParams = () => new URLSearchParams(useLocation().search)
|
const QueryParams = () => new URLSearchParams(useLocation().search)
|
||||||
const useStyles = makeStyles(styles)
|
const useStyles = makeStyles(styles)
|
||||||
|
|
@ -174,9 +174,7 @@ const Reset2FA = () => {
|
||||||
)}
|
)}
|
||||||
{!isLoading && !wasSuccessful && (
|
{!isLoading && !wasSuccessful && (
|
||||||
<>
|
<>
|
||||||
<Label2 className={classes.inputLabel}>
|
<Label3>Link has expired</Label3>
|
||||||
Link has expired
|
|
||||||
</Label2>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ import * as Yup from 'yup'
|
||||||
|
|
||||||
import { Button } from 'src/components/buttons'
|
import { Button } from 'src/components/buttons'
|
||||||
import { SecretInput } from 'src/components/inputs/formik/'
|
import { SecretInput } from 'src/components/inputs/formik/'
|
||||||
import { H2, Label2, P } from 'src/components/typography'
|
import { H2, Label3, P } from 'src/components/typography'
|
||||||
import { ReactComponent as Logo } from 'src/styling/icons/menu/logo.svg'
|
import { ReactComponent as Logo } from 'src/styling/icons/menu/logo.svg'
|
||||||
|
|
||||||
import styles from './Login.styles'
|
import styles from './shared.styles'
|
||||||
|
|
||||||
const QueryParams = () => new URLSearchParams(useLocation().search)
|
const QueryParams = () => new URLSearchParams(useLocation().search)
|
||||||
const useStyles = makeStyles(styles)
|
const useStyles = makeStyles(styles)
|
||||||
|
|
@ -157,9 +157,7 @@ const ResetPassword = () => {
|
||||||
)}
|
)}
|
||||||
{!isLoading && !wasSuccessful && (
|
{!isLoading && !wasSuccessful && (
|
||||||
<>
|
<>
|
||||||
<Label2 className={classes.inputLabel}>
|
<Label3>Link has expired</Label3>
|
||||||
Link has expired
|
|
||||||
</Label2>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ import { useHistory } from 'react-router-dom'
|
||||||
import AppContext from 'src/AppContext'
|
import AppContext from 'src/AppContext'
|
||||||
import { ActionButton, Button } from 'src/components/buttons'
|
import { ActionButton, Button } from 'src/components/buttons'
|
||||||
import { CodeInput } from 'src/components/inputs/base'
|
import { CodeInput } from 'src/components/inputs/base'
|
||||||
import { Label2, P } from 'src/components/typography'
|
import { Label3, P } from 'src/components/typography'
|
||||||
import { primaryColor } from 'src/styling/variables'
|
import { primaryColor } from 'src/styling/variables'
|
||||||
|
|
||||||
import styles from './Login.styles'
|
import styles from './shared.styles'
|
||||||
|
|
||||||
const SETUP_2FA = gql`
|
const SETUP_2FA = gql`
|
||||||
mutation setup2FA(
|
mutation setup2FA(
|
||||||
|
|
@ -103,25 +103,25 @@ const Setup2FAState = ({ state, dispatch }) => {
|
||||||
otpauth && (
|
otpauth && (
|
||||||
<>
|
<>
|
||||||
<div className={classes.infoWrapper}>
|
<div className={classes.infoWrapper}>
|
||||||
<Label2 className={classes.info2}>
|
<Label3 className={classes.info2}>
|
||||||
We detected that this account does not have its two-factor
|
We detected that this account does not have its two-factor
|
||||||
authentication enabled. In order to protect the resources in the
|
authentication enabled. In order to protect the resources in the
|
||||||
system, a two-factor authentication is enforced.
|
system, a two-factor authentication is enforced.
|
||||||
</Label2>
|
</Label3>
|
||||||
<Label2 className={classes.info2}>
|
<Label3 className={classes.info2}>
|
||||||
To finish this process, please scan the following QR code or insert
|
To finish this process, please scan the following QR code or insert
|
||||||
the secret further below on an authentication app of your choice,
|
the secret further below on an authentication app of your choice,
|
||||||
such as Google Authenticator or Authy.
|
such as Google Authenticator or Authy.
|
||||||
</Label2>
|
</Label3>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes.qrCodeWrapper}>
|
<div className={classes.qrCodeWrapper}>
|
||||||
<QRCode size={240} fgColor={primaryColor} value={otpauth} />
|
<QRCode size={240} fgColor={primaryColor} value={otpauth} />
|
||||||
</div>
|
</div>
|
||||||
<div className={classes.secretWrapper}>
|
<div className={classes.secretWrapper}>
|
||||||
<Label2 className={classes.secretLabel}>Your secret:</Label2>
|
<Label3 className={classes.secretLabel}>Your secret:</Label3>
|
||||||
<Label2 className={isShowing ? classes.secret : classes.hiddenSecret}>
|
<Label3 className={isShowing ? classes.secret : classes.hiddenSecret}>
|
||||||
{secret}
|
{secret}
|
||||||
</Label2>
|
</Label3>
|
||||||
<ActionButton
|
<ActionButton
|
||||||
disabled={!secret && !otpauth}
|
disabled={!secret && !otpauth}
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,9 @@
|
||||||
import {
|
import { backgroundColor, errorColor } from 'src/styling/variables'
|
||||||
fontPrimary,
|
|
||||||
fontSecondary,
|
|
||||||
primaryColor,
|
|
||||||
backgroundColor,
|
|
||||||
errorColor
|
|
||||||
} from 'src/styling/variables'
|
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
title: {
|
title: {
|
||||||
color: primaryColor,
|
|
||||||
fontFamily: fontPrimary,
|
|
||||||
fontSize: '18px',
|
|
||||||
fontWeight: 'normal',
|
|
||||||
paddingTop: 8
|
paddingTop: 8
|
||||||
},
|
},
|
||||||
inputLabel: {
|
|
||||||
fontSize: '16px',
|
|
||||||
fontWeight: 550
|
|
||||||
},
|
|
||||||
input: {
|
input: {
|
||||||
marginBottom: 25,
|
marginBottom: 25,
|
||||||
marginTop: -15
|
marginTop: -15
|
||||||
|
|
@ -44,7 +30,7 @@ const styles = {
|
||||||
marginRight: 25
|
marginRight: 25
|
||||||
},
|
},
|
||||||
checkbox: {
|
checkbox: {
|
||||||
transform: 'scale(2)',
|
transform: 'scale(1.5)',
|
||||||
marginRight: 5,
|
marginRight: 5,
|
||||||
marginLeft: -5
|
marginLeft: -5
|
||||||
},
|
},
|
||||||
|
|
@ -72,19 +58,15 @@ const styles = {
|
||||||
minHeight: '100vh'
|
minHeight: '100vh'
|
||||||
},
|
},
|
||||||
info: {
|
info: {
|
||||||
fontFamily: fontSecondary,
|
|
||||||
marginBottom: '5vh'
|
marginBottom: '5vh'
|
||||||
},
|
},
|
||||||
info2: {
|
info2: {
|
||||||
fontFamily: fontSecondary,
|
|
||||||
fontSize: '14px',
|
|
||||||
textAlign: 'justify'
|
textAlign: 'justify'
|
||||||
},
|
},
|
||||||
infoWrapper: {
|
infoWrapper: {
|
||||||
marginBottom: '3vh'
|
marginBottom: '3vh'
|
||||||
},
|
},
|
||||||
errorMessage: {
|
errorMessage: {
|
||||||
fontFamily: fontSecondary,
|
|
||||||
color: errorColor
|
color: errorColor
|
||||||
},
|
},
|
||||||
qrCodeWrapper: {
|
qrCodeWrapper: {
|
||||||
|
|
@ -98,18 +80,12 @@ const styles = {
|
||||||
alignItems: 'center'
|
alignItems: 'center'
|
||||||
},
|
},
|
||||||
secretLabel: {
|
secretLabel: {
|
||||||
fontSize: '16px',
|
|
||||||
fontWeight: 550,
|
|
||||||
marginRight: 15
|
marginRight: 15
|
||||||
},
|
},
|
||||||
secret: {
|
secret: {
|
||||||
fontSize: '16px',
|
|
||||||
fontWeight: 550,
|
|
||||||
marginRight: 35
|
marginRight: 35
|
||||||
},
|
},
|
||||||
hiddenSecret: {
|
hiddenSecret: {
|
||||||
fontSize: '16px',
|
|
||||||
fontWeight: 550,
|
|
||||||
marginRight: 35,
|
marginRight: 35,
|
||||||
filter: 'blur(8px)'
|
filter: 'blur(8px)'
|
||||||
},
|
},
|
||||||
|
|
@ -68,7 +68,6 @@ let fontSize2 = 20
|
||||||
let fontSize3 = 16
|
let fontSize3 = 16
|
||||||
let fontSize4 = 14
|
let fontSize4 = 14
|
||||||
let fontSize5 = 13
|
let fontSize5 = 13
|
||||||
const fontSize2FA = 35
|
|
||||||
|
|
||||||
if (version === 8) {
|
if (version === 8) {
|
||||||
fontSize1 = 32
|
fontSize1 = 32
|
||||||
|
|
@ -85,6 +84,7 @@ const inputFontSizeLg = fontSize1
|
||||||
const inputFontWeight = 500
|
const inputFontWeight = 500
|
||||||
const inputFontWeightBold = 700
|
const inputFontWeightBold = 700
|
||||||
const inputFontFamily = fontSecondary
|
const inputFontFamily = fontSecondary
|
||||||
|
const codeInputFontSize = 35
|
||||||
|
|
||||||
// Breakpoints
|
// Breakpoints
|
||||||
const sm = 576
|
const sm = 576
|
||||||
|
|
@ -159,7 +159,6 @@ export {
|
||||||
fontPrimary,
|
fontPrimary,
|
||||||
fontSecondary,
|
fontSecondary,
|
||||||
fontMonospaced,
|
fontMonospaced,
|
||||||
fontSize2FA,
|
|
||||||
// named font sizes
|
// named font sizes
|
||||||
smallestFontSize,
|
smallestFontSize,
|
||||||
inputFontSize,
|
inputFontSize,
|
||||||
|
|
@ -168,6 +167,7 @@ export {
|
||||||
inputFontFamily,
|
inputFontFamily,
|
||||||
inputFontWeight,
|
inputFontWeight,
|
||||||
inputFontWeightBold,
|
inputFontWeightBold,
|
||||||
|
codeInputFontSize,
|
||||||
// screen sizes
|
// screen sizes
|
||||||
sm,
|
sm,
|
||||||
md,
|
md,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue