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

Disable account selection dropdown from account details

This commit is contained in:
sdtsui 2017-08-03 17:08:19 -07:00
parent 67f10d660f
commit ecb09fcc0a
2 changed files with 16 additions and 7 deletions

View File

@ -128,6 +128,7 @@ AccountDetailScreen.prototype.render = function () {
selected,
network,
identities: props.identities,
enableAccountOptions: true,
},
),
]
@ -145,7 +146,6 @@ AccountDetailScreen.prototype.render = function () {
h('div', {
style: {
marginTop: '-10px',
overflow: 'hidden',
textOverflow: 'ellipsis',
paddingTop: '3px',
@ -153,7 +153,6 @@ AccountDetailScreen.prototype.render = function () {
fontSize: '13px',
fontFamily: 'Montserrat Light',
textRendering: 'geometricPrecision',
marginTop: '10px',
marginBottom: '15px',
color: '#AEAEAE',
},

View File

@ -183,7 +183,7 @@ class AccountDropdowns extends Component {
}
render () {
const { style } = this.props
const { style, enableAccountsSelector, enableAccountOptions } = this.props
const { optionsMenuActive, accountSelectorActive } = this.state
return h(
@ -192,10 +192,12 @@ class AccountDropdowns extends Component {
style: style,
},
[
h(
enableAccountsSelector && h(
'i.fa.fa-angle-down',
{
style: {},
style: {
fontSize: '1.8em',
},
onClick: (event) => {
event.stopPropagation()
this.setState({
@ -206,10 +208,13 @@ class AccountDropdowns extends Component {
},
this.renderAccountSelector(),
),
h(
enableAccountOptions && h(
'i.fa.fa-ellipsis-h',
{
style: { 'marginLeft': '10px'},
style: {
marginRight: '0.5em',
fontSize: '1.8em',
},
onClick: (event) => {
event.stopPropagation()
this.setState({
@ -225,6 +230,11 @@ class AccountDropdowns extends Component {
}
}
AccountDropdowns.defaultProps = {
enableAccountsSelector: false,
enableAccountOptions: false,
}
AccountDropdowns.propTypes = {
identities: PropTypes.objectOf(PropTypes.object),
selected: PropTypes.string,