From 3a503d2ac21ebb0d49e718527e7bcaddc6d6f322 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 23 Nov 2016 15:29:42 -0800 Subject: Add link back to unlock. --- ui/app/first-time/init-menu.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ui/app/first-time/init-menu.js') diff --git a/ui/app/first-time/init-menu.js b/ui/app/first-time/init-menu.js index 6ceee6784..f9fb77aa5 100644 --- a/ui/app/first-time/init-menu.js +++ b/ui/app/first-time/init-menu.js @@ -21,6 +21,7 @@ function mapStateToProps (state) { // state from plugin currentView: state.appState.currentView, warning: state.appState.warning, + forgottenPassword: state.appState.forgottenPassword, } } @@ -128,6 +129,17 @@ InitializeMenuScreen.prototype.renderMenu = function (state) { }, 'I already have a DEN that I would like to import'), ]), + state.forgottenPassword ? h('.flex-row.flex-center.flex-grow', [ + h('p.pointer', { + onClick: this.backToUnlockView.bind(this), + style: { + fontSize: '0.8em', + color: 'rgb(247, 134, 28)', + textDecoration: 'underline', + }, + }, 'I remember my password!'), + ]) : null, + ]) ) } @@ -147,6 +159,10 @@ InitializeMenuScreen.prototype.showRestoreVault = function () { this.props.dispatch(actions.showRestoreVault()) } +InitializeMenuScreen.prototype.backToUnlockView = function () { + this.props.dispatch(actions.backToUnlockView()) +} + InitializeMenuScreen.prototype.createNewVaultAndKeychain = function () { var passwordBox = document.getElementById('password-box') var password = passwordBox.value -- cgit From 8dd298238de5de6b8c84bbefadd6db5c8af1adc6 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 23 Nov 2016 15:42:17 -0800 Subject: Cosmetic changes, rename links. --- ui/app/first-time/init-menu.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'ui/app/first-time/init-menu.js') diff --git a/ui/app/first-time/init-menu.js b/ui/app/first-time/init-menu.js index f9fb77aa5..c41aecc48 100644 --- a/ui/app/first-time/init-menu.js +++ b/ui/app/first-time/init-menu.js @@ -21,7 +21,7 @@ function mapStateToProps (state) { // state from plugin currentView: state.appState.currentView, warning: state.appState.warning, - forgottenPassword: state.appState.forgottenPassword, + forgottenPassword: state.metamask.isInitialized, } } @@ -118,27 +118,27 @@ InitializeMenuScreen.prototype.renderMenu = function (state) { }, }, 'Create'), - h('.flex-row.flex-center.flex-grow', [ + state.forgottenPassword ? h('.flex-row.flex-center.flex-grow', [ h('p.pointer', { - onClick: this.showRestoreVault.bind(this), + onClick: this.backToUnlockView.bind(this), style: { fontSize: '0.8em', color: 'rgb(247, 134, 28)', textDecoration: 'underline', }, - }, 'I already have a DEN that I would like to import'), - ]), + }, 'Return to Login'), + ]) : null, - state.forgottenPassword ? h('.flex-row.flex-center.flex-grow', [ + h('.flex-row.flex-center.flex-grow', [ h('p.pointer', { - onClick: this.backToUnlockView.bind(this), + onClick: this.showRestoreVault.bind(this), style: { fontSize: '0.8em', color: 'rgb(247, 134, 28)', textDecoration: 'underline', }, - }, 'I remember my password!'), - ]) : null, + }, 'Import Existing DEN'), + ]), ]) ) -- cgit