From 81f62a7443d47461b5f9b20f442392562458c79a Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Fri, 13 Oct 2017 02:10:58 -0400 Subject: Adding Account Dropdown V2 --- ui/app/components/account-menu/index.js | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 ui/app/components/account-menu/index.js (limited to 'ui/app/components/account-menu') diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js new file mode 100644 index 000000000..7dc3d10a5 --- /dev/null +++ b/ui/app/components/account-menu/index.js @@ -0,0 +1,56 @@ +const inherits = require('util').inherits +const Component = require('react').Component +const connect = require('react-redux').connect +const h = require('react-hyperscript') +const actions = require('../../actions') +const { Menu, Item, Divider } = require('../dropdowns/components/menu') + +module.exports = connect(mapStateToProps, mapDispatchToProps)(AccountMenu) + +inherits(AccountMenu, Component) +function AccountMenu () { Component.call(this) } + +function mapStateToProps (state) { + return { + selectedAddress: state.metamask.selectedAddress, + } +} + +function mapDispatchToProps () { + return {} +} + +AccountMenu.prototype.render = function () { + return h(Menu, { className: 'account-menu' }, [ + h(Item, { className: 'account-menu__header' }, [ + 'My Accounts', + h('button.account-menu__logout-button', 'Log out'), + ]), + h(Divider), + h(Item, { text: 'hi' }), + h(Divider), + h(Item, { + onClick: true, + icon: h('img', { src: 'images/plus-btn-white.svg' }), + text: 'Create Account', + }), + h(Item, { + onClick: true, + icon: h('img', { src: 'images/import-account.svg' }), + text: 'Import Account', + }), + h(Divider), + h(Item, { + onClick: true, + icon: h('img', { src: 'images/mm-info-icon.svg' }), + text: 'Info & Help', + }), + h(Item, { + onClick: true, + icon: h('img', { src: 'images/settings.svg' }), + text: 'Settings', + }), + ]) +} + + -- cgit From 5ee6e4d3b3d61d804340c22b73a608fb6b44a9b2 Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Mon, 16 Oct 2017 01:28:25 -0400 Subject: wip --- ui/app/components/account-menu/index.js | 110 ++++++++++++++++++++++++++++++-- 1 file changed, 105 insertions(+), 5 deletions(-) (limited to 'ui/app/components/account-menu') diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index 7dc3d10a5..3b1118271 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -3,7 +3,9 @@ const Component = require('react').Component const connect = require('react-redux').connect const h = require('react-hyperscript') const actions = require('../../actions') -const { Menu, Item, Divider } = require('../dropdowns/components/menu') +const { Menu, Item, Divider, CloseArea } = require('../dropdowns/components/menu') +const Identicon = require('../identicon') +const { formatBalance } = require('../../util') module.exports = connect(mapStateToProps, mapDispatchToProps)(AccountMenu) @@ -13,21 +15,33 @@ function AccountMenu () { Component.call(this) } function mapStateToProps (state) { return { selectedAddress: state.metamask.selectedAddress, + isAccountMenuOpen: state.metamask.isAccountMenuOpen, + keyrings: state.metamask.keyrings, + identities: state.metamask.identities, + accounts: state.metamask.accounts, + } } -function mapDispatchToProps () { - return {} +// identities, accounts, selected, menuItemStyles, actions, keyrings + +function mapDispatchToProps (dispatch) { + return { + toggleAccountMenu: () => dispatch(actions.toggleAccountMenu()), + } } AccountMenu.prototype.render = function () { - return h(Menu, { className: 'account-menu' }, [ + const { isAccountMenuOpen, toggleAccountMenu } = this.props + + return h(Menu, { className: 'account-menu', isShowing: isAccountMenuOpen }, [ + h(CloseArea, { onClick: toggleAccountMenu }), h(Item, { className: 'account-menu__header' }, [ 'My Accounts', h('button.account-menu__logout-button', 'Log out'), ]), h(Divider), - h(Item, { text: 'hi' }), + h('div.account-menu__accounts', this.renderAccounts()), h(Divider), h(Item, { onClick: true, @@ -53,4 +67,90 @@ AccountMenu.prototype.render = function () { ]) } +AccountMenu.prototype.renderAccounts = function () { + const { identities, accounts, selected, actions, keyrings } = this.props + + return Object.keys(identities).map((key, index) => { + const identity = identities[key] + const isSelected = identity.address === selected + + const balanceValue = accounts[key].balance + const formattedBalance = balanceValue ? formatBalance(balanceValue, 6) : '...' + const simpleAddress = identity.address.substring(2).toLowerCase() + + const keyring = keyrings.find((kr) => { + return kr.accounts.includes(simpleAddress) || + kr.accounts.includes(identity.address) + }) + + return h( + 'div.account-menu__account', + { + onClick: () => { + this.props.actions.showAccountDetail(identity.address) + }, + }, + [ + h('div.account-menu__check-mark', [ + isSelected ? h('i.fa.fa-check') : null, + ]), + h( + Identicon, + { + address: identity.address, + diameter: 24, + }, + ), + + h('div.account-menu__account-info', [ + + this.indicateIfLoose(keyring), + + h('div.account-menu__name', { + style: { + fontSize: '18px', + maxWidth: '145px', + whiteSpace: 'nowrap', + overflow: 'hidden', + textOverflow: 'ellipsis', + }, + }, identity.name || ''), + + h('div.account-menu__balance', formattedBalance), + ]), + + h('div.account-menu__action', { + onClick: () => { + actions.showEditAccountModal(identity) + }, + }, 'Edit'), + +// ======= +// }, +// ), +// this.indicateIfLoose(keyring), +// h('span', { +// style: { +// marginLeft: '20px', +// fontSize: '24px', +// maxWidth: '145px', +// whiteSpace: 'nowrap', +// overflow: 'hidden', +// textOverflow: 'ellipsis', +// }, +// }, identity.name || ''), +// h('span', { style: { marginLeft: '20px', fontSize: '24px' } }, isSelected ? h('.check', '✓') : null), +// >>>>>>> master:ui/app/components/account-dropdowns.js + ], + ) + }) +} + +AccountMenu.prototype.indicateIfLoose = function (keyring) { + try { // Sometimes keyrings aren't loaded yet: + const type = keyring.type + const isLoose = type !== 'HD Key Tree' + return isLoose ? h('.keyring-label', 'LOOSE') : null + } catch (e) { return } +} -- cgit From 085551b7e6b7dab21c21b99a40c4f79c413799d5 Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Tue, 17 Oct 2017 22:36:53 -0700 Subject: New Account modal --- ui/app/components/account-menu/index.js | 100 ++++++++++++++++---------------- 1 file changed, 49 insertions(+), 51 deletions(-) (limited to 'ui/app/components/account-menu') diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index 3b1118271..2ebdba24a 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -23,20 +23,50 @@ function mapStateToProps (state) { } } -// identities, accounts, selected, menuItemStyles, actions, keyrings - function mapDispatchToProps (dispatch) { return { toggleAccountMenu: () => dispatch(actions.toggleAccountMenu()), + showAccountDetail: address => { + dispatch(actions.showAccountDetail(address)) + dispatch(actions.toggleAccountMenu()) + }, + lockMetamask: () => { + dispatch(actions.lockMetamask()) + dispatch(actions.toggleAccountMenu()) + }, + showConfigPage: () => { + console.log('hihihih') + dispatch(actions.showConfigPage()) + dispatch(actions.toggleAccountMenu()) + }, + showNewAccountModal: () => { + dispatch(actions.showModal({ name: 'NEW_ACCOUNT' })) + dispatch(actions.toggleAccountMenu()) + }, + showImportPage: () => { + dispatch(actions.showImportPage()) + dispatch(actions.toggleAccountMenu()) + }, } } AccountMenu.prototype.render = function () { - const { isAccountMenuOpen, toggleAccountMenu } = this.props - + const { + isAccountMenuOpen, + toggleAccountMenu, + showNewAccountModal, + showImportPage, + lockMetamask, + showConfigPage, + } = this.props + + console.log(showConfigPage) return h(Menu, { className: 'account-menu', isShowing: isAccountMenuOpen }, [ h(CloseArea, { onClick: toggleAccountMenu }), - h(Item, { className: 'account-menu__header' }, [ + h(Item, { + className: 'account-menu__header', + onClick: lockMetamask, + }, [ 'My Accounts', h('button.account-menu__logout-button', 'Log out'), ]), @@ -44,23 +74,22 @@ AccountMenu.prototype.render = function () { h('div.account-menu__accounts', this.renderAccounts()), h(Divider), h(Item, { - onClick: true, + onClick: showNewAccountModal, icon: h('img', { src: 'images/plus-btn-white.svg' }), text: 'Create Account', }), h(Item, { - onClick: true, + onClick: showImportPage, icon: h('img', { src: 'images/import-account.svg' }), text: 'Import Account', }), h(Divider), h(Item, { - onClick: true, icon: h('img', { src: 'images/mm-info-icon.svg' }), text: 'Info & Help', }), h(Item, { - onClick: true, + onClick: showConfigPage, icon: h('img', { src: 'images/settings.svg' }), text: 'Settings', }), @@ -68,7 +97,13 @@ AccountMenu.prototype.render = function () { } AccountMenu.prototype.renderAccounts = function () { - const { identities, accounts, selected, actions, keyrings } = this.props + const { + identities, + accounts, + selected, + keyrings, + showAccountDetail, + } = this.props return Object.keys(identities).map((key, index) => { const identity = identities[key] @@ -84,12 +119,8 @@ AccountMenu.prototype.renderAccounts = function () { }) return h( - 'div.account-menu__account', - { - onClick: () => { - this.props.actions.showAccountDetail(identity.address) - }, - }, + 'div.account-menu__account.menu__item--clickable', + { onClick: () => showAccountDetail(identity.address) }, [ h('div.account-menu__check-mark', [ isSelected ? h('i.fa.fa-check') : null, @@ -104,44 +135,11 @@ AccountMenu.prototype.renderAccounts = function () { ), h('div.account-menu__account-info', [ - - this.indicateIfLoose(keyring), - - h('div.account-menu__name', { - style: { - fontSize: '18px', - maxWidth: '145px', - whiteSpace: 'nowrap', - overflow: 'hidden', - textOverflow: 'ellipsis', - }, - }, identity.name || ''), - + h('div.account-menu__name', identity.name || ''), h('div.account-menu__balance', formattedBalance), ]), - h('div.account-menu__action', { - onClick: () => { - actions.showEditAccountModal(identity) - }, - }, 'Edit'), - -// ======= -// }, -// ), -// this.indicateIfLoose(keyring), -// h('span', { -// style: { -// marginLeft: '20px', -// fontSize: '24px', -// maxWidth: '145px', -// whiteSpace: 'nowrap', -// overflow: 'hidden', -// textOverflow: 'ellipsis', -// }, -// }, identity.name || ''), -// h('span', { style: { marginLeft: '20px', fontSize: '24px' } }, isSelected ? h('.check', '✓') : null), -// >>>>>>> master:ui/app/components/account-dropdowns.js + this.indicateIfLoose(keyring), ], ) }) -- cgit From 376ae032fedb99d22b7c71438ec9482d2013c78e Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Thu, 19 Oct 2017 12:47:44 -0700 Subject: Fix selectors --- ui/app/components/account-menu/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ui/app/components/account-menu') diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index 2ebdba24a..85bd21076 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -35,7 +35,6 @@ function mapDispatchToProps (dispatch) { dispatch(actions.toggleAccountMenu()) }, showConfigPage: () => { - console.log('hihihih') dispatch(actions.showConfigPage()) dispatch(actions.toggleAccountMenu()) }, @@ -60,7 +59,6 @@ AccountMenu.prototype.render = function () { showConfigPage, } = this.props - console.log(showConfigPage) return h(Menu, { className: 'account-menu', isShowing: isAccountMenuOpen }, [ h(CloseArea, { onClick: toggleAccountMenu }), h(Item, { @@ -105,11 +103,12 @@ AccountMenu.prototype.renderAccounts = function () { showAccountDetail, } = this.props + console.log({ accounts }) return Object.keys(identities).map((key, index) => { const identity = identities[key] const isSelected = identity.address === selected - const balanceValue = accounts[key].balance + const balanceValue = accounts[key] ? accounts[key].balance : '' const formattedBalance = balanceValue ? formatBalance(balanceValue, 6) : '...' const simpleAddress = identity.address.substring(2).toLowerCase() -- cgit From 6d3f261b2f923782279be5e2ce05e8d6cc558a9e Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Mon, 23 Oct 2017 23:11:47 -0700 Subject: Change LOOSE label to IMPORTED --- ui/app/components/account-menu/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/app/components/account-menu') diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index 85bd21076..32e7bc466 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -148,6 +148,6 @@ AccountMenu.prototype.indicateIfLoose = function (keyring) { try { // Sometimes keyrings aren't loaded yet: const type = keyring.type const isLoose = type !== 'HD Key Tree' - return isLoose ? h('.keyring-label', 'LOOSE') : null + return isLoose ? h('.keyring-label', 'IMPORTED') : null } catch (e) { return } } -- cgit From a63373401b9983b991d4b2a0e28eec8d66c18e78 Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Mon, 23 Oct 2017 23:59:21 -0700 Subject: New Sidebar uplift --- ui/app/components/account-menu/index.js | 1 - 1 file changed, 1 deletion(-) (limited to 'ui/app/components/account-menu') diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index 32e7bc466..45e39e8ba 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -103,7 +103,6 @@ AccountMenu.prototype.renderAccounts = function () { showAccountDetail, } = this.props - console.log({ accounts }) return Object.keys(identities).map((key, index) => { const identity = identities[key] const isSelected = identity.address === selected -- cgit From 4401800a42eccbd77f11b332e1052431328401bb Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Tue, 24 Oct 2017 00:13:49 -0700 Subject: Account menu white check mark --- ui/app/components/account-menu/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/app/components/account-menu') diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index 45e39e8ba..da2c86233 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -98,14 +98,14 @@ AccountMenu.prototype.renderAccounts = function () { const { identities, accounts, - selected, + selectedAddress, keyrings, showAccountDetail, } = this.props return Object.keys(identities).map((key, index) => { const identity = identities[key] - const isSelected = identity.address === selected + const isSelected = identity.address === selectedAddress const balanceValue = accounts[key] ? accounts[key].balance : '' const formattedBalance = balanceValue ? formatBalance(balanceValue, 6) : '...' @@ -121,7 +121,7 @@ AccountMenu.prototype.renderAccounts = function () { { onClick: () => showAccountDetail(identity.address) }, [ h('div.account-menu__check-mark', [ - isSelected ? h('i.fa.fa-check') : null, + isSelected ? h('div.account-menu__check-mark-icon') : null, ]), h( -- cgit From 3891cf1af6130126781b12aaee410c0831fa43e9 Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Tue, 24 Oct 2017 00:16:19 -0700 Subject: Fix clickable area on logout --- ui/app/components/account-menu/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ui/app/components/account-menu') diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index da2c86233..e0f38ae78 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -63,10 +63,11 @@ AccountMenu.prototype.render = function () { h(CloseArea, { onClick: toggleAccountMenu }), h(Item, { className: 'account-menu__header', - onClick: lockMetamask, }, [ 'My Accounts', - h('button.account-menu__logout-button', 'Log out'), + h('button.account-menu__logout-button', { + onClick: lockMetamask, + }, 'Log out'), ]), h(Divider), h('div.account-menu__accounts', this.renderAccounts()), -- cgit From 3d8182f5d54730d3908a210c3deb71b49dd08100 Mon Sep 17 00:00:00 2001 From: Alexander Tseung Date: Wed, 25 Oct 2017 09:26:05 -0700 Subject: Add Info section --- ui/app/components/account-menu/index.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ui/app/components/account-menu') diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index e0f38ae78..38c7bcb2d 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -46,6 +46,10 @@ function mapDispatchToProps (dispatch) { dispatch(actions.showImportPage()) dispatch(actions.toggleAccountMenu()) }, + showInfoPage: () => { + dispatch(actions.showInfoPage()) + dispatch(actions.toggleAccountMenu()) + }, } } @@ -57,6 +61,7 @@ AccountMenu.prototype.render = function () { showImportPage, lockMetamask, showConfigPage, + showInfoPage, } = this.props return h(Menu, { className: 'account-menu', isShowing: isAccountMenuOpen }, [ @@ -84,6 +89,7 @@ AccountMenu.prototype.render = function () { }), h(Divider), h(Item, { + onClick: showInfoPage, icon: h('img', { src: 'images/mm-info-icon.svg' }), text: 'Info & Help', }), -- cgit From 0ed1add110ec630ed358aa44af030623bab1ad92 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 26 Oct 2017 14:45:05 -0230 Subject: Clear import error state on logout. --- ui/app/components/account-menu/index.js | 1 + 1 file changed, 1 insertion(+) (limited to 'ui/app/components/account-menu') diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index 38c7bcb2d..a9f075ec7 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -32,6 +32,7 @@ function mapDispatchToProps (dispatch) { }, lockMetamask: () => { dispatch(actions.lockMetamask()) + dispatch(actions.displayWarning(null)) dispatch(actions.toggleAccountMenu()) }, showConfigPage: () => { -- cgit From 0feb5b210b81533fc25c4760ce33876b4c749247 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 20 Dec 2017 14:19:13 -0330 Subject: Hides the sidebar after the an account menu actions changes the screen behind the sidebar. --- ui/app/components/account-menu/index.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ui/app/components/account-menu') diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index a9f075ec7..286a3b587 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -28,27 +28,33 @@ function mapDispatchToProps (dispatch) { toggleAccountMenu: () => dispatch(actions.toggleAccountMenu()), showAccountDetail: address => { dispatch(actions.showAccountDetail(address)) + dispatch(actions.hideSidebar()) dispatch(actions.toggleAccountMenu()) }, lockMetamask: () => { dispatch(actions.lockMetamask()) dispatch(actions.displayWarning(null)) + dispatch(actions.hideSidebar()) dispatch(actions.toggleAccountMenu()) }, showConfigPage: () => { dispatch(actions.showConfigPage()) + dispatch(actions.hideSidebar()) dispatch(actions.toggleAccountMenu()) }, showNewAccountModal: () => { dispatch(actions.showModal({ name: 'NEW_ACCOUNT' })) + dispatch(actions.hideSidebar()) dispatch(actions.toggleAccountMenu()) }, showImportPage: () => { dispatch(actions.showImportPage()) + dispatch(actions.hideSidebar()) dispatch(actions.toggleAccountMenu()) }, showInfoPage: () => { dispatch(actions.showInfoPage()) + dispatch(actions.hideSidebar()) dispatch(actions.toggleAccountMenu()) }, } -- cgit From b8310ac62e358af9a6a9f3ed1e0ffa25a2a00b8d Mon Sep 17 00:00:00 2001 From: Alexander Tseung Date: Thu, 11 Jan 2018 15:49:10 -0800 Subject: Fix logging out of old UI causing infinite spinner (#2914) --- ui/app/components/account-menu/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/app/components/account-menu') diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index 286a3b587..1b62b42fb 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -33,7 +33,7 @@ function mapDispatchToProps (dispatch) { }, lockMetamask: () => { dispatch(actions.lockMetamask()) - dispatch(actions.displayWarning(null)) + dispatch(actions.hideWarning()) dispatch(actions.hideSidebar()) dispatch(actions.toggleAccountMenu()) }, -- cgit From 980e1bfcf82361185f6d1b22abd9593ba166825e Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 10 Jan 2018 14:55:38 -0330 Subject: New add account page with create and import options. --- ui/app/components/account-menu/index.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'ui/app/components/account-menu') diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index 1b62b42fb..aeb8a0b38 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -42,13 +42,8 @@ function mapDispatchToProps (dispatch) { dispatch(actions.hideSidebar()) dispatch(actions.toggleAccountMenu()) }, - showNewAccountModal: () => { - dispatch(actions.showModal({ name: 'NEW_ACCOUNT' })) - dispatch(actions.hideSidebar()) - dispatch(actions.toggleAccountMenu()) - }, - showImportPage: () => { - dispatch(actions.showImportPage()) + showNewAccountPage: (formToSelect) => { + dispatch(actions.showNewAccountPage(formToSelect)) dispatch(actions.hideSidebar()) dispatch(actions.toggleAccountMenu()) }, @@ -64,8 +59,7 @@ AccountMenu.prototype.render = function () { const { isAccountMenuOpen, toggleAccountMenu, - showNewAccountModal, - showImportPage, + showNewAccountPage, lockMetamask, showConfigPage, showInfoPage, @@ -85,12 +79,12 @@ AccountMenu.prototype.render = function () { h('div.account-menu__accounts', this.renderAccounts()), h(Divider), h(Item, { - onClick: showNewAccountModal, + onClick: () => showNewAccountPage('CREATE'), icon: h('img', { src: 'images/plus-btn-white.svg' }), text: 'Create Account', }), h(Item, { - onClick: showImportPage, + onClick: () => showNewAccountPage('IMPORT'), icon: h('img', { src: 'images/import-account.svg' }), text: 'Import Account', }), -- cgit From e9c2c0eec19514468fd53087f974709d5df9c35b Mon Sep 17 00:00:00 2001 From: Alexander Tseung Date: Wed, 7 Feb 2018 18:46:27 -0800 Subject: Make blockies icon round to match identicons (#3205) --- ui/app/components/account-menu/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ui/app/components/account-menu') diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index aeb8a0b38..1a0103d4f 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -80,23 +80,23 @@ AccountMenu.prototype.render = function () { h(Divider), h(Item, { onClick: () => showNewAccountPage('CREATE'), - icon: h('img', { src: 'images/plus-btn-white.svg' }), + icon: h('img.account-menu__item-icon', { src: 'images/plus-btn-white.svg' }), text: 'Create Account', }), h(Item, { onClick: () => showNewAccountPage('IMPORT'), - icon: h('img', { src: 'images/import-account.svg' }), + icon: h('img.account-menu__item-icon', { src: 'images/import-account.svg' }), text: 'Import Account', }), h(Divider), h(Item, { onClick: showInfoPage, - icon: h('img', { src: 'images/mm-info-icon.svg' }), + icon: h('img.account-menu__item-icon', { src: 'images/mm-info-icon.svg' }), text: 'Info & Help', }), h(Item, { onClick: showConfigPage, - icon: h('img', { src: 'images/settings.svg' }), + icon: h('img.account-menu__item-icon', { src: 'images/settings.svg' }), text: 'Settings', }), ]) -- cgit