|
|
|
@ -51,6 +51,7 @@ function mapStateToProps (state) { |
|
|
|
|
menuOpen: state.appState.menuOpen, |
|
|
|
|
network: state.metamask.network, |
|
|
|
|
provider: state.metamask.provider, |
|
|
|
|
forgottenPassword: state.appState.forgottenPassword, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -89,6 +90,7 @@ App.prototype.render = function () { |
|
|
|
|
transitionLeaveTimeout: 300, |
|
|
|
|
}, [ |
|
|
|
|
this.renderPrimary(), |
|
|
|
|
this.renderBackToInitButton(), |
|
|
|
|
]), |
|
|
|
|
]), |
|
|
|
|
]) |
|
|
|
@ -298,6 +300,92 @@ App.prototype.renderDropdown = function () { |
|
|
|
|
}), |
|
|
|
|
]) |
|
|
|
|
} |
|
|
|
|
App.prototype.renderBackButton = function (style, justArrow = false) { |
|
|
|
|
var props = this.props |
|
|
|
|
return ( |
|
|
|
|
h('.flex-row', { |
|
|
|
|
key: 'leftArrow', |
|
|
|
|
transForward: false, |
|
|
|
|
style: style, |
|
|
|
|
onClick: () => props.dispatch(actions.goBackToInitView()), |
|
|
|
|
}, [ |
|
|
|
|
h('i.fa.fa-arrow-left.cursor-pointer'), |
|
|
|
|
justArrow ? null : h('div.cursor-pointer', { |
|
|
|
|
style: { |
|
|
|
|
marginLeft: '3px', |
|
|
|
|
}, |
|
|
|
|
onClick: () => props.dispatch(actions.goBackToInitView()), |
|
|
|
|
}, 'BACK'), |
|
|
|
|
]) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
App.prototype.renderBackToInitButton = function () { |
|
|
|
|
var props = this.props |
|
|
|
|
var button = null |
|
|
|
|
if (!props.isUnlocked) { |
|
|
|
|
if (props.currentView.name === 'InitMenu') { |
|
|
|
|
button = props.forgottenPassword ? h('.flex-row', { |
|
|
|
|
key: 'rightArrow', |
|
|
|
|
style: { |
|
|
|
|
position: 'absolute', |
|
|
|
|
bottom: '10px', |
|
|
|
|
right: '15px', |
|
|
|
|
fontSize: '21px', |
|
|
|
|
fontFamily: 'Montserrat Light', |
|
|
|
|
color: '#7F8082', |
|
|
|
|
width: '77.578px', |
|
|
|
|
alignItems: 'flex-end', |
|
|
|
|
}, |
|
|
|
|
}, [ |
|
|
|
|
h('div.cursor-pointer', { |
|
|
|
|
style: { |
|
|
|
|
marginRight: '3px', |
|
|
|
|
}, |
|
|
|
|
onClick: () => props.dispatch(actions.backToUnlockView()), |
|
|
|
|
}, 'LOGIN'), |
|
|
|
|
h('i.fa.fa-arrow-right.cursor-pointer'), |
|
|
|
|
]) : null |
|
|
|
|
} else if (props.isInitialized) { |
|
|
|
|
var style |
|
|
|
|
switch (props.currentView.name) { |
|
|
|
|
case 'createVault': |
|
|
|
|
style = { |
|
|
|
|
position: 'absolute', |
|
|
|
|
top: '41px', |
|
|
|
|
left: '80px', |
|
|
|
|
fontSize: '21px', |
|
|
|
|
fontFamily: 'Montserrat Bold', |
|
|
|
|
color: 'rgb(174, 174, 174)', |
|
|
|
|
} |
|
|
|
|
return this.renderBackButton(style, true) |
|
|
|
|
case 'restoreVault': |
|
|
|
|
style = { |
|
|
|
|
position: 'absolute', |
|
|
|
|
top: '41px', |
|
|
|
|
left: '70px', |
|
|
|
|
fontSize: '21px', |
|
|
|
|
fontFamily: 'Montserrat Bold', |
|
|
|
|
color: 'rgb(174, 174, 174)', |
|
|
|
|
} |
|
|
|
|
return this.renderBackButton(style, true) |
|
|
|
|
default: |
|
|
|
|
style = { |
|
|
|
|
position: 'absolute', |
|
|
|
|
bottom: '10px', |
|
|
|
|
left: '15px', |
|
|
|
|
fontSize: '21px', |
|
|
|
|
fontFamily: 'Montserrat Light', |
|
|
|
|
color: '#7F8082', |
|
|
|
|
width: '71.969px', |
|
|
|
|
alignItems: 'flex-end', |
|
|
|
|
} |
|
|
|
|
return this.renderBackButton(style) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return button |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
App.prototype.renderPrimary = function () { |
|
|
|
|
var props = this.props |
|
|
|
@ -311,7 +399,7 @@ App.prototype.renderPrimary = function () { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// show initialize screen
|
|
|
|
|
if (!props.isInitialized) { |
|
|
|
|
if (!props.isInitialized || props.forgottenPassword) { |
|
|
|
|
// show current view
|
|
|
|
|
switch (props.currentView.name) { |
|
|
|
|
|
|
|
|
|