fix(web): replace location.reload() with load() to prevent page flashing and preserve search/scroll states during node switching

This commit is contained in:
baoweise
2026-05-28 22:36:17 +08:00
parent 7e7fcecfd0
commit 174b5b7d2a
+3 -3
View File
@@ -2669,12 +2669,12 @@ function startConnectionPolling() {
try {
await fetch("./api/test_proxy", { method: "POST" });
} catch(pe){}
location.reload();
load();
}
} catch(pe) {
clearInterval(pollInterval);
pollInterval = null;
location.reload();
load();
}
}, 1000);
}
@@ -2725,7 +2725,7 @@ async function disconnectNode(){
try {
await fetch("./api/test_proxy", { method: "POST" });
} catch(pe){}
location.reload();
load();
} else {
alert("断开连接失败: " + (result.error || "未知错误"));
}