mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-15 01:32:57 -07:00
Update QR code generation with kjua
This commit is contained in:
parent
27cacb7a8f
commit
fee25a6aea
3 changed files with 19 additions and 9 deletions
|
@ -4507,4 +4507,9 @@ a.donate-with-crypto::after {
|
|||
opacity: 1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#api_qr_code {
|
||||
padding: 1px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
|
|
@ -88,6 +88,16 @@ DOCUMENTATION :: END
|
|||
$('#api_qr_https').toggle((protocol === 'http:'));
|
||||
}
|
||||
|
||||
function generateQRCode(url) {
|
||||
$('#api_qr_code').empty().kjua({
|
||||
text: url + '|' + $('#api_qr_token').val(),
|
||||
render: 'canvas',
|
||||
ecLevel: 'H',
|
||||
size: 256,
|
||||
fill: '#000'
|
||||
});
|
||||
}
|
||||
|
||||
var verifiedDevice = false;
|
||||
$('#register-mobile-device').click(function () {
|
||||
verifiedDevice = false;
|
||||
|
@ -98,9 +108,7 @@ DOCUMENTATION :: END
|
|||
$.get('generate_api_key', { device: true }).then(function (token) {
|
||||
$('#api_qr_address').val(url);
|
||||
$('#api_qr_token').val(token);
|
||||
$('#api_qr_code').empty().qrcode({
|
||||
text: url + '|' + token
|
||||
});
|
||||
generateQRCode(url);
|
||||
|
||||
(function poll() {
|
||||
setTimeout(function () {
|
||||
|
@ -135,10 +143,7 @@ DOCUMENTATION :: END
|
|||
this.value = $.trim(this.value);
|
||||
var url = $(this).val();
|
||||
checkQRAddress(url);
|
||||
|
||||
$('#api_qr_code').empty().qrcode({
|
||||
text: url + '|' + $('#api_qr_token').val()
|
||||
});
|
||||
generateQRCode(url);
|
||||
});
|
||||
|
||||
$('#api-qr-modal').on('hide.bs.modal', function () {
|
||||
|
|
|
@ -2121,7 +2121,7 @@ Rating: {rating}/10 --> Rating: /10
|
|||
<script src="${http_root}js/parsley.min.js"></script>
|
||||
<script src="${http_root}js/Sortable.min.js"></script>
|
||||
<script src="${http_root}js/jquery.inputaffix.min.js"></script>
|
||||
<script src="${http_root}js/jquery.qrcode.min.js"></script>
|
||||
<script src="${http_root}js/kjua.min.js"></script>
|
||||
<script>
|
||||
function getConfigurationTable() {
|
||||
$.ajax({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue