landings: QR center logo as PNG for Android (full Taler wordmark)

Android WebView often failed the official Penpot SVG: root fill=none
and wordmark paths only inherited black from a parent <g>, so the blue
T showed without the "taler" letters. Serve taler-assets qr-logo.png,
keep fixed SVG as fallback, explicit logo size/alt.
This commit is contained in:
Hernâni Marques 2026-07-10 22:12:00 +02:00
parent 6e808c2ab1
commit 96c37cae3c
No known key found for this signature in database
9 changed files with 46 additions and 15 deletions

View file

@ -3,7 +3,7 @@
* Flow: POST templates/{id} taler://pay/… + payto links.
*
* QR display matches taler-merchant-webui QR_Taler
* (@gnu-taler/web-util QR.tsx): animated #0042B3 conic ring + qr-logo.svg.
* (@gnu-taler/web-util QR.tsx): animated #0042B3 conic ring + qr-logo.png.
* Uses qrcode-generator (same lib as webui) via global QRCode if present,
* else falls back to canvas from qrcode.min.js (davidshimjs).
*/
@ -21,7 +21,8 @@
}
function logoSrc() {
return introBase() + "qr-logo.svg";
/* PNG: Android often drops SVG wordmark fill inheritance (missing "taler") */
return introBase() + "qr-logo.png";
}
function templateHttps(productId) {
@ -214,9 +215,13 @@
function setLogo(imgEl) {
if (!imgEl) return;
imgEl.alt = "Taler";
imgEl.width = 100;
imgEl.height = 50;
imgEl.decoding = "async";
imgEl.src = logoSrc();
imgEl.onerror = function () {
imgEl.style.display = "none";
imgEl.src = introBase() + "qr-logo.svg";
};
imgEl.style.display = "";
}