Added an basic form to add Google Authenticator.

This commit is contained in:
Jan Böhmer 2019-12-23 17:20:28 +01:00
parent 24672a30b9
commit 35b5640627
10 changed files with 277 additions and 3 deletions

View file

@ -23,6 +23,7 @@ import {ajaxUI} from "./ajax_ui";
import "bootbox";
import "marked";
import * as marked from "marked";
import "qrcode";
import {parse} from "marked";
/************************************
@ -458,6 +459,16 @@ $(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);
})
});
});
//Need for proper body padding, with every navbar height
$(window).resize(function () {
let height : number = $('#navbar').height() + 10;