Skip to content

Commit 6035857

Browse files
committed
Immediate maintenance mode saving, bug fix
Fixes #519
1 parent 623c568 commit 6035857

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/checker/admin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,6 +1296,7 @@ try {
12961296
document.querySelectorAll("#create-and-exit-button").forEach(w => w.addEventListener("click", () => {
12971297
createSegment(null, true);
12981298
}));
1299+
document.querySelectorAll("#maintenance-mode").forEach(w => w.addEventListener("change", save));
12991300

13001301
async function save(event, hideResult) {
13011302
if (!active) return;

src/modules/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ export async function bulkLoad(fields = [], usr = null, pwd = null, isAdmin = fa
798798
if ((fetchedBulkLoad.error === "Access denied.") || (fetchedBulkLoad.message === "Access denied.")) ifAccessDenied();
799799
return false;
800800
}
801-
if (fetchedBulkLoad.maintenanceMode && (window.location.pathName !== '/admin/logs')) {
801+
if (fetchedBulkLoad.maintenanceMode && !window.location.pathname.startsWith('/admin')) {
802802
ui.startLoader();
803803
ui.view("maintenance-mode");
804804
return false;

0 commit comments

Comments
 (0)