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
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);
};