aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2016-05-11 17:11:31 +0800
committerkumavis <aaron@kumavis.me>2016-05-11 17:11:31 +0800
commit2913dcb82c9191881e0a411a33bd6fc32171935c (patch)
treef07ac0f70ae734a64cc8d3b0ed44c848ef29e353 /ui/app/components
parent82f9955f21077a9b25ee2127efb08336308eb71d (diff)
downloadtangerine-wallet-browser-2913dcb82c9191881e0a411a33bd6fc32171935c.tar
tangerine-wallet-browser-2913dcb82c9191881e0a411a33bd6fc32171935c.tar.gz
tangerine-wallet-browser-2913dcb82c9191881e0a411a33bd6fc32171935c.tar.bz2
tangerine-wallet-browser-2913dcb82c9191881e0a411a33bd6fc32171935c.tar.lz
tangerine-wallet-browser-2913dcb82c9191881e0a411a33bd6fc32171935c.tar.xz
tangerine-wallet-browser-2913dcb82c9191881e0a411a33bd6fc32171935c.tar.zst
tangerine-wallet-browser-2913dcb82c9191881e0a411a33bd6fc32171935c.zip
ui - redesign - account details
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/identicon.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/ui/app/components/identicon.js b/ui/app/components/identicon.js
index 3fbf3c699..ef625cc62 100644
--- a/ui/app/components/identicon.js
+++ b/ui/app/components/identicon.js
@@ -10,18 +10,20 @@ inherits(IdenticonComponent, Component)
function IdenticonComponent() {
Component.call(this)
- this.diameter = 46
+ this.defaultDiameter = 46
}
IdenticonComponent.prototype.render = function() {
+ var state = this.props
+ var diameter = state.diameter || this.defaultDiameter
return (
h('div', {
key: 'identicon-' + this.props.address,
style: {
display: 'inline-block',
- height: this.diameter,
- width: this.diameter,
- borderRadius: this.diameter / 2,
+ height: diameter,
+ width: diameter,
+ borderRadius: diameter / 2,
overflow: 'hidden',
},
})
@@ -33,12 +35,12 @@ IdenticonComponent.prototype.componentDidMount = function(){
var address = state.address
if (!address) return
- console.log('rendering for address ' + address)
var numericRepresentation = jsNumberForAddress(address)
var container = findDOMNode(this)
// jazzicon with hack to fix inline svg error
- var identicon = jazzicon(this.diameter, numericRepresentation)
+ var diameter = state.diameter || this.defaultDiameter
+ var identicon = jazzicon(diameter, numericRepresentation)
var identiconSrc = identicon.innerHTML
var dataUri = 'data:image/svg+xml;charset=utf-8,'+encodeURIComponent(identiconSrc)
var img = document.createElement('img')