refactor(admin): remove DOMContentLoaded listener for watch status initialization

- Remove document.addEventListener("DOMContentLoaded") wrapper for loadWatchStatus()
- Simplify initialization - loadWatchStatus() is now called via Alpine.js x-init
- Reduces 4 lines, keeps same functionality

The loadWatchStatus() function is now triggered by template's x-init directive
instead of a global DOMContentLoaded listener, ensuring it only runs on the
admin page where it's actually needed.
This commit is contained in:
2026-03-12 17:21:38 -04:00
parent 4d186f76dc
commit b06ffa2329
-4
View File
@@ -328,10 +328,6 @@ async function loadWatchStatus(): Promise<void> {
}
}
document.addEventListener("DOMContentLoaded", function () {
loadWatchStatus();
});
let scanPollInterval: ReturnType<typeof setInterval> | undefined = undefined;
function stopScanStatusPolling(): void {