added qr code to copyDialog
Co-authored-by: timvisee <tim@visee.me>
This commit is contained in:
parent
24aa1f2e17
commit
7cdef4bbfc
5 changed files with 1121 additions and 8 deletions
10
app/ui/qr.js
Normal file
10
app/ui/qr.js
Normal 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);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue