From 11fd281a33ff433ba86bb39400601a8d951fc486 Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 7 Jul 2016 15:29:46 -0700 Subject: ui - remove doubled eth-balance --- ui/app/components/eth-balance.js | 5 ----- ui/app/components/pending-tx-details.js | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js index 9e445fe3f..75b6dcb43 100644 --- a/ui/app/components/eth-balance.js +++ b/ui/app/components/eth-balance.js @@ -54,11 +54,6 @@ EthBalanceComponent.prototype.renderBalance = function (value) { textRendering: 'geometricPrecision', }, }, [ - h(tagName, { - style: { - fontSize: props.fontSize || '12px', - }, - }, balance + ' '), h(tagName, { style: { color: props.labelColor || '#AEAEAE', diff --git a/ui/app/components/pending-tx-details.js b/ui/app/components/pending-tx-details.js index b2c16e772..a652d168d 100644 --- a/ui/app/components/pending-tx-details.js +++ b/ui/app/components/pending-tx-details.js @@ -69,6 +69,7 @@ PTXP.render = function () { }, h(EtherBalance, { value: balance, inline: true, + labelColor: '#F7861C', })), ]), -- cgit v1.2.3 From 7dc67a92571b3d6705be43f2cc616cafb3462e46 Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 7 Jul 2016 16:54:35 -0700 Subject: notif - add support for forward carrat --- ui/app/components/pending-tx-details.js | 54 +++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/ui/app/components/pending-tx-details.js b/ui/app/components/pending-tx-details.js index a652d168d..907f1c5b8 100644 --- a/ui/app/components/pending-tx-details.js +++ b/ui/app/components/pending-tx-details.js @@ -1,6 +1,7 @@ const Component = require('react').Component const h = require('react-hyperscript') const inherits = require('util').inherits +const carratInline = require('fs').readFileSync('./images/forward-carrat.svg', 'utf8') const MiniAccountPanel = require('./mini-account-panel') const EtherBalance = require('./eth-balance') @@ -37,6 +38,8 @@ 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 + var imageify = props.imageifyIdenticons === undefined ? true : props.imageifyIdenticons + return ( h('div', [ @@ -48,7 +51,7 @@ PTXP.render = function () { h(MiniAccountPanel, { imageSeed: address, - imageifyIdenticons: props.imageifyIdenticons, + imageifyIdenticons: imageify, picOrder: 'right', }, [ h('span.font-small', { @@ -66,21 +69,17 @@ PTXP.render = function () { style: { fontFamily: 'Montserrat Light, Montserrat, sans-serif', }, - }, h(EtherBalance, { - value: balance, - inline: true, - labelColor: '#F7861C', - })), + }, [ + h(EtherBalance, { + value: balance, + inline: true, + labelColor: '#F7861C', + }) + ]), ]), - h('img', { - src: 'images/forward-carrat.svg', - style: { - padding: '5px 6px 0px 10px', - height: '37px', - }, - }), + forwardCarrat(imageify), this.miniAccountPanelForRecipient(), ]), @@ -223,3 +222,32 @@ PTXP.warnIfNeeded = function () { h('span', ' Your identity may be used in other contracts!'), ]) } + + +function forwardCarrat(imageify){ + if (imageify) { + return ( + + h('img', { + src: 'images/forward-carrat.svg', + style: { + padding: '5px 6px 0px 10px', + height: '37px', + }, + }) + + ) + } else { + return ( + + h('div', { + dangerouslySetInnerHTML: { __html: carratInline }, + style: { + padding: '0px 6px 0px 10px', + height: '45px', + }, + }) + + ) + } +} \ No newline at end of file -- cgit v1.2.3 From 501ffba6f2001c05d92bee37bc0786d81ba3f2a5 Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 7 Jul 2016 17:00:24 -0700 Subject: lint - dingle dangle comma tangle --- ui/app/components/pending-tx-details.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/components/pending-tx-details.js b/ui/app/components/pending-tx-details.js index 907f1c5b8..c9d3251e1 100644 --- a/ui/app/components/pending-tx-details.js +++ b/ui/app/components/pending-tx-details.js @@ -74,7 +74,7 @@ PTXP.render = function () { value: balance, inline: true, labelColor: '#F7861C', - }) + }), ]), ]), -- cgit v1.2.3 From d2eab80e093d9a1b2d6914274ade25fa10351a22 Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 7 Jul 2016 17:34:30 -0700 Subject: eth-balance fix --- ui/app/components/eth-balance.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js index 537a51918..75b6dcb43 100644 --- a/ui/app/components/eth-balance.js +++ b/ui/app/components/eth-balance.js @@ -59,8 +59,17 @@ EthBalanceComponent.prototype.renderBalance = function (value) { color: props.labelColor || '#AEAEAE', fontSize: props.fontSize || '12px', }, - }, label), + }, [ + h('div', balance), + h('div', { + style: { + color: '#AEAEAE', + fontSize: '12px', + }, + }, label), + ]), ]), ]) + ) } -- cgit v1.2.3