2017-09-09 17:22:19 +03:00
import React from 'react' ;
import { FormattedMessage as Message } from 'react-intl' ;
2019-12-07 21:02:00 +02:00
import { ScrollIntoView } from 'app/components/ui/scroll' ;
import styles from 'app/components/profile/profileForm.scss' ;
import icons from 'app/components/ui/icons.scss' ;
2017-09-09 17:22:19 +03:00
2020-06-04 19:41:27 +03:00
import mfaStyles from './mfa.scss' ;
2017-09-09 17:22:19 +03:00
2019-12-07 13:28:52 +02:00
export default function MfaStatus ( { onProceed } : { onProceed : ( ) = > void } ) {
2020-05-24 02:08:24 +03:00
return (
< div className = { styles . formBody } >
< ScrollIntoView / >
2017-10-28 16:38:07 +03:00
2020-05-24 02:08:24 +03:00
< div className = { styles . formRow } >
< div className = { mfaStyles . bigIcon } >
< span className = { icons . lock } / >
< / div >
< p className = { ` ${ styles . description } ${ mfaStyles . mfaTitle } ` } >
2020-06-04 19:41:27 +03:00
< Message
key = "mfaEnabledForYourAcc"
defaultMessage = "Two‑ factor authentication for your account is active now"
/ >
2020-05-24 02:08:24 +03:00
< / p >
< / div >
2017-09-09 17:22:19 +03:00
2020-05-24 02:08:24 +03:00
< div className = { styles . formRow } >
< p className = { styles . description } >
2020-06-04 19:41:27 +03:00
< Message
key = "mfaLoginFlowDesc"
defaultMessage = "Additional code will be requested next time you log in. Please note, that Minecraft authorization won't work when two‑ factor auth is enabled."
/ >
2020-05-24 02:08:24 +03:00
< / p >
< / div >
2017-09-09 17:22:19 +03:00
2020-05-24 02:08:24 +03:00
< div className = { ` ${ styles . formRow } ${ mfaStyles . disableMfa } ` } >
< p className = { styles . description } >
< a
href = "#"
onClick = { ( event ) = > {
event . preventDefault ( ) ;
onProceed ( ) ;
} }
>
2020-06-04 19:41:27 +03:00
< Message key = "disable" defaultMessage = "Disable" / >
2020-05-24 02:08:24 +03:00
< / a >
< / p >
< / div >
< / div >
) ;
2017-09-09 17:22:19 +03:00
}