added qr code to copyDialog

Co-authored-by: timvisee <tim@visee.me>
This commit is contained in:
Danny Coates 2020-07-27 14:49:10 -07:00 committed by timvisee
parent 24aa1f2e17
commit 7cdef4bbfc
No known key found for this signature in database
GPG key ID: B8DB720BC383E172
5 changed files with 1121 additions and 8 deletions

10
app/ui/qr.js Normal file
View file

@ -0,0 +1,10 @@
const raw = require('choo/html/raw');
const qrcode = require('../qrcode');
module.exports = function(url) {
const gen = qrcode(5, 'L');
gen.addData(url);
gen.make();
const qr = gen.createSvgTag({ scalable: true });
return raw(qr);
};