Fix auth modals
This commit is contained in:
parent
558a4e74a1
commit
23f35fc35f
4 changed files with 51 additions and 67 deletions
|
|
@ -1,11 +1,6 @@
|
||||||
.Login.DialogContent {
|
.fields {
|
||||||
gap: $unit;
|
|
||||||
// min-width: $unit * 52;
|
|
||||||
|
|
||||||
.Fields {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: $unit;
|
gap: $unit;
|
||||||
padding: 0 $unit-4x;
|
padding: 0 $unit-4x;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,13 @@ import { accountState } from '~utils/accountState'
|
||||||
|
|
||||||
import Button from '~components/common/Button'
|
import Button from '~components/common/Button'
|
||||||
import Input from '~components/common/Input'
|
import Input from '~components/common/Input'
|
||||||
import { Dialog, DialogClose } from '~components/common/Dialog'
|
import { Dialog } from '~components/common/Dialog'
|
||||||
import DialogContent from '~components/common/DialogContent'
|
import DialogContent from '~components/common/DialogContent'
|
||||||
import changeLanguage from '~utils/changeLanguage'
|
import changeLanguage from '~utils/changeLanguage'
|
||||||
|
|
||||||
import CrossIcon from '~public/icons/Cross.svg'
|
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
|
import DialogHeader from '~components/common/DialogHeader'
|
||||||
|
import DialogFooter from '~components/common/DialogFooter'
|
||||||
|
|
||||||
interface ErrorMap {
|
interface ErrorMap {
|
||||||
[index: string]: string
|
[index: string]: string
|
||||||
|
|
@ -221,19 +222,11 @@ const LoginModal = (props: Props) => {
|
||||||
onEscapeKeyDown={onEscapeKeyDown}
|
onEscapeKeyDown={onEscapeKeyDown}
|
||||||
onOpenAutoFocus={onOpenAutoFocus}
|
onOpenAutoFocus={onOpenAutoFocus}
|
||||||
>
|
>
|
||||||
<div className="DialogHeader">
|
<DialogHeader title={t('modals.login.title')} />
|
||||||
<div className="DialogTitle">
|
<form onSubmit={login}>
|
||||||
<h1>{t('modals.login.title')}</h1>
|
<div className={styles.fields}>
|
||||||
</div>
|
|
||||||
<DialogClose className="DialogClose">
|
|
||||||
<CrossIcon />
|
|
||||||
</DialogClose>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form className="form" onSubmit={login}>
|
|
||||||
<div className="Fields">
|
|
||||||
<Input
|
<Input
|
||||||
className="Bound"
|
bound={true}
|
||||||
name="email"
|
name="email"
|
||||||
placeholder={t('modals.login.placeholders.email')}
|
placeholder={t('modals.login.placeholders.email')}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
|
|
@ -242,6 +235,7 @@ const LoginModal = (props: Props) => {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
|
bound={true}
|
||||||
className="Bound"
|
className="Bound"
|
||||||
name="password"
|
name="password"
|
||||||
placeholder={t('modals.login.placeholders.password')}
|
placeholder={t('modals.login.placeholders.password')}
|
||||||
|
|
@ -251,15 +245,17 @@ const LoginModal = (props: Props) => {
|
||||||
ref={passwordInput}
|
ref={passwordInput}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="DialogFooter" ref={footerRef}>
|
<DialogFooter
|
||||||
<div className="Buttons Span">
|
ref={footerRef}
|
||||||
|
rightElements={[
|
||||||
<Button
|
<Button
|
||||||
contained={true}
|
contained={true}
|
||||||
disabled={!formValid}
|
disabled={!formValid}
|
||||||
|
key="confirm"
|
||||||
text={t('modals.login.buttons.confirm')}
|
text={t('modals.login.buttons.confirm')}
|
||||||
|
/>,
|
||||||
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,11 @@
|
||||||
.Signup.DialogContent {
|
.fields {
|
||||||
gap: $unit;
|
|
||||||
// min-width: $unit * 52;
|
|
||||||
|
|
||||||
.Fields {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: calc($unit / 2);
|
gap: $unit;
|
||||||
padding: 0 $unit-4x;
|
padding: 0 $unit-4x;
|
||||||
|
}
|
||||||
|
|
||||||
.terms {
|
.terms {
|
||||||
color: $grey-50;
|
color: $grey-50;
|
||||||
font-size: $font-small;
|
font-size: $font-small;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
|
|
@ -22,6 +19,4 @@
|
||||||
color: darken($blue, 30);
|
color: darken($blue, 30);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,11 @@ import { accountState } from '~utils/accountState'
|
||||||
|
|
||||||
import Button from '~components/common/Button'
|
import Button from '~components/common/Button'
|
||||||
import Input from '~components/common/Input'
|
import Input from '~components/common/Input'
|
||||||
import { Dialog, DialogClose } from '~components/common/Dialog'
|
import { Dialog } from '~components/common/Dialog'
|
||||||
import DialogContent from '~components/common/DialogContent'
|
import DialogContent from '~components/common/DialogContent'
|
||||||
import CrossIcon from '~public/icons/Cross.svg'
|
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
|
import DialogHeader from '~components/common/DialogHeader'
|
||||||
|
import DialogFooter from '~components/common/DialogFooter'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
open: boolean
|
open: boolean
|
||||||
|
|
@ -300,18 +301,11 @@ const SignupModal = (props: Props) => {
|
||||||
onEscapeKeyDown={onEscapeKeyDown}
|
onEscapeKeyDown={onEscapeKeyDown}
|
||||||
onOpenAutoFocus={onOpenAutoFocus}
|
onOpenAutoFocus={onOpenAutoFocus}
|
||||||
>
|
>
|
||||||
<div className="DialogHeader">
|
<DialogHeader title={t('modals.signup.title')} />
|
||||||
<div className="DialogTitle">
|
<form onSubmit={register}>
|
||||||
<h1>{t('modals.signup.title')}</h1>
|
<div className={styles.fields}>
|
||||||
</div>
|
|
||||||
<DialogClose className="DialogClose">
|
|
||||||
<CrossIcon />
|
|
||||||
</DialogClose>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form className="form" onSubmit={register}>
|
|
||||||
<div className="Fields">
|
|
||||||
<Input
|
<Input
|
||||||
|
bound={true}
|
||||||
className="Bound"
|
className="Bound"
|
||||||
name="username"
|
name="username"
|
||||||
placeholder={t('modals.signup.placeholders.username')}
|
placeholder={t('modals.signup.placeholders.username')}
|
||||||
|
|
@ -321,6 +315,7 @@ const SignupModal = (props: Props) => {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
|
bound={true}
|
||||||
className="Bound"
|
className="Bound"
|
||||||
name="email"
|
name="email"
|
||||||
placeholder={t('modals.signup.placeholders.email')}
|
placeholder={t('modals.signup.placeholders.email')}
|
||||||
|
|
@ -330,6 +325,7 @@ const SignupModal = (props: Props) => {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
|
bound={true}
|
||||||
className="Bound"
|
className="Bound"
|
||||||
name="password"
|
name="password"
|
||||||
placeholder={t('modals.signup.placeholders.password')}
|
placeholder={t('modals.signup.placeholders.password')}
|
||||||
|
|
@ -340,7 +336,7 @@ const SignupModal = (props: Props) => {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
className="Bound"
|
bound={true}
|
||||||
name="confirm_password"
|
name="confirm_password"
|
||||||
placeholder={t('modals.signup.placeholders.password_confirm')}
|
placeholder={t('modals.signup.placeholders.password_confirm')}
|
||||||
type="password"
|
type="password"
|
||||||
|
|
@ -350,15 +346,17 @@ const SignupModal = (props: Props) => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="DialogFooter" ref={footerRef}>
|
<DialogFooter
|
||||||
<div className="Buttons Span">
|
ref={footerRef}
|
||||||
|
rightElements={[
|
||||||
<Button
|
<Button
|
||||||
contained={true}
|
contained={true}
|
||||||
disabled={!formValid}
|
disabled={!formValid}
|
||||||
|
key="confirm"
|
||||||
text={t('modals.signup.buttons.confirm')}
|
text={t('modals.signup.buttons.confirm')}
|
||||||
|
/>,
|
||||||
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p className="terms">
|
<p className="terms">
|
||||||
{/* <Trans i18nKey="modals.signup.agreement">
|
{/* <Trans i18nKey="modals.signup.agreement">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue