diff options
author | kumavis <kumavis@users.noreply.github.com> | 2016-04-26 05:34:43 +0800 |
---|---|---|
committer | kumavis <kumavis@users.noreply.github.com> | 2016-04-26 05:34:43 +0800 |
commit | 7497b2c8135324382af019d8705c688d71064edc (patch) | |
tree | b032651204c21562a2431f3d3121f9ac81fe4c86 /ui/app/reducers/app.js | |
parent | 652c1d96c1a80864218fa4dadf7aa0f4102a583b (diff) | |
parent | 82ac8bde5d246b58e90a7e428ee685cf1ee7c351 (diff) | |
download | tangerine-wallet-browser-7497b2c8135324382af019d8705c688d71064edc.tar tangerine-wallet-browser-7497b2c8135324382af019d8705c688d71064edc.tar.gz tangerine-wallet-browser-7497b2c8135324382af019d8705c688d71064edc.tar.bz2 tangerine-wallet-browser-7497b2c8135324382af019d8705c688d71064edc.tar.lz tangerine-wallet-browser-7497b2c8135324382af019d8705c688d71064edc.tar.xz tangerine-wallet-browser-7497b2c8135324382af019d8705c688d71064edc.tar.zst tangerine-wallet-browser-7497b2c8135324382af019d8705c688d71064edc.zip |
Merge pull request #142 from MetaMask/DetailViewFirst
Make account detail view into main view
Diffstat (limited to 'ui/app/reducers/app.js')
-rw-r--r-- | ui/app/reducers/app.js | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 582583185..f522e6042 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -1,5 +1,6 @@ const extend = require('xtend') const actions = require('../actions') +const valuesFor = require('../util').valuesFor module.exports = reduceApp @@ -7,8 +8,9 @@ function reduceApp(state, action) { // clone and defaults var defaultView = { - name: 'accounts', + name: 'accountDetail', detailView: null, + context: state.metamask.selectedAccount, } // confirm seed words @@ -56,6 +58,7 @@ function reduceApp(state, action) { return extend(appState, { currentView: { name: 'config', + context: appState.currentView.context, }, transForward: true, }) @@ -64,6 +67,7 @@ function reduceApp(state, action) { return extend(appState, { currentView: { name: 'info', + context: appState.currentView.context, }, transForward: true, }) @@ -120,11 +124,24 @@ function reduceApp(state, action) { activeAddress: action.value, }) + case actions.GO_HOME: + return extend(appState, { + currentView: { + name: 'accountDetail', + context: appState.currentView.context, + }, + accountDetail: { + accountExport: 'none', + privateKey: '', + }, + transForward: false, + }) + case actions.SHOW_ACCOUNT_DETAIL: return extend(appState, { currentView: { name: 'accountDetail', - context: action.value, + context: action.value || account, }, accountDetail: { accountExport: 'none', |