From 174b5b7d2a1ad6e1369e1f0b9cb511a751003386 Mon Sep 17 00:00:00 2001 From: baoweise Date: Thu, 28 May 2026 22:36:17 +0800 Subject: [PATCH] fix(web): replace location.reload() with load() to prevent page flashing and preserve search/scroll states during node switching --- vpngate_manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vpngate_manager.py b/vpngate_manager.py index f7d2ec4..5d330c2 100644 --- a/vpngate_manager.py +++ b/vpngate_manager.py @@ -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 || "未知错误")); }