You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
1.9 KiB
75 lines
1.9 KiB
9 years ago
|
const inherits = require('util').inherits
|
||
|
const Component = require('react').Component
|
||
|
const connect = require('react-redux').connect
|
||
|
const h = require('react-hyperscript')
|
||
|
const actions = require('../actions')
|
||
|
|
||
|
module.exports = connect(mapStateToProps)(CreateVaultCompleteScreen)
|
||
|
|
||
|
inherits(CreateVaultCompleteScreen, Component)
|
||
9 years ago
|
function CreateVaultCompleteScreen () {
|
||
9 years ago
|
Component.call(this)
|
||
|
}
|
||
|
|
||
9 years ago
|
function mapStateToProps (state) {
|
||
9 years ago
|
return {
|
||
9 years ago
|
seed: state.appState.currentView.seedWords,
|
||
9 years ago
|
cachedSeed: state.metamask.seedWords,
|
||
|
}
|
||
|
}
|
||
|
|
||
9 years ago
|
CreateVaultCompleteScreen.prototype.render = function () {
|
||
9 years ago
|
var state = this.props
|
||
|
var seed = state.seed || state.cachedSeed
|
||
|
|
||
|
return (
|
||
|
|
||
|
h('.initialize-screen.flex-column.flex-center.flex-grow', [
|
||
|
|
||
9 years ago
|
// // subtitle and nav
|
||
|
// h('.section-title.flex-row.flex-center', [
|
||
|
// h('h2.page-subtitle', 'Vault Created'),
|
||
|
// ]),
|
||
|
|
||
|
h('h3.flex-center.text-transform-uppercase', {
|
||
|
style: {
|
||
|
background: '#EBEBEB',
|
||
|
color: '#AEAEAE',
|
||
|
marginTop: 36,
|
||
|
marginBottom: 8,
|
||
|
width: '100%',
|
||
|
fontSize: '20px',
|
||
|
padding: 6,
|
||
|
},
|
||
|
}, [
|
||
|
'Vault Created',
|
||
9 years ago
|
]),
|
||
|
|
||
|
h('span.error', { // Error for the right red
|
||
|
style: {
|
||
|
padding: '12px 20px 0px 20px',
|
||
|
textAlign: 'center',
|
||
9 years ago
|
},
|
||
9 years ago
|
}, 'These 12 words can restore all of your MetaMask accounts for this vault.\nSave them somewhere safe and secret.'),
|
||
|
|
||
|
h('textarea.twelve-word-phrase', {
|
||
|
readOnly: true,
|
||
|
value: seed,
|
||
|
}),
|
||
|
|
||
9 years ago
|
h('button.primary', {
|
||
9 years ago
|
onClick: () => this.confirmSeedWords(),
|
||
9 years ago
|
style: {
|
||
|
margin: '24px',
|
||
8 years ago
|
fontSize: '0.9em',
|
||
9 years ago
|
},
|
||
|
}, 'I\'ve copied it somewhere safe'),
|
||
9 years ago
|
])
|
||
|
)
|
||
|
}
|
||
|
|
||
9 years ago
|
CreateVaultCompleteScreen.prototype.confirmSeedWords = function () {
|
||
9 years ago
|
this.props.dispatch(actions.confirmSeedWords())
|
||
|
}
|
||
|
|