Add resolution indicator

This commit is contained in:
Alexander Wainwright
2025-12-18 19:13:50 +10:00
parent e20ae120af
commit 5b8583cf85
2 changed files with 7 additions and 1 deletions

View File

@@ -140,7 +140,10 @@
<section class="pane preview-pane">
<div class="sticky-wrapper">
<div style="display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:0.5rem;">
<span style="font-family:var(--font-mono); font-weight:700; font-size:0.8rem;">PREVIEW</span>
<span id="resolution-display" style="font-family:var(--font-mono); font-size:0.7rem; opacity:0.6;">256 x 256 px</span>
</div>
<div id="qr-container"> </div>
<button id="btn-download" disabled>DOWNLOAD PNG</button>

View File

@@ -160,6 +160,9 @@ document.addEventListener('DOMContentLoaded', () => {
if (size < 64) size = 64;
if (size > 4000) size = 4000;
const resDisplay = document.getElementById('resolution-display');
if (resDisplay) resDisplay.textContent = `${size} x ${size} px`;
try {
const instance = new QRCode(qrContainer, {
text: textData,