-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: twofactor design changes (#1245)
* fix: twofactor design changes * chore: fix i18n --------- Co-authored-by: HendrikThePendric <hendrik@dhis2.org>
- Loading branch information
1 parent
6498d73
commit 283d471
Showing
17 changed files
with
244 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,27 @@ | ||
import i18n from '@dhis2/d2-i18n' | ||
import React from 'react' | ||
import styles from './TwoFactorDisableInstructions.module.css' | ||
|
||
const TwoFactorDisableInstructions = () => ( | ||
<p> | ||
{i18n.t( | ||
'To disable 2 Factor Authentication for your account, first enter the confirmation code from the Authenticator App and then click "Disable".' | ||
)} | ||
</p> | ||
<> | ||
<p className={styles.instructionsHeader}> | ||
{i18n.t('Turn off two-factor authentication', { | ||
keySeparator: '<|>', | ||
})} | ||
</p> | ||
<ol className={styles.orderedList}> | ||
<li> | ||
{i18n.t('Open your authenticator app.', { | ||
keySeparator: '<|>', | ||
})} | ||
</li> | ||
<li> | ||
{i18n.t( | ||
'Now, enter the authentication code below and click the "Turn off" button.' | ||
)} | ||
</li> | ||
</ol> | ||
</> | ||
) | ||
|
||
export default TwoFactorDisableInstructions |
15 changes: 15 additions & 0 deletions
15
src/account/twoFactor/TwoFactorDisableInstructions.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.instructionsHeader { | ||
font-size: 18px; | ||
font-weight: 500; | ||
color: var(--colors-grey900); | ||
} | ||
|
||
.orderedList { | ||
padding-inline-start: 24px; | ||
font-size: 14px; | ||
line-height: 19px; | ||
} | ||
|
||
.orderedList li + li { | ||
margin-top: var(--spacers-dp8); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import i18n from '@dhis2/d2-i18n' | ||
import { IconQuestion16 } from '@dhis2/ui' | ||
import React from 'react' | ||
import styles from './TwoFactorEnableNotice.module.css' | ||
|
||
const TwoFactorEnableNotice = () => ( | ||
<div className={styles.enableNoticeContainer}> | ||
<p className={styles.enableNoticeTitle}> | ||
<IconQuestion16 /> | ||
{i18n.t('Already set up two-factor authentication before?', { | ||
keySeparator: '<|>', | ||
})} | ||
</p> | ||
<p className={styles.enableNoticeBody}> | ||
{i18n.t( | ||
'If you have set up two-factor authentication for this account before, you need to remove that entry from your authenticator app before setting it up again.', | ||
{ keySeparator: '<|>' } | ||
)} | ||
</p> | ||
</div> | ||
) | ||
|
||
export default TwoFactorEnableNotice |
Oops, something went wrong.