1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Moved account change button to menu bar

This commit is contained in:
Dan Finlay 2016-06-23 14:39:50 -07:00
parent 216e7235dd
commit 4ebb9f631e
2 changed files with 36 additions and 32 deletions

View File

@ -53,20 +53,12 @@ AccountDetailScreen.prototype.render = function () {
}, [ }, [
// header - identicon + nav // header - identicon + nav
h('.flex-row.flex-space-between', { h('.flex-row.flex-center', {
style: { style: {
marginTop: 28, marginTop: 28,
}, },
}, [ }, [
// invisible placeholder for later
h('i.fa.fa-users.fa-lg.color-orange', {
style: {
width: '30px',
visibility: 'hidden',
},
}),
// large identicon // large identicon
h('.identicon-wrapper.flex-column.flex-center.select-none', [ h('.identicon-wrapper.flex-column.flex-center.select-none', [
h(Identicon, { h(Identicon, {
@ -74,12 +66,6 @@ AccountDetailScreen.prototype.render = function () {
address: selected, address: selected,
}), }),
]), ]),
// small accounts nav
h('img.cursor-pointer.color-orange', {
src: 'images/switch_acc.svg',
onClick: this.navigateToAccounts.bind(this),
}),
]), ]),
h('.flex-center', { 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 () { AccountDetailScreen.prototype.requestAccountExport = function () {
this.props.dispatch(actions.requestExportAccount()) this.props.dispatch(actions.requestExportAccount())
} }

View File

@ -120,19 +120,42 @@ App.prototype.renderAppBar = function () {
// metamask name // metamask name
h('h1', 'MetaMask'), h('h1', 'MetaMask'),
// hamburger
h(SandwichExpando, { h('div', {
width: 16, style: {
barHeight: 2, display: 'flex',
padding: 0, flexDirection: 'row',
isOpen: props.menuOpen, alignItems: 'center',
color: 'rgb(247,146,30)',
onClick: (event) => {
event.preventDefault()
event.stopPropagation()
this.props.dispatch(actions.toggleMenu())
}, },
}), }, [
// 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())
},
}),
]),
]), ]),
]) ])
) )