diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-09-14 04:00:29 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-09-14 04:00:29 +0800 |
commit | b624155e60c713e5e1de67b51bf34083ecfed0ef (patch) | |
tree | 2275151d2dc2ae2a847cfa7c960d6de174dbcaf6 /ui/app/components/qr-code.js | |
parent | 3da0d61417b4ca64fb8bd93779d4c53891bb7630 (diff) | |
parent | 194f1724f36fb6d964513aa7b364b0835af5d93d (diff) | |
download | tangerine-wallet-browser-b624155e60c713e5e1de67b51bf34083ecfed0ef.tar.gz tangerine-wallet-browser-b624155e60c713e5e1de67b51bf34083ecfed0ef.tar.zst tangerine-wallet-browser-b624155e60c713e5e1de67b51bf34083ecfed0ef.zip |
Merge branch 'i646-ClosePopupBug' of github.com:MetaMask/metamask-plugin into i646-ClosePopupBug
Diffstat (limited to 'ui/app/components/qr-code.js')
-rw-r--r-- | ui/app/components/qr-code.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/ui/app/components/qr-code.js b/ui/app/components/qr-code.js index c26b02b94..5488599eb 100644 --- a/ui/app/components/qr-code.js +++ b/ui/app/components/qr-code.js @@ -1,5 +1,6 @@ const Component = require('react').Component const h = require('react-hyperscript') +const qrCode = require('qrcode-npm').qrcode const inherits = require('util').inherits const connect = require('react-redux').connect const CopyButton = require('./copyButton') @@ -23,15 +24,22 @@ function QrCodeView () { QrCodeView.prototype.render = function () { var props = this.props var Qr = props.Qr + var qrImage = qrCode(4, 'M') + + qrImage.addData(Qr.data) + qrImage.make() + return h('.main-container.flex-column', { key: 'qr', style: { justifyContent: 'center', - padding: '45px', + paddingBottom: '45px', + paddingLeft: '45px', + paddingRight: '45px', alignItems: 'center', }, }, [ - Array.isArray(Qr.message) ? h('.message-container', this.renderMultiMessage()) : h('h3', Qr.message), + Array.isArray(Qr.message) ? h('.message-container', this.renderMultiMessage()) : h('.qr-header', Qr.message), this.props.warning ? this.props.warning && h('span.error.flex-center', { style: { @@ -48,7 +56,7 @@ QrCodeView.prototype.render = function () { marginBottom: '15px', }, dangerouslySetInnerHTML: { - __html: Qr.image, + __html: qrImage.createTableTag(4), }, }), h('.flex-row', [ |