aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-12-20 07:46:09 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-12-20 07:46:09 +0800
commit9c8345467c871b29193263a13e8e8d3ebb47c7fb (patch)
tree0877916db7258af29ea948607bab79648ed1e4c6
parent92ddcba76bbfdddc440298e70cbff2229495aee5 (diff)
downloadtangerine-wallet-browser-9c8345467c871b29193263a13e8e8d3ebb47c7fb.tar
tangerine-wallet-browser-9c8345467c871b29193263a13e8e8d3ebb47c7fb.tar.gz
tangerine-wallet-browser-9c8345467c871b29193263a13e8e8d3ebb47c7fb.tar.bz2
tangerine-wallet-browser-9c8345467c871b29193263a13e8e8d3ebb47c7fb.tar.lz
tangerine-wallet-browser-9c8345467c871b29193263a13e8e8d3ebb47c7fb.tar.xz
tangerine-wallet-browser-9c8345467c871b29193263a13e8e8d3ebb47c7fb.tar.zst
tangerine-wallet-browser-9c8345467c871b29193263a13e8e8d3ebb47c7fb.zip
Modify actions to support better transition.
-rw-r--r--ui/app/actions.js8
-rw-r--r--ui/app/reducers/app.js9
-rw-r--r--ui/app/unlock.js2
3 files changed, 18 insertions, 1 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 7c928a454..61f15b6cc 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -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,
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index c69f0bae0..fb6767233 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -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,
diff --git a/ui/app/unlock.js b/ui/app/unlock.js
index d4603e9c3..19f5eaec2 100644
--- a/ui/app/unlock.js
+++ b/ui/app/unlock.js
@@ -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)',