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

Reveal seed phrase button placement fixes

Localizing uses of the word "Back"
feature/default_network_editable
ryanml 4 years ago
parent 36b15c489d
commit b0f90f13da
  1. 2
      ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js
  2. 2
      ui/pages/first-time-flow/create-password/new-account/new-account.component.js
  3. 2
      ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js
  4. 3
      ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss
  5. 15
      ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js
  6. 2
      ui/pages/keychains/restore-vault.js

@ -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">

@ -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>

@ -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">

@ -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;
} }
} }
} }

@ -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>

@ -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')}

Loading…
Cancel
Save