From 4ebb9f631e9a1487a58ccd2f1ff6776eb9a73466 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 23 Jun 2016 14:39:50 -0700 Subject: Moved account change button to menu bar --- ui/app/account-detail.js | 21 +-------------------- ui/app/app.js | 47 +++++++++++++++++++++++++++++++++++------------ 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js index f0d359106..276824459 100644 --- a/ui/app/account-detail.js +++ b/ui/app/account-detail.js @@ -53,20 +53,12 @@ AccountDetailScreen.prototype.render = function () { }, [ // header - identicon + nav - h('.flex-row.flex-space-between', { + h('.flex-row.flex-center', { style: { marginTop: 28, }, }, [ - // invisible placeholder for later - h('i.fa.fa-users.fa-lg.color-orange', { - style: { - width: '30px', - visibility: 'hidden', - }, - }), - // large identicon h('.identicon-wrapper.flex-column.flex-center.select-none', [ h(Identicon, { @@ -74,12 +66,6 @@ AccountDetailScreen.prototype.render = function () { address: selected, }), ]), - - // small accounts nav - h('img.cursor-pointer.color-orange', { - src: 'images/switch_acc.svg', - onClick: this.navigateToAccounts.bind(this), - }), ]), h('.flex-center', { @@ -218,11 +204,6 @@ AccountDetailScreen.prototype.transactionList = function () { }) } -AccountDetailScreen.prototype.navigateToAccounts = function (event) { - event.stopPropagation() - this.props.dispatch(actions.showAccountsPage()) -} - AccountDetailScreen.prototype.requestAccountExport = function () { this.props.dispatch(actions.requestExportAccount()) } diff --git a/ui/app/app.js b/ui/app/app.js index 7204fb098..7493a3a73 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -120,19 +120,42 @@ App.prototype.renderAppBar = function () { // metamask name h('h1', 'MetaMask'), - // hamburger - h(SandwichExpando, { - width: 16, - barHeight: 2, - padding: 0, - isOpen: props.menuOpen, - color: 'rgb(247,146,30)', - onClick: (event) => { - event.preventDefault() - event.stopPropagation() - this.props.dispatch(actions.toggleMenu()) + + h('div', { + style: { + display: 'flex', + flexDirection: 'row', + alignItems: 'center', }, - }), + }, [ + + // small accounts nav + h('img.cursor-pointer.color-orange', { + src: 'images/switch_acc.svg', + style: { + width: '23.5px', + marginRight: '8px', + }, + onClick: (event) => { + event.stopPropagation() + this.props.dispatch(actions.showAccountsPage()) + }, + }), + + // hamburger + h(SandwichExpando, { + width: 16, + barHeight: 2, + padding: 0, + isOpen: props.menuOpen, + color: 'rgb(247,146,30)', + onClick: (event) => { + event.preventDefault() + event.stopPropagation() + this.props.dispatch(actions.toggleMenu()) + }, + }), + ]), ]), ]) ) -- cgit