1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Adding back button to reveal seed phrase view (#11246)

Reveal seed phrase button placement fixes

Localizing uses of the word "Back"
This commit is contained in:
ryanml 2021-06-08 10:02:34 -07:00 committed by GitHub
parent b073b04789
commit 1080319b33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 6 deletions

View File

@ -231,7 +231,7 @@ export default class ImportWithSeedPhrase extends PureComponent {
}} }}
href="#" href="#"
> >
{`< Back`} {`< ${t('back')}`}
</a> </a>
</div> </div>
<div className="first-time-flow__header"> <div className="first-time-flow__header">

View File

@ -161,7 +161,7 @@ export default class NewAccount extends PureComponent {
}} }}
href="#" href="#"
> >
{`< Back`} {`< ${t('back')}`}
</a> </a>
</div> </div>
<div className="first-time-flow__header">{t('createPassword')}</div> <div className="first-time-flow__header">{t('createPassword')}</div>

View File

@ -140,7 +140,7 @@ export default class ConfirmSeedPhrase extends PureComponent {
}} }}
href="#" href="#"
> >
{`< Back`} {`< ${t('back')}`}
</a> </a>
</div> </div>
<div className="first-time-flow__header"> <div className="first-time-flow__header">

View File

@ -67,9 +67,10 @@
&__buttons { &__buttons {
display: flex; display: flex;
margin-top: 10px;
.first-time-flow__button:last-of-type { .first-time-flow__button:last-of-type {
margin-left: 20px; margin-left: 10px;
} }
} }
} }

View File

@ -1,12 +1,14 @@
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import classnames from 'classnames'; import classnames from 'classnames';
import Box from '../../../../components/ui/box';
import LockIcon from '../../../../components/ui/lock-icon'; import LockIcon from '../../../../components/ui/lock-icon';
import Button from '../../../../components/ui/button'; import Button from '../../../../components/ui/button';
import Snackbar from '../../../../components/ui/snackbar'; import Snackbar from '../../../../components/ui/snackbar';
import { import {
INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE, INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE,
DEFAULT_ROUTE, DEFAULT_ROUTE,
INITIALIZE_SEED_PHRASE_INTRO_ROUTE,
} from '../../../../helpers/constants/routes'; } from '../../../../helpers/constants/routes';
import { exportAsFile } from '../../../../helpers/utils/util'; import { exportAsFile } from '../../../../helpers/utils/util';
import { returnToOnboardingInitiator } from '../../onboarding-initiator-util'; import { returnToOnboardingInitiator } from '../../onboarding-initiator-util';
@ -123,12 +125,23 @@ export default class RevealSeedPhrase extends PureComponent {
render() { render() {
const { t } = this.context; const { t } = this.context;
const { isShowingSeedPhrase } = this.state; const { isShowingSeedPhrase } = this.state;
const { onboardingInitiator } = this.props; const { history, onboardingInitiator } = this.props;
return ( return (
<div className="reveal-seed-phrase"> <div className="reveal-seed-phrase">
<div className="seed-phrase__sections"> <div className="seed-phrase__sections">
<div className="seed-phrase__main"> <div className="seed-phrase__main">
<Box marginBottom={4}>
<a
href="#"
onClick={(e) => {
e.preventDefault();
history.push(INITIALIZE_SEED_PHRASE_INTRO_ROUTE);
}}
>
{`< ${t('back')}`}
</a>
</Box>
<div className="first-time-flow__header"> <div className="first-time-flow__header">
{t('secretBackupPhrase')} {t('secretBackupPhrase')}
</div> </div>

View File

@ -148,7 +148,7 @@ class RestoreVaultPage extends Component {
}} }}
href="#" href="#"
> >
{`< Back`} {`< ${t('back')}`}
</a> </a>
<div className="import-account__title"> <div className="import-account__title">
{this.context.t('restoreAccountWithSeed')} {this.context.t('restoreAccountWithSeed')}