aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/account-detail.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-04-26 03:20:33 +0800
committerDan Finlay <dan@danfinlay.com>2016-04-26 03:38:43 +0800
commit2dd7bd6bd0d026da339c1e55d52270674be13f3d (patch)
treebb4b6df2be4720905db8960c3c6e4e40694eb7b9 /ui/app/account-detail.js
parent652c1d96c1a80864218fa4dadf7aa0f4102a583b (diff)
downloadtangerine-wallet-browser-2dd7bd6bd0d026da339c1e55d52270674be13f3d.tar
tangerine-wallet-browser-2dd7bd6bd0d026da339c1e55d52270674be13f3d.tar.gz
tangerine-wallet-browser-2dd7bd6bd0d026da339c1e55d52270674be13f3d.tar.bz2
tangerine-wallet-browser-2dd7bd6bd0d026da339c1e55d52270674be13f3d.tar.lz
tangerine-wallet-browser-2dd7bd6bd0d026da339c1e55d52270674be13f3d.tar.xz
tangerine-wallet-browser-2dd7bd6bd0d026da339c1e55d52270674be13f3d.tar.zst
tangerine-wallet-browser-2dd7bd6bd0d026da339c1e55d52270674be13f3d.zip
Make account detail view the primary view
- When unlocking, the first account is now selected by default and displayed as the main view. - There is now a "CHANGE ACCT" button on the detail view to show the accounts list. - Clicking an account from the accounts list now navigates to the detail view and selects that account. - Config/Info screen "back" buttons now fire a new action, `GO_HOME`, which is configured to navigate to the accountDetail view, putting that logic in one place. - When locking and unlocking again, the first account is always displayed, eventually we should persist the selection.
Diffstat (limited to 'ui/app/account-detail.js')
-rw-r--r--ui/app/account-detail.js56
1 files changed, 29 insertions, 27 deletions
diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js
index 025644efe..57f932a2b 100644
--- a/ui/app/account-detail.js
+++ b/ui/app/account-detail.js
@@ -10,12 +10,11 @@ const transactionList = require('./components/transaction-list')
module.exports = connect(mapStateToProps)(AccountDetailScreen)
function mapStateToProps(state) {
- var accountDetail = state.appState.accountDetail
return {
identities: state.metamask.identities,
accounts: state.metamask.accounts,
address: state.appState.currentView.context,
- accountDetail: accountDetail,
+ accountDetail: state.appState.accountDetail,
transactions: state.metamask.transactions,
networkVersion: state.networkVersion,
}
@@ -26,7 +25,6 @@ function AccountDetailScreen() {
Component.call(this)
}
-
AccountDetailScreen.prototype.render = function() {
var state = this.props
var identity = state.identities[state.address]
@@ -40,9 +38,6 @@ AccountDetailScreen.prototype.render = function() {
// subtitle and nav
h('.section-title.flex-row.flex-center', [
- h('i.fa.fa-arrow-left.fa-lg.cursor-pointer', {
- onClick: this.navigateToAccounts.bind(this),
- }),
h('h2.page-subtitle', 'Account Detail'),
]),
@@ -51,28 +46,35 @@ AccountDetailScreen.prototype.render = function() {
showFullAddress: true,
identity: identity,
account: account,
+ }, []),
+
+ h('div', {
+ style: {
+ display: 'flex',
+ }
}, [
- h('.flex-row.flex-space-around', [
- // h('button', 'GET ETH'), DISABLED UNTIL WORKING
-
- h('button', {
- onClick: () => {
- copyToClipboard(identity.address)
- },
- }, 'COPY ADDR'),
-
- h('button', {
- onClick: () => {
- this.props.dispatch(actions.showSendPage())
- },
- }, 'SEND'),
-
- h('button', {
- onClick: () => {
- this.requestAccountExport(identity.address)
- },
- }, 'EXPORT'),
- ]),
+
+ h('button', {
+ onClick: this.navigateToAccounts.bind(this),
+ }, 'CHANGE ACCT'),
+
+ h('button', {
+ onClick: () => {
+ copyToClipboard(identity.address)
+ },
+ }, 'COPY ADDR'),
+
+ h('button', {
+ onClick: () => {
+ this.props.dispatch(actions.showSendPage())
+ },
+ }, 'SEND'),
+
+ h('button', {
+ onClick: () => {
+ this.requestAccountExport(identity.address)
+ },
+ }, 'EXPORT'),
]),
transactionList(transactions