fix: block autoupdate on any modal opened

This commit is contained in:
2025-07-14 21:12:33 +03:00
parent 228c2cce51
commit 53368468a4
2 changed files with 6 additions and 1 deletions

View File

@ -164,7 +164,7 @@
function toggleTableAutoReload(interval) {
clearInterval(tableAutoReloadTask);
tableAutoReloadTask = toggleAutoReload(tableAutoReloadButton, interval, tableAutoReloadInput, _ => {
if (!dashboardModal.classList.contains("show") &&
if (!hasActiveModal() &&
!hasActiveDropdown()) {
packagesLoad();
statusLoad();

View File

@ -68,6 +68,11 @@
.some(el => el.classList.contains("show"));
}
function hasActiveModal() {
return Array.from(document.querySelectorAll(".modal"))
.some(el => el.classList.contains("show"));
}
function headerClass(status) {
if (status === "pending") return ["bg-warning"];
if (status === "building") return ["bg-warning"];