diff options
author | kumavis <kumavis@users.noreply.github.com> | 2016-06-24 05:59:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-24 05:59:41 +0800 |
commit | 2a358d73f8da6600b6f1b279454d756ddabdd36b (patch) | |
tree | eef69b9fb3032095333bdd158f0e966521ddfb5d | |
parent | 216e7235dd590bffacb0778e387030e9bd0d90bc (diff) | |
parent | a106887a6f2c6e63a6fdfd54b7bac1699d4e3fd7 (diff) | |
download | tangerine-wallet-browser-2a358d73f8da6600b6f1b279454d756ddabdd36b.tar tangerine-wallet-browser-2a358d73f8da6600b6f1b279454d756ddabdd36b.tar.gz tangerine-wallet-browser-2a358d73f8da6600b6f1b279454d756ddabdd36b.tar.bz2 tangerine-wallet-browser-2a358d73f8da6600b6f1b279454d756ddabdd36b.tar.lz tangerine-wallet-browser-2a358d73f8da6600b6f1b279454d756ddabdd36b.tar.xz tangerine-wallet-browser-2a358d73f8da6600b6f1b279454d756ddabdd36b.tar.zst tangerine-wallet-browser-2a358d73f8da6600b6f1b279454d756ddabdd36b.zip |
Merge pull request #315 from MetaMask/UpdatedMenuBar
Updated menu bar
-rw-r--r-- | ui/app/account-detail.js | 21 | ||||
-rw-r--r-- | ui/app/app.js | 84 |
2 files changed, 65 insertions, 40 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..a07118ddb 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -109,30 +109,74 @@ App.prototype.renderAppBar = function () { }, }, props.isUnlocked && [ - h(NetworkIndicator, { - network: this.props.network, - onClick: (event) => { - event.preventDefault() - event.stopPropagation() - this.setState({ isNetworkMenuOpen: !isNetworkMenuOpen }) + h('div', { + style: { + display: 'flex', + flexDirection: 'row', + alignItems: 'center', }, - }), + }, [ + + // mini logo + h('img', { + height: 24, + width: 24, + src: '/images/icon-128.png', + }), + + h(NetworkIndicator, { + network: this.props.network, + onClick: (event) => { + event.preventDefault() + event.stopPropagation() + this.setState({ isNetworkMenuOpen: !isNetworkMenuOpen }) + }, + }), + ]), // 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('h1', { + style: { + position: 'relative', + left: '3px', + }, + }, 'MetaMask'), + + 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()) + }, + }), + ]), ]), ]) ) |