1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Extract QRCode controller

This commit is contained in:
Yassine Guedidi 2025-02-23 22:40:55 +01:00
parent e5042074a2
commit 3125eb43ad
4 changed files with 12 additions and 11 deletions

View file

@ -0,0 +1,10 @@
import { Controller } from '@hotwired/stimulus';
import jrQrcode from 'jr-qrcode';
export default class extends Controller {
static values = { url: String };
connect() {
this.element.setAttribute('src', jrQrcode.getQrBase64(this.urlValue));
}
}