mirror of
https://github.com/DeNNiiInc/UltyScan.git
synced 2026-04-17 20:35:59 +00:00
Fix scan status detection and add stop button in header
This commit is contained in:
@@ -209,6 +209,7 @@ let statusInterval = null;
|
||||
|
||||
async function checkScanStatus() {
|
||||
const statusBadge = document.getElementById("scan-status");
|
||||
const stopBtn = document.getElementById("stop-scan-btn");
|
||||
if (!statusBadge) return;
|
||||
|
||||
try {
|
||||
@@ -218,10 +219,12 @@ async function checkScanStatus() {
|
||||
if (result.running) {
|
||||
statusBadge.className = "status-badge status-running";
|
||||
statusBadge.innerHTML = '<span class="spinner"></span> Scan Running';
|
||||
if (stopBtn) stopBtn.style.display = "inline-flex";
|
||||
startStatusPolling();
|
||||
} else {
|
||||
statusBadge.className = "status-badge status-idle";
|
||||
statusBadge.textContent = "Idle";
|
||||
if (stopBtn) stopBtn.style.display = "none";
|
||||
stopStatusPolling();
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user