1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Modify actions to support better transition.

This commit is contained in:
Kevin Serrano 2016-12-19 15:46:09 -08:00
parent 92ddcba76b
commit 9c8345467c
No known key found for this signature in database
GPG Key ID: 7CC862A58D2889B4
3 changed files with 18 additions and 1 deletions

View File

@ -19,6 +19,8 @@ var actions = {
CREATE_NEW_VAULT_IN_PROGRESS: 'CREATE_NEW_VAULT_IN_PROGRESS',
SHOW_CREATE_VAULT: 'SHOW_CREATE_VAULT',
SHOW_RESTORE_VAULT: 'SHOW_RESTORE_VAULT',
FORGOT_PASSWORD: 'FORGOT_PASSWORD',
forgotPassword: forgotPassword,
SHOW_INIT_MENU: 'SHOW_INIT_MENU',
SHOW_NEW_VAULT_SEED: 'SHOW_NEW_VAULT_SEED',
SHOW_INFO_PAGE: 'SHOW_INFO_PAGE',
@ -380,6 +382,12 @@ function showRestoreVault () {
}
}
function forgotPassword () {
return {
type: actions.FORGOT_PASSWORD,
}
}
function showInitializeMenu () {
return {
type: actions.SHOW_INIT_MENU,

View File

@ -75,6 +75,15 @@ function reduceApp (state, action) {
forgottenPassword: true,
})
case actions.FORGOT_PASSWORD:
return extend(appState, {
currentView: {
name: 'restoreVault',
},
transForward: false,
forgottenPassword: true,
})
case actions.SHOW_INIT_MENU:
return extend(appState, {
currentView: defaultView,

View File

@ -70,7 +70,7 @@ UnlockScreen.prototype.render = function () {
h('.flex-row.flex-center.flex-grow', [
h('p.pointer', {
onClick: () => this.props.dispatch(actions.showRestoreVault()),
onClick: () => this.props.dispatch(actions.forgotPassword()),
style: {
fontSize: '0.8em',
color: 'rgb(247, 134, 28)',