diff options
Diffstat (limited to 'ui/app/reducers/app.js')
-rw-r--r-- | ui/app/reducers/app.js | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 309351956..a29a8f79c 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -22,6 +22,7 @@ function reduceApp(state, action) { var seedWords = state.metamask.seedWords var appState = extend({ + menuOpen: false, currentView: seedWords ? seedConfView : defaultView, accountDetail: { subview: 'transactions', @@ -34,6 +35,16 @@ function reduceApp(state, action) { switch (action.type) { + case actions.TOGGLE_MENU: + return extend(appState, { + menuOpen: !appState.menuOpen, + }) + + case actions.SET_MENU_STATE: + return extend(appState, { + menuOpen: action.value, + }) + // intialize case actions.SHOW_CREATE_VAULT: @@ -154,7 +165,7 @@ function reduceApp(state, action) { accountExport: 'none', privateKey: '', }, - transForward: true, + transForward: false, }) case actions.BACK_TO_ACCOUNT_DETAIL: @@ -177,9 +188,15 @@ function reduceApp(state, action) { currentView: { name: seedWords ? 'createVaultComplete' : 'accounts', }, - transForward: appState.currentView.name == 'locked', + transForward: true, isLoading: false, warning: null, + scrollToBottom: false, + }) + + case actions.REVEAL_ACCOUNT: + return extend(appState, { + scrollToBottom: true, }) case actions.SHOW_CONF_TX_PAGE: @@ -278,10 +295,13 @@ function reduceApp(state, action) { case actions.CLEAR_SEED_WORD_CACHE: return extend(appState, { transForward: true, - currentView: { - name: 'accounts', - }, + currentView: {}, isLoading: false, + accountDetail: { + subview: 'transactions', + accountExport: 'none', + privateKey: '', + }, }) case actions.DISPLAY_WARNING: |