|
|
@ -24,7 +24,7 @@ class AccountDropdowns extends Component { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
renderAccounts () { |
|
|
|
renderAccounts () { |
|
|
|
const { identities, selected, menuItemStyles, dropdownWrapperStyle } = this.props |
|
|
|
const { identities, selected, menuItemStyles, dropdownWrapperStyle, actions } = this.props |
|
|
|
|
|
|
|
|
|
|
|
return Object.keys(identities).map((key, index) => { |
|
|
|
return Object.keys(identities).map((key, index) => { |
|
|
|
const identity = identities[key] |
|
|
|
const identity = identities[key] |
|
|
@ -46,20 +46,28 @@ class AccountDropdowns extends Component { |
|
|
|
), |
|
|
|
), |
|
|
|
}, |
|
|
|
}, |
|
|
|
[ |
|
|
|
[ |
|
|
|
// MOVE CHECKMARK UP
|
|
|
|
h('div.flex-row', {}, [ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
h('span', { |
|
|
|
|
|
|
|
style: { |
|
|
|
|
|
|
|
flex: '1 1 auto', |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, isSelected ? h('.check', '✓') : null), |
|
|
|
|
|
|
|
|
|
|
|
h( |
|
|
|
h( |
|
|
|
Identicon, |
|
|
|
Identicon, |
|
|
|
{ |
|
|
|
{ |
|
|
|
address: identity.address, |
|
|
|
address: identity.address, |
|
|
|
diameter: 32, |
|
|
|
diameter: 32, |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
marginLeft: '10px', |
|
|
|
flex: '1 1 auto', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
h('span', { |
|
|
|
h('span', { |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
marginLeft: '20px', |
|
|
|
flex: '5 5 auto', |
|
|
|
fontSize: '24px', |
|
|
|
fontSize: '24px', |
|
|
|
maxWidth: '145px', |
|
|
|
maxWidth: '145px', |
|
|
|
whiteSpace: 'nowrap', |
|
|
|
whiteSpace: 'nowrap', |
|
|
@ -67,8 +75,18 @@ class AccountDropdowns extends Component { |
|
|
|
textOverflow: 'ellipsis', |
|
|
|
textOverflow: 'ellipsis', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, identity.name || ''), |
|
|
|
}, identity.name || ''), |
|
|
|
h('span', { style: { marginLeft: '20px', fontSize: '24px' } }, isSelected ? h('.check', '✓') : null), |
|
|
|
|
|
|
|
// EDIT
|
|
|
|
h('span', { |
|
|
|
|
|
|
|
style: { |
|
|
|
|
|
|
|
flex: '2 2 auto', |
|
|
|
|
|
|
|
fontSize: '18px', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
onClick: () => { |
|
|
|
|
|
|
|
actions.showNewAccountModal() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, 'Edit'), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
]) |
|
|
|
] |
|
|
|
] |
|
|
|
) |
|
|
|
) |
|
|
|
}) |
|
|
|
}) |
|
|
@ -90,9 +108,7 @@ class AccountDropdowns extends Component { |
|
|
|
maxHeight: '300px', |
|
|
|
maxHeight: '300px', |
|
|
|
width: '300px', |
|
|
|
width: '300px', |
|
|
|
}, |
|
|
|
}, |
|
|
|
innerStyle: { |
|
|
|
innerStyle: {}, |
|
|
|
padding: '8px 25px', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
isOpen: accountSelectorActive, |
|
|
|
isOpen: accountSelectorActive, |
|
|
|
onClickOutside: (event) => { |
|
|
|
onClickOutside: (event) => { |
|
|
|
const { classList } = event.target |
|
|
|
const { classList } = event.target |
|
|
@ -343,7 +359,7 @@ const mapDispatchToProps = (dispatch) => { |
|
|
|
dispatch(actions.showModal({ name: 'ACCOUNT_DETAILS' })) |
|
|
|
dispatch(actions.showModal({ name: 'ACCOUNT_DETAILS' })) |
|
|
|
}, |
|
|
|
}, |
|
|
|
showNewAccountModal: () => { |
|
|
|
showNewAccountModal: () => { |
|
|
|
dispatch(actions.showModal({ name: 'NEW_ACCOUNT' })) |
|
|
|
dispatch(actions.showModal({ name: 'EDIT_ACCOUNT_NAME' })) |
|
|
|
}, |
|
|
|
}, |
|
|
|
addNewAccount: () => dispatch(actions.addNewAccount()), |
|
|
|
addNewAccount: () => dispatch(actions.addNewAccount()), |
|
|
|
showImportPage: () => dispatch(actions.showImportPage()), |
|
|
|
showImportPage: () => dispatch(actions.showImportPage()), |
|
|
|