aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/qr-code.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2016-09-14 06:39:44 +0800
committerGitHub <noreply@github.com>2016-09-14 06:39:44 +0800
commit9e2d4d2bc935243411eb557aab40cbd1081b833f (patch)
treecef827b85980374387519a7a69c9439bb716db3f /ui/app/components/qr-code.js
parent4b880b87bce94c1268401e53b6d7971249311d62 (diff)
parentd05dfc4eedaeb9000693748ab668479b392f3228 (diff)
downloadtangerine-wallet-browser-9e2d4d2bc935243411eb557aab40cbd1081b833f.tar
tangerine-wallet-browser-9e2d4d2bc935243411eb557aab40cbd1081b833f.tar.gz
tangerine-wallet-browser-9e2d4d2bc935243411eb557aab40cbd1081b833f.tar.bz2
tangerine-wallet-browser-9e2d4d2bc935243411eb557aab40cbd1081b833f.tar.lz
tangerine-wallet-browser-9e2d4d2bc935243411eb557aab40cbd1081b833f.tar.xz
tangerine-wallet-browser-9e2d4d2bc935243411eb557aab40cbd1081b833f.tar.zst
tangerine-wallet-browser-9e2d4d2bc935243411eb557aab40cbd1081b833f.zip
Merge branch 'master' into library
Diffstat (limited to 'ui/app/components/qr-code.js')
-rw-r--r--ui/app/components/qr-code.js14
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', [