mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-04-21 20:12:33 +03:00
Merge pull request #4 from armisss4/revert-3-QR-code-filename-fix
Revert "Qr code filename fix for downloading"
This commit is contained in:
commit
6eeaf09801
1 changed files with 1 additions and 7 deletions
|
@ -70,9 +70,7 @@ Wireguard Clients
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<input type="hidden" id="qr_client_id" name="qr_client_id">
|
<input type="hidden" id="qr_client_id" name="qr_client_id">
|
||||||
<a href="" download="" id="qr_code_a">
|
<img id="qr_code" class="w-100" style="image-rendering: pixelated;" src="" alt="QR code" />
|
||||||
<img id="qr_code" class="w-100" style="image-rendering: pixelated;" src="" alt="QR code" />
|
|
||||||
</a>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="icheck-primary d-inline">
|
<div class="icheck-primary d-inline">
|
||||||
<input type="checkbox" id="qr_include_fwmark" onchange="regenerateQRCode()">
|
<input type="checkbox" id="qr_include_fwmark" onchange="regenerateQRCode()">
|
||||||
|
@ -393,7 +391,6 @@ Wireguard Clients
|
||||||
function regenerateQRCode() {
|
function regenerateQRCode() {
|
||||||
const client_id = $("#qr_client_id").val();
|
const client_id = $("#qr_client_id").val();
|
||||||
const QRCodeImg = $("#qr_code");
|
const QRCodeImg = $("#qr_code");
|
||||||
const QRCodeA = $("#qr_code_a");
|
|
||||||
let include_fwmark = false;
|
let include_fwmark = false;
|
||||||
if ($("#qr_include_fwmark").is(':checked')){
|
if ($("#qr_include_fwmark").is(':checked')){
|
||||||
include_fwmark = true;
|
include_fwmark = true;
|
||||||
|
@ -413,9 +410,6 @@ Wireguard Clients
|
||||||
|
|
||||||
$(".modal-title").text("Scan QR Code for " + client.name + " profile");
|
$(".modal-title").text("Scan QR Code for " + client.name + " profile");
|
||||||
QRCodeImg.attr('src', resp.QRCode).show();
|
QRCodeImg.attr('src', resp.QRCode).show();
|
||||||
QRCodeA.attr('download', resp.Client.name);
|
|
||||||
QRCodeA.attr('href', resp.QRCode).show();
|
|
||||||
|
|
||||||
},
|
},
|
||||||
error: function (jqXHR, exception) {
|
error: function (jqXHR, exception) {
|
||||||
const responseJson = jQuery.parseJSON(jqXHR.responseText);
|
const responseJson = jQuery.parseJSON(jqXHR.responseText);
|
||||||
|
|
Loading…
Add table
Reference in a new issue