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
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())
}

View File

@ -120,6 +120,28 @@ App.prototype.renderAppBar = function () {
// metamask name
h('h1', '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,
@ -134,6 +156,7 @@ App.prototype.renderAppBar = function () {
},
}),
]),
]),
])
)
}