mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Redirect to seed word screen for forgotten passwords.
This commit is contained in:
parent
1b6ee56cac
commit
20c043a4c2
@ -21,7 +21,6 @@ function mapStateToProps (state) {
|
|||||||
// state from plugin
|
// state from plugin
|
||||||
currentView: state.appState.currentView,
|
currentView: state.appState.currentView,
|
||||||
warning: state.appState.warning,
|
warning: state.appState.warning,
|
||||||
forgottenPassword: state.metamask.isInitialized,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,17 +117,6 @@ InitializeMenuScreen.prototype.renderMenu = function (state) {
|
|||||||
},
|
},
|
||||||
}, 'Create'),
|
}, 'Create'),
|
||||||
|
|
||||||
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',
|
|
||||||
},
|
|
||||||
}, 'Return to Login'),
|
|
||||||
]) : null,
|
|
||||||
|
|
||||||
h('.flex-row.flex-center.flex-grow', [
|
h('.flex-row.flex-center.flex-grow', [
|
||||||
h('p.pointer', {
|
h('p.pointer', {
|
||||||
onClick: this.showRestoreVault.bind(this),
|
onClick: this.showRestoreVault.bind(this),
|
||||||
@ -159,10 +147,6 @@ InitializeMenuScreen.prototype.showRestoreVault = function () {
|
|||||||
this.props.dispatch(actions.showRestoreVault())
|
this.props.dispatch(actions.showRestoreVault())
|
||||||
}
|
}
|
||||||
|
|
||||||
InitializeMenuScreen.prototype.backToUnlockView = function () {
|
|
||||||
this.props.dispatch(actions.backToUnlockView())
|
|
||||||
}
|
|
||||||
|
|
||||||
InitializeMenuScreen.prototype.createNewVaultAndKeychain = function () {
|
InitializeMenuScreen.prototype.createNewVaultAndKeychain = function () {
|
||||||
var passwordBox = document.getElementById('password-box')
|
var passwordBox = document.getElementById('password-box')
|
||||||
var password = passwordBox.value
|
var password = passwordBox.value
|
||||||
|
@ -14,6 +14,7 @@ function RestoreVaultScreen () {
|
|||||||
function mapStateToProps (state) {
|
function mapStateToProps (state) {
|
||||||
return {
|
return {
|
||||||
warning: state.appState.warning,
|
warning: state.appState.warning,
|
||||||
|
forgottenPassword: state.appState.forgottenPassword,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,14 +101,17 @@ RestoreVaultScreen.prototype.render = function () {
|
|||||||
}, 'OK'),
|
}, 'OK'),
|
||||||
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
RestoreVaultScreen.prototype.showInitializeMenu = function () {
|
RestoreVaultScreen.prototype.showInitializeMenu = function () {
|
||||||
this.props.dispatch(actions.showInitializeMenu())
|
if (this.props.forgottenPassword) {
|
||||||
|
this.props.dispatch(actions.backToUnlockView())
|
||||||
|
} else {
|
||||||
|
this.props.dispatch(actions.showInitializeMenu())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RestoreVaultScreen.prototype.createOnEnter = function (event) {
|
RestoreVaultScreen.prototype.createOnEnter = function (event) {
|
||||||
|
@ -72,6 +72,7 @@ function reduceApp (state, action) {
|
|||||||
name: 'restoreVault',
|
name: 'restoreVault',
|
||||||
},
|
},
|
||||||
transForward: true,
|
transForward: true,
|
||||||
|
forgottenPassword: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
case actions.SHOW_INIT_MENU:
|
case actions.SHOW_INIT_MENU:
|
||||||
@ -169,7 +170,7 @@ function reduceApp (state, action) {
|
|||||||
return extend(appState, {
|
return extend(appState, {
|
||||||
warning: null,
|
warning: null,
|
||||||
transForward: true,
|
transForward: true,
|
||||||
forgottenPassword: !appState.forgottenPassword,
|
forgottenPassword: false,
|
||||||
currentView: {
|
currentView: {
|
||||||
name: 'UnlockScreen',
|
name: 'UnlockScreen',
|
||||||
},
|
},
|
||||||
|
@ -70,7 +70,7 @@ UnlockScreen.prototype.render = function () {
|
|||||||
|
|
||||||
h('.flex-row.flex-center.flex-grow', [
|
h('.flex-row.flex-center.flex-grow', [
|
||||||
h('p.pointer', {
|
h('p.pointer', {
|
||||||
onClick: () => this.props.dispatch(actions.goBackToInitView()),
|
onClick: () => this.props.dispatch(actions.showRestoreVault()),
|
||||||
style: {
|
style: {
|
||||||
fontSize: '0.8em',
|
fontSize: '0.8em',
|
||||||
color: 'rgb(247, 134, 28)',
|
color: 'rgb(247, 134, 28)',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user