From 483a7fee0a815812ef43601f64083ed26825d0a4 Mon Sep 17 00:00:00 2001 From: Frankie Date: Tue, 23 Aug 2016 17:17:08 -0700 Subject: Add a back button on lock screen to go back to init menu --- ui/app/reducers/app.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'ui/app/reducers/app.js') diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 8c2696877..f982cc0c8 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -123,6 +123,7 @@ function reduceApp (state, action) { case actions.UNLOCK_METAMASK: return extend(appState, { + forgottenPassword: appState.forgottenPassword ? !appState.forgottenPassword : null, detailView: {}, transForward: true, isLoading: false, @@ -136,6 +137,25 @@ function reduceApp (state, action) { warning: null, }) + case actions.BACK_TO_INIT_MENU: + return extend(appState, { + warning: null, + transForward: false, + forgottenPassword: true, + currentView: { + name: 'InitMenu', + }, + }) + + case actions.BACK_TO_UNLOCK_VIEW: + return extend(appState, { + warning: null, + transForward: true, + forgottenPassword: !appState.forgottenPassword, + currentView: { + name: 'UnlockScreen', + }, + }) // reveal seed words case actions.REVEAL_SEED_CONFIRMATION: @@ -170,6 +190,7 @@ function reduceApp (state, action) { case actions.SHOW_ACCOUNT_DETAIL: return extend(appState, { + forgottenPassword: appState.forgottenPassword ? !appState.forgottenPassword : null, currentView: { name: 'accountDetail', context: action.value, -- cgit