diff --git a/webapp/templates/imaging.html b/webapp/templates/imaging.html
index d5a6a31..6e98efa 100644
--- a/webapp/templates/imaging.html
+++ b/webapp/templates/imaging.html
@@ -2,7 +2,18 @@
{% block title %}Imaging Progress - PXE Server Manager{% endblock %}
{% block extra_head %}
-
+{# JS-driven refresh instead of meta http-equiv so we can cancel it while a #}
+{# LAPS-password QR is showing (otherwise the 5s reload wipes the in-page #}
+{# state every cycle). #}
+
{% endblock %}
{% block content %}
@@ -240,6 +251,7 @@ function renderLapsQR(card) {
container.innerHTML = qr.createImgTag(cellSize, 4);
makeBtn.style.display = 'none';
clearBtn.style.display = '';
+ cancelImagingReload(); // freeze page refresh while QR is visible
var remaining = 60;
timerEl.textContent = '(auto-clears in ' + remaining + 's)';
if (card._lapsTimer) clearInterval(card._lapsTimer);
@@ -264,6 +276,10 @@ function clearLapsQR(card) {
timerEl.textContent = '';
makeBtn.style.display = '';
clearBtn.style.display = 'none';
+ // Resume page refresh now that no QR is showing on any card.
+ if (!document.querySelector('.laps-qr-container img')) {
+ scheduleImagingReload();
+ }
}
document.addEventListener('click', function(e) {
var card;