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:
parent
92ddcba76b
commit
9c8345467c
@ -19,6 +19,8 @@ var actions = {
|
|||||||
CREATE_NEW_VAULT_IN_PROGRESS: 'CREATE_NEW_VAULT_IN_PROGRESS',
|
CREATE_NEW_VAULT_IN_PROGRESS: 'CREATE_NEW_VAULT_IN_PROGRESS',
|
||||||
SHOW_CREATE_VAULT: 'SHOW_CREATE_VAULT',
|
SHOW_CREATE_VAULT: 'SHOW_CREATE_VAULT',
|
||||||
SHOW_RESTORE_VAULT: 'SHOW_RESTORE_VAULT',
|
SHOW_RESTORE_VAULT: 'SHOW_RESTORE_VAULT',
|
||||||
|
FORGOT_PASSWORD: 'FORGOT_PASSWORD',
|
||||||
|
forgotPassword: forgotPassword,
|
||||||
SHOW_INIT_MENU: 'SHOW_INIT_MENU',
|
SHOW_INIT_MENU: 'SHOW_INIT_MENU',
|
||||||
SHOW_NEW_VAULT_SEED: 'SHOW_NEW_VAULT_SEED',
|
SHOW_NEW_VAULT_SEED: 'SHOW_NEW_VAULT_SEED',
|
||||||
SHOW_INFO_PAGE: 'SHOW_INFO_PAGE',
|
SHOW_INFO_PAGE: 'SHOW_INFO_PAGE',
|
||||||
@ -380,6 +382,12 @@ function showRestoreVault () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function forgotPassword () {
|
||||||
|
return {
|
||||||
|
type: actions.FORGOT_PASSWORD,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function showInitializeMenu () {
|
function showInitializeMenu () {
|
||||||
return {
|
return {
|
||||||
type: actions.SHOW_INIT_MENU,
|
type: actions.SHOW_INIT_MENU,
|
||||||
|
@ -75,6 +75,15 @@ function reduceApp (state, action) {
|
|||||||
forgottenPassword: true,
|
forgottenPassword: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
case actions.FORGOT_PASSWORD:
|
||||||
|
return extend(appState, {
|
||||||
|
currentView: {
|
||||||
|
name: 'restoreVault',
|
||||||
|
},
|
||||||
|
transForward: false,
|
||||||
|
forgottenPassword: true,
|
||||||
|
})
|
||||||
|
|
||||||
case actions.SHOW_INIT_MENU:
|
case actions.SHOW_INIT_MENU:
|
||||||
return extend(appState, {
|
return extend(appState, {
|
||||||
currentView: defaultView,
|
currentView: defaultView,
|
||||||
|
@ -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.showRestoreVault()),
|
onClick: () => this.props.dispatch(actions.forgotPassword()),
|
||||||
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