mirror of
https://github.com/baoweise-bot/aimili-vpngate.git
synced 2026-09-06 16:16:53 +08:00
fix(web): replace location.reload() with load() to prevent page flashing and preserve search/scroll states during node switching
This commit is contained in:
+3
-3
@@ -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 || "未知错误"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user