diff --git a/public/nodes.js b/public/nodes.js
index d820c9a..444867f 100644
--- a/public/nodes.js
+++ b/public/nodes.js
@@ -593,9 +593,21 @@
const qr = qrcode(0, 'M');
qr.addData(meshcoreUrl);
qr.make();
- qrEl.innerHTML = `
Scan with MeshCore app to add contact
` + qr.createSvgTag(3, 0);
+ const isOverlay = !!qrEl.closest('.node-map-qr-overlay');
+ qrEl.innerHTML = (isOverlay ? '' : `Scan with MeshCore app to add contact
`) + qr.createSvgTag(3, 0);
const svg = qrEl.querySelector('svg');
- if (svg) { svg.style.display = 'block'; svg.style.margin = '0 auto'; }
+ if (svg) {
+ svg.style.display = 'block'; svg.style.margin = '0 auto';
+ // Make QR background transparent for map overlay
+ if (isOverlay) {
+ svg.querySelectorAll('rect').forEach(r => {
+ const fill = (r.getAttribute('fill') || '').toLowerCase();
+ if (fill === '#ffffff' || fill === 'white' || fill === '#fff') {
+ r.setAttribute('fill', 'transparent');
+ }
+ });
+ }
+ }
} catch {}
}
diff --git a/public/style.css b/public/style.css
index f941c0d..29de33a 100644
--- a/public/style.css
+++ b/public/style.css
@@ -1118,9 +1118,7 @@ button.ch-item.ch-item-encrypted .ch-badge { filter: grayscale(0.6); }
[data-theme="dark"] .node-qr svg rect[fill="#000000"] { fill: var(--text); }
.node-map-qr-wrap { position: relative; }
.node-map-qr-overlay { position: absolute; bottom: 8px; right: 8px; z-index: 400; background: none; border: none; padding: 0; }
-.node-map-qr-overlay svg { max-width: 64px; display: block; }
-.node-map-qr-overlay svg rect[fill="#ffffff"] { fill-opacity: 0.1; }
-[data-theme="dark"] .node-map-qr-overlay svg rect[fill="#ffffff"] { fill-opacity: 0.1; }
+.node-map-qr-overlay svg { max-width: 64px; display: block; opacity: 0.7; }
[data-theme="dark"] .node-map-qr-overlay svg rect[fill="#000000"] { fill: var(--text); }
/* Replay on Live Map button in packet detail */