diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-07-08 02:50:01 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-07-08 02:50:01 +0800 |
commit | 1e92e7e9d42b503302c4633be4512c0f566a4f9a (patch) | |
tree | 883bef2522b26bfd16cb4be6b0572305d6e55e94 | |
parent | 21f17214be854bf07f44b0d388329ae33598d79c (diff) | |
download | tangerine-wallet-browser-1e92e7e9d42b503302c4633be4512c0f566a4f9a.tar tangerine-wallet-browser-1e92e7e9d42b503302c4633be4512c0f566a4f9a.tar.gz tangerine-wallet-browser-1e92e7e9d42b503302c4633be4512c0f566a4f9a.tar.bz2 tangerine-wallet-browser-1e92e7e9d42b503302c4633be4512c0f566a4f9a.tar.lz tangerine-wallet-browser-1e92e7e9d42b503302c4633be4512c0f566a4f9a.tar.xz tangerine-wallet-browser-1e92e7e9d42b503302c4633be4512c0f566a4f9a.tar.zst tangerine-wallet-browser-1e92e7e9d42b503302c4633be4512c0f566a4f9a.zip |
Make mini account panel labels fully configurable
-rw-r--r-- | ui/app/components/mini-account-panel.js | 12 | ||||
-rw-r--r-- | ui/app/components/pending-tx-details.js | 58 |
2 files changed, 42 insertions, 28 deletions
diff --git a/ui/app/components/mini-account-panel.js b/ui/app/components/mini-account-panel.js index 1ec7b4d41..a8127acd7 100644 --- a/ui/app/components/mini-account-panel.js +++ b/ui/app/components/mini-account-panel.js @@ -34,17 +34,7 @@ AccountPanel.prototype.render = function () { display: 'flex', alignItems: picOrder === 'left' ? 'flex-begin' : 'flex-end', }, - }, [ - - attrs.map((attr) => { - return h('span.font-small', { - key: `mini-${attr}`, - style: { - fontFamily: 'Montserrat Light, Montserrat, sans-serif', - }, - }, attr) - }), - ]), + }, this.props.children), ]) ) } diff --git a/ui/app/components/pending-tx-details.js b/ui/app/components/pending-tx-details.js index 191f5d142..9c3272faa 100644 --- a/ui/app/components/pending-tx-details.js +++ b/ui/app/components/pending-tx-details.js @@ -36,8 +36,6 @@ PTXP.render = function () { var maxCost = ((new BN(txValue, 16)).add(new BN(gasCost, 16))).toString(16) var dataLength = txParams.data ? (txParams.data.length - 2) / 2 : 0 - console.dir(identity) - console.dir({props}) return ( h('div', [ @@ -48,15 +46,28 @@ PTXP.render = function () { }, [ h(MiniAccountPanel, { - attrs: [ - identity.name, - addressSummary(address, 6, 4, false), - formatBalance(balance), - ], imageSeed: address, imageifyIdenticons: props.imageifyIdenticons, picOrder: 'right', - }), + }, [ + h('span.font-small', { + style: { + fontFamily: 'Montserrat Light, Montserrat, sans-serif', + }, + }, identity.name), + h('span.font-small', { + style: { + fontFamily: 'Montserrat Light, Montserrat, sans-serif', + }, + }, addressSummary(address, 6, 4, false)), + + h('span.font-small', { + style: { + fontFamily: 'Montserrat Light, Montserrat, sans-serif', + }, + }, formatBalance(balance)), + + ]), h('img', { src: 'images/forward-carrat.svg', @@ -132,22 +143,35 @@ PTXP.miniAccountPanelForRecipient = function () { // If it's not a contract deploy, send to the account if (!isContractDeploy) { return h(MiniAccountPanel, { - attrs: [ - nameForAddress(txParams.to), - addressSummary(txParams.to, 6, 4, false), - ], imageSeed: txParams.to, imageifyIdenticons: props.imageifyIdenticons, picOrder: 'left', - }) + }, [ + h('span.font-small', { + style: { + fontFamily: 'Montserrat Light, Montserrat, sans-serif', + }, + }, nameForAddress(txParams.to)), + h('span.font-small', { + style: { + fontFamily: 'Montserrat Light, Montserrat, sans-serif', + }, + }, addressSummary(txParams.to, 6, 4, false)), + ]) + } else { return h(MiniAccountPanel, { - attrs: [ - 'New Contract', - ], imageifyIdenticons: props.imageifyIdenticons, picOrder: 'left', - }) + }, [ + + h('span.font-small', { + style: { + fontFamily: 'Montserrat Light, Montserrat, sans-serif', + }, + }, 'New Contract'), + + ]) } } |