|
|
@ -44,115 +44,132 @@ AccountDetailScreen.prototype.render = function () { |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
|
|
|
|
|
|
|
|
h('.account-detail-section.flex-column.flex-grow', [ |
|
|
|
h('.account-detail-section', [ |
|
|
|
|
|
|
|
|
|
|
|
// identicon, label, balance, etc
|
|
|
|
// identicon, label, balance, etc
|
|
|
|
h('.account-data-subsection.flex-column.flex-grow', { |
|
|
|
h('.account-data-subsection', { |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
margin: '0 20px', |
|
|
|
margin: '0 20px', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, [ |
|
|
|
}, [ |
|
|
|
|
|
|
|
|
|
|
|
// header - identicon + nav
|
|
|
|
// header - identicon + nav
|
|
|
|
h('.flex-row.flex-center', { |
|
|
|
h('div', { |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
marginTop: 28, |
|
|
|
marginTop: 28, |
|
|
|
|
|
|
|
display: 'flex', |
|
|
|
|
|
|
|
justifyContent: 'flex-start', |
|
|
|
|
|
|
|
alignItems: 'flex-start', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, [ |
|
|
|
}, [ |
|
|
|
|
|
|
|
|
|
|
|
// large identicon
|
|
|
|
// large identicon and addresses
|
|
|
|
h('.identicon-wrapper.flex-column.flex-center.select-none', [ |
|
|
|
h('.identicon-wrapper.select-none', [ |
|
|
|
h(Identicon, { |
|
|
|
h(Identicon, { |
|
|
|
diameter: 62, |
|
|
|
diameter: 62, |
|
|
|
address: selected, |
|
|
|
address: selected, |
|
|
|
}), |
|
|
|
}), |
|
|
|
]), |
|
|
|
]), |
|
|
|
]), |
|
|
|
h('flex-column', { |
|
|
|
|
|
|
|
style: { |
|
|
|
h('.flex-center', { |
|
|
|
lineHeight: '10px', |
|
|
|
style: { |
|
|
|
marginLeft: '15px', |
|
|
|
height: '62px', |
|
|
|
|
|
|
|
paddingTop: '8px', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, [ |
|
|
|
|
|
|
|
h(EditableLabel, { |
|
|
|
|
|
|
|
textValue: identity ? identity.name : '', |
|
|
|
|
|
|
|
state: { |
|
|
|
|
|
|
|
isEditingLabel: false, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
saveText: (text) => { |
|
|
|
|
|
|
|
props.dispatch(actions.saveAccountLabel(selected, text)) |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, [ |
|
|
|
}, [ |
|
|
|
|
|
|
|
h(EditableLabel, { |
|
|
|
|
|
|
|
textValue: identity ? identity.name : '', |
|
|
|
|
|
|
|
state: { |
|
|
|
|
|
|
|
isEditingLabel: false, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
saveText: (text) => { |
|
|
|
|
|
|
|
props.dispatch(actions.saveAccountLabel(selected, text)) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, [ |
|
|
|
|
|
|
|
|
|
|
|
// What is shown when not editing + edit text:
|
|
|
|
// What is shown when not editing + edit text:
|
|
|
|
h('label.editing-label', [h('.edit-text', 'edit')]), |
|
|
|
h('label.editing-label', [h('.edit-text', 'edit')]), |
|
|
|
h('h2.font-medium.color-forest', {name: 'edit'}, identity && identity.name), |
|
|
|
h('h2.font-medium.color-forest', {name: 'edit'}, identity && identity.name), |
|
|
|
]), |
|
|
|
]), |
|
|
|
]), |
|
|
|
h('.flex-row',{ |
|
|
|
|
|
|
|
style:{ |
|
|
|
// address and getter actions
|
|
|
|
width: '15em', |
|
|
|
h('.flex-row', { |
|
|
|
justifyContent: 'space-between', |
|
|
|
style: { |
|
|
|
alignItems: 'baseline', |
|
|
|
marginBottom: 16, |
|
|
|
} |
|
|
|
}, |
|
|
|
},[ |
|
|
|
}, [ |
|
|
|
h('div', { |
|
|
|
|
|
|
|
style: { |
|
|
|
h('div', { |
|
|
|
overflow: 'hidden', |
|
|
|
style: { |
|
|
|
textOverflow: 'ellipsis', |
|
|
|
overflow: 'hidden', |
|
|
|
paddingTop: '3px', |
|
|
|
textOverflow: 'ellipsis', |
|
|
|
width: '5em', |
|
|
|
paddingTop: '3px', |
|
|
|
fontSize: 'smaller', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, ethUtil.toChecksumAddress(selected)), |
|
|
|
}, ethUtil.toChecksumAddress(selected)), |
|
|
|
|
|
|
|
|
|
|
|
h(CopyButton, { |
|
|
|
|
|
|
|
value: ethUtil.toChecksumAddress(selected), |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
h(Tooltip, { |
|
|
|
h('.flex-row', { |
|
|
|
title: 'Export Private Key', |
|
|
|
style: { |
|
|
|
}, [ |
|
|
|
justifyContent: 'flex-end', |
|
|
|
h('div', { |
|
|
|
}, |
|
|
|
|
|
|
|
}, [ |
|
|
|
|
|
|
|
h(CopyButton, { |
|
|
|
|
|
|
|
value: ethUtil.toChecksumAddress(selected), |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
h(Tooltip, { |
|
|
|
|
|
|
|
title: 'Export Private Key', |
|
|
|
|
|
|
|
}, [ |
|
|
|
|
|
|
|
h('div', { |
|
|
|
|
|
|
|
style: { |
|
|
|
|
|
|
|
margin: '5px', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, [ |
|
|
|
|
|
|
|
h('img.cursor-pointer.color-orange', { |
|
|
|
|
|
|
|
src: 'images/key-32.png', |
|
|
|
|
|
|
|
onClick: () => this.requestAccountExport(selected), |
|
|
|
|
|
|
|
style: { |
|
|
|
|
|
|
|
margin: '0px 5px', |
|
|
|
|
|
|
|
width: '20px', |
|
|
|
|
|
|
|
height: '20px', |
|
|
|
|
|
|
|
position: 'relative', |
|
|
|
|
|
|
|
top: '3px', |
|
|
|
|
|
|
|
right: '4px', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
h('.flex-row', { |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
margin: '5px', |
|
|
|
justifyContent: 'space-between', |
|
|
|
}, |
|
|
|
alignItems: 'flex-start', |
|
|
|
|
|
|
|
} |
|
|
|
}, [ |
|
|
|
}, [ |
|
|
|
h('img.cursor-pointer.color-orange', { |
|
|
|
|
|
|
|
src: 'images/key-32.png', |
|
|
|
h(EtherBalance, { |
|
|
|
onClick: () => this.requestAccountExport(selected), |
|
|
|
value: account && account.balance, |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
margin: '0px 5px', |
|
|
|
lineHeight: '7px', |
|
|
|
width: '20px', |
|
|
|
|
|
|
|
height: '20px', |
|
|
|
|
|
|
|
position: 'relative', |
|
|
|
|
|
|
|
top: '3px', |
|
|
|
|
|
|
|
right: '4px', |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}), |
|
|
|
}), |
|
|
|
]), |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
]), |
|
|
|
h('button', { |
|
|
|
|
|
|
|
onClick: () => props.dispatch(actions.showSendPage()), |
|
|
|
|
|
|
|
style: { |
|
|
|
|
|
|
|
margin: 10, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, 'SEND'), |
|
|
|
|
|
|
|
|
|
|
|
// balance + send
|
|
|
|
]), |
|
|
|
h('.flex-row.flex-space-between', [ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
h(EtherBalance, { |
|
|
|
]), |
|
|
|
value: account && account.balance, |
|
|
|
]), |
|
|
|
style: { |
|
|
|
|
|
|
|
lineHeight: '50px', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
h('button', { |
|
|
|
// address and getter actions
|
|
|
|
onClick: () => props.dispatch(actions.showSendPage()), |
|
|
|
|
|
|
|
style: { |
|
|
|
|
|
|
|
margin: 10, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, 'SEND'), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
]), |
|
|
|
// balance + send
|
|
|
|
|
|
|
|
|
|
|
|
]), |
|
|
|
]), |
|
|
|
|
|
|
|
|
|
|
@ -214,4 +231,3 @@ AccountDetailScreen.prototype.transactionList = function () { |
|
|
|
AccountDetailScreen.prototype.requestAccountExport = function () { |
|
|
|
AccountDetailScreen.prototype.requestAccountExport = function () { |
|
|
|
this.props.dispatch(actions.requestExportAccount()) |
|
|
|
this.props.dispatch(actions.requestExportAccount()) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|