2020-07-21 18:00:18 +05:30
import React , { ComponentType , MouseEventHandler } from 'react' ;
2017-09-09 19:52:19 +05:30
import { FormattedMessage as Message } from 'react-intl' ;
2019-12-08 00:32:00 +05:30
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 19:52:19 +05:30
2020-06-04 22:11:27 +05:30
import mfaStyles from './mfa.scss' ;
2017-09-09 19:52:19 +05:30
2020-07-21 18:00:18 +05:30
interface Props {
onProceed? : MouseEventHandler < HTMLAnchorElement > ;
}
2017-10-28 19:08:07 +05:30
2020-07-21 18:00:18 +05:30
const MfaStatus : ComponentType < Props > = ( { onProceed } ) = > (
< div className = { styles . formBody } >
< ScrollIntoView / >
2017-09-09 19:52:19 +05:30
2020-07-21 18:00:18 +05:30
< div className = { styles . formRow } >
< div className = { mfaStyles . bigIcon } >
< span className = { icons . lock } / >
2020-05-24 04:38:24 +05:30
< / div >
2020-07-26 22:36:25 +05:30
< p className = { mfaStyles . mfaTitle } >
2020-07-21 18:00:18 +05:30
< Message
key = "mfaEnabledForYourAcc"
defaultMessage = "Two‑ factor authentication for your account is active now"
/ >
< / p >
< / div >
2017-09-09 19:52:19 +05:30
2020-07-21 18:00:18 +05:30
< div className = { styles . formRow } >
< p className = { styles . description } >
< 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."
/ >
< / p >
2020-05-24 04:38:24 +05:30
< / div >
2020-07-21 18:00:18 +05:30
< div className = { ` ${ styles . formRow } ${ mfaStyles . disableMfa } ` } >
< p className = { styles . description } >
< a href = "#" onClick = { onProceed } >
< Message key = "disable" defaultMessage = "Disable" / >
< / a >
< / p >
< / div >
< / div >
) ;
export default MfaStatus ;