Skip to content

Commit

Permalink
Add link to download seed words in new UI
Browse files Browse the repository at this point in the history
  • Loading branch information
whymarrh committed Aug 13, 2018
1 parent b83a746 commit 4dadeb9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
13 changes: 13 additions & 0 deletions mascara/src/app/first-time/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,19 @@
min-width: 0;
}

.backup-phrase__tips-text--link {
color: #2f9ae0;
cursor: pointer;
}

.backup-phrase__tips-text--link:hover {
color: #2f9ae0;
}

.backup-phrase__tips-text--strong {
font-weight: bold;
}

@media only screen and (max-width: 768px) {
.backup-phrase__content-wrapper {
flex-direction: column;
Expand Down
14 changes: 14 additions & 0 deletions mascara/src/app/first-time/seed-screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import classnames from 'classnames'
import { withRouter } from 'react-router-dom'
import { compose } from 'recompose'
import Identicon from '../../../../ui/app/components/identicon'
import {exportAsFile} from '../../../../ui/app/util'
import Breadcrumbs from './breadcrumbs'
import LoadingScreen from './loading-screen'
import { DEFAULT_ROUTE, INITIALIZE_CONFIRM_SEED_ROUTE } from '../../../../ui/app/routes'
Expand Down Expand Up @@ -65,6 +66,12 @@ class BackupPhraseScreen extends Component {
}
}

exportSeedWords = () => {
const { seedWords } = this.props

exportAsFile('MetaMask Secret Backup Phrase', seedWords, 'text/plain')
}

renderSecretWordsContainer () {
const { isShowingSecret } = this.state

Expand Down Expand Up @@ -119,6 +126,13 @@ class BackupPhraseScreen extends Component {
<div className="backup-phrase__tips-text">
Memorize this phrase.
</div>
<div className="backup-phrase__tips-text">
<strong>
<a className="backup-phrase__tips-text--link backup-phrase__tips-text--strong" onClick={this.exportSeedWords}>
Download this Secret Backup Phrase
</a>
</strong> and keep it stored safely on an external encrypted hard drive or storage medium.
</div>
</div>
<div className="backup-phrase__next-button">
<button
Expand Down

0 comments on commit 4dadeb9

Please sign in to comment.