fix qr code overflow: remove fixed height on container, pass size to QRCode lib, add max-width to canvas
This commit is contained in:
@@ -151,8 +151,8 @@ tbody tr:hover{background:color-mix(in srgb,var(--accent-soft) 50%,transparent)}
|
||||
.invoice .row:last-child{border-bottom:0}
|
||||
.invoice .row span:first-child{color:var(--muted)}
|
||||
.invoice .row span:last-child{font-family:var(--mono);text-align:right;word-break:break-all}
|
||||
#qrcode{margin:18px auto 4px;width:160px;height:160px}
|
||||
#qrcode img{width:160px;height:160px}
|
||||
#qrcode{margin:18px auto 4px;width:160px}
|
||||
#qrcode canvas,#qrcode img{width:160px!important;height:160px!important;max-width:100%}
|
||||
.ok-line{color:var(--ok);font-weight:600;font-size:14px;margin-bottom:14px}
|
||||
.err-line{color:#d32f2f;font-weight:600;font-size:14px;margin-bottom:14px}
|
||||
.terms-box{display:none;margin:16px 0;padding:20px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius)}
|
||||
@@ -525,7 +525,7 @@ document.getElementById('submit').addEventListener('click', async () => {
|
||||
const invoiceuri = `bitcoin:${result.address}?label=BAL&message=Order+For+url+%26+${encodeURIComponent(url)}`;
|
||||
const qrEl = document.getElementById('qrcode');
|
||||
qrEl.innerHTML = '';
|
||||
new QRCode(qrEl, invoiceuri);
|
||||
new QRCode(qrEl, { text: invoiceuri, width: 160, height: 160 });
|
||||
const shareBtn = document.getElementById('share-btn');
|
||||
shareBtn.textContent = 'Share invoice';
|
||||
shareBtn.onclick = function () {
|
||||
|
||||
Reference in New Issue
Block a user