[Web] Fix slow UI by switching QR provider and only generating qr image on demand

This commit is contained in:
andryyy
2019-03-19 08:45:08 +01:00
parent ca2ac00422
commit 6a13609bf0
4 changed files with 25 additions and 2 deletions

View File

@@ -93,6 +93,15 @@ $(document).ready(function() {
}
if ($(this).val() == "totp") {
$('#TOTPModal').modal('show');
request_token = $('#tfa-qr-img').data('totp-secret');
$.ajax({
url: '/inc/ajax/qr_gen.php',
data: {
token: request_token,
},
}).done(function (result) {
$("#tfa-qr-img").attr("src", result);
});
$("option:selected").prop("selected", false);
}
if ($(this).val() == "u2f") {