accounts-frontend/packages/app/components/profile/multiFactorAuth/MfaStatus.tsx

51 lines
1.9 KiB
TypeScript
Raw Normal View History

2017-09-09 19:52:19 +05:30
import React from 'react';
import { FormattedMessage as Message } from 'react-intl';
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
import mfaStyles from './mfa.scss';
2017-09-09 19:52:19 +05:30
2019-12-07 16:58:52 +05:30
export default function MfaStatus({ onProceed }: { onProceed: () => void }) {
2020-05-24 04:38:24 +05:30
return (
<div className={styles.formBody}>
<ScrollIntoView />
2020-05-24 04:38:24 +05:30
<div className={styles.formRow}>
<div className={mfaStyles.bigIcon}>
<span className={icons.lock} />
</div>
<p className={`${styles.description} ${mfaStyles.mfaTitle}`}>
<Message
key="mfaEnabledForYourAcc"
defaultMessage="Twofactor authentication for your account is active now"
/>
2020-05-24 04:38:24 +05:30
</p>
</div>
2017-09-09 19:52:19 +05:30
2020-05-24 04:38:24 +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 twofactor auth is enabled."
/>
2020-05-24 04:38:24 +05:30
</p>
</div>
2017-09-09 19:52:19 +05:30
2020-05-24 04:38:24 +05:30
<div className={`${styles.formRow} ${mfaStyles.disableMfa}`}>
<p className={styles.description}>
<a
href="#"
onClick={(event) => {
event.preventDefault();
onProceed();
}}
>
<Message key="disable" defaultMessage="Disable" />
2020-05-24 04:38:24 +05:30
</a>
</p>
</div>
</div>
);
2017-09-09 19:52:19 +05:30
}