mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-27 21:39:32 +00:00
Use server side library to generate QR-Code for Google authenticator.
This saves us 50KB in javascript assets...
This commit is contained in:
parent
c9752802e0
commit
5302087eba
6 changed files with 43 additions and 70 deletions
|
|
@ -98,8 +98,6 @@ import 'katex/dist/katex.css';
|
|||
|
||||
window.ClipboardJS = require('clipboard');
|
||||
|
||||
window.QRCode = require('qrcode');
|
||||
|
||||
require('../ts_src/ajax_ui');
|
||||
import {ajaxUI} from "../ts_src/ajax_ui";
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import {ajaxUI} from "./ajax_ui";
|
|||
import "bootbox";
|
||||
import "marked";
|
||||
import * as marked from "marked";
|
||||
import "qrcode";
|
||||
import {parse} from "marked";
|
||||
import * as ZXing from "@zxing/library";
|
||||
|
||||
|
|
@ -510,15 +509,6 @@ $(document).on("ajaxUI:start ajaxUI:reload attachment:create", function() {
|
|||
$('select.attachment_type_selector').change(updater).each(updater);
|
||||
});
|
||||
|
||||
$(document).on("ajaxUI:start ajaxUI:reload", function() {
|
||||
$('.qrcode').each(function() {
|
||||
let canvas = $(this);
|
||||
//@ts-ignore
|
||||
QRCode.toCanvas(canvas[0], canvas.data('content'), function(error) {
|
||||
if(error) console.error(error);
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on("ajaxUI:start ajaxUI:reload", function() {
|
||||
function setTooltip(btn, message) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue