Add direct link to QR code

This commit is contained in:
Yarmo Mackenbach 2020-07-22 15:47:00 +02:00
parent 41059ca76b
commit fac00bbbb8
3 changed files with 5 additions and 1 deletions

View file

@ -1055,6 +1055,7 @@ if (elUtilQR) {
if (elInput.value) { if (elInput.value) {
elInput.value = decodeURIComponent(elInput.value); elInput.value = decodeURIComponent(elInput.value);
qrcode.makeCode(`${elInput.value}`); qrcode.makeCode(`${elInput.value}`);
document.body.querySelector("#qrcode--altLink").href = elInput.value;
} else { } else {
qrcode.clear(); qrcode.clear();
} }

View file

@ -271,7 +271,9 @@ a.proofUrl.proofUrl--verified, a.proofQR {
color: #499539; color: #499539;
} }
#qrcode img { #qrcode {
display: flex;
justify-content: center;
max-width: 100%; max-width: 100%;
margin: 32px auto 16px; margin: 32px auto 16px;
} }

View file

@ -6,4 +6,5 @@
<input type="txt" name="input" id="input" class="full-width" readonly placeholder="Fingerprint" value="<?=$this->escape($input)?>"> <input type="txt" name="input" id="input" class="full-width" readonly placeholder="Fingerprint" value="<?=$this->escape($input)?>">
</form> </form>
<div id="qrcode"></div> <div id="qrcode"></div>
<a id="qrcode--altLink" href="#">Press this link to directly open the URI</a>
</div> </div>