mirror of
https://gitplac.si/aljaxus/upn-qr.git
synced 2025-12-17 04:00:59 +00:00
show fallback image to user if QR code data is invalid
This commit is contained in:
BIN
src/public/invalid-content.png
Normal file
BIN
src/public/invalid-content.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
@@ -105,7 +105,7 @@ function updateQR (e) {
|
||||
["issuer_address", val("issuer-address")],
|
||||
["issuer_city", val("issuer-city")],
|
||||
].map(v => `${v[0]}=${v[1]}`).join("&")
|
||||
qrcode.style.setProperty('background-image', `url("/api/qrcode?${qstring}")`)
|
||||
qrcode.style.setProperty('background-image', `url("/api/qrcode?${qstring}"), url("/public/invalid-content.png")`)
|
||||
}
|
||||
btn.addEventListener("click", updateQR)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user