Skip to content

Commit

Permalink
Add explanation paragraph to recovery method card (#1917)
Browse files Browse the repository at this point in the history
This PR changes the recovery method card to be consistent with
the passkeys and temp keys cards:
* always show card border
* have a small explanatory text below the title
  • Loading branch information
frederikrothenberger authored Sep 21, 2023
1 parent 77919d5 commit bc3ad7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/frontend/src/flows/manage/recoveryMethodsSection.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"en": {
"security_warning": "Security Warning",
"recovery_phrase_enabled": "You enabled a recovery phrase.",
"recovery_key_enabled": "You enabled a recovery device."
"recovery_key_enabled": "You enabled a recovery device.",
"enable_recovery_to_make_secure": "Enable recovery methods to make your Internet Identity more secure."
}
}
5 changes: 4 additions & 1 deletion src/frontend/src/flows/manage/recoveryMethodsSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export const recoveryMethodsSection = ({
const warnNoRecovery = isNullish(recoveryPhrase) && isNullish(recoveryKey);
const wrapClasses = [
"l-stack",
...(warnNoRecovery ? ["c-card", "c-card--narrow", "c-card--warning"] : []),
"c-card",
"c-card--narrow",
...(warnNoRecovery ? ["c-card--warning"] : []),
];

return html`
Expand All @@ -54,6 +56,7 @@ export const recoveryMethodsSection = ({
<div class="t-title">
<h2>Recovery Methods</h2>
</div>
<p class="t-paragraph t-lead">${copy.enable_recovery_to_make_secure}</p>
<div class="c-action-list">
<ul>
${isNullish(recoveryPhrase)
Expand Down

0 comments on commit bc3ad7e

Please sign in to comment.