aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/reducers
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-05-05 09:08:31 +0800
committerDan Finlay <dan@danfinlay.com>2016-05-05 09:08:31 +0800
commitf4d58ebc705287788c9eaee6025269dd78b051a1 (patch)
treeca3c94a812562ed6262a3691ac04d80d05bf53b2 /ui/app/reducers
parent95582f8bde3abda5b6b7cf0e027bc7913e5953ce (diff)
downloadtangerine-wallet-browser-f4d58ebc705287788c9eaee6025269dd78b051a1.tar.gz
tangerine-wallet-browser-f4d58ebc705287788c9eaee6025269dd78b051a1.tar.zst
tangerine-wallet-browser-f4d58ebc705287788c9eaee6025269dd78b051a1.zip
Move account export to subview
Account detail view now has an animated transitioning `subview` section that allows us to show extra details within it. Clicking `export` now slide replaces the transaction list with the export UI. Added cancel/done/submit buttons to the Export UI. Done submits like Enter did, the other two transition back to the transaction list. For some reason when first unlocking, the selected account is being instantly replaced with the accounts list, so I need to fix that before merging this into master.
Diffstat (limited to 'ui/app/reducers')
-rw-r--r--ui/app/reducers/app.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index 14f92a8c5..35ddf6759 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -23,6 +23,9 @@ function reduceApp(state, action) {
var appState = extend({
currentView: seedWords ? seedConfView : defaultView,
+ accountDetail: {
+ subview: 'transactions',
+ },
currentDomain: 'example.com',
transForward: true, // Used to render transition direction
isLoading: false, // Used to display loading indicator
@@ -131,6 +134,7 @@ function reduceApp(state, action) {
return extend(appState, {
currentView: {},
accountDetail: {
+ subview: 'transactions',
accountExport: 'none',
privateKey: '',
},
@@ -144,6 +148,7 @@ function reduceApp(state, action) {
context: action.value || account,
},
accountDetail: {
+ subview: 'transactions',
accountExport: 'none',
privateKey: '',
},
@@ -157,6 +162,7 @@ function reduceApp(state, action) {
context: action.value,
},
accountDetail: {
+ subview: 'transactions',
accountExport: 'none',
privateKey: '',
},
@@ -218,6 +224,9 @@ function reduceApp(state, action) {
name: 'accountDetail',
context: state.metamask.selectedAddress,
},
+ accountDetail: {
+ subview: 'transactions',
+ },
})
}
@@ -285,7 +294,13 @@ function reduceApp(state, action) {
case actions.REQUEST_ACCOUNT_EXPORT:
return extend(appState, {
+ transForward: true,
+ currentView: {
+ name: 'accountDetail',
+ context: appState.currentView.context,
+ },
accountDetail: {
+ subview: 'export',
accountExport: 'requested',
},
})
@@ -293,6 +308,7 @@ function reduceApp(state, action) {
case actions.EXPORT_ACCOUNT:
return extend(appState, {
accountDetail: {
+ subview: 'export',
accountExport: 'completed',
},
})
@@ -300,6 +316,7 @@ function reduceApp(state, action) {
case actions.SHOW_PRIVATE_KEY:
return extend(appState, {
accountDetail: {
+ subview: 'export',
accountExport: 'completed',
privateKey: action.value,
},