drop.chapril.org-firefoxsend/app/ui/qr.js
timvisee 1520942ac9
Fix UI error after upload when share link is too long
The QR-code generation logic had a character limit. This broke the
upload page when the share URL is too long. This has now been fixed to
support an arbitrary number of characters.

Fixes https://gitlab.com/timvisee/send/-/issues/19
2021-07-08 21:21:35 +02:00

11 lines
245 B
JavaScript

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