mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-02 03:52:11 +08:00
Galaxy WebUI: Unload speed limit panel
This commit is contained in:
@@ -91,7 +91,18 @@ export function SpeedLimits() {
|
||||
fetchStatus()
|
||||
|
||||
if (pollTimer === null) {
|
||||
pollTimer = setInterval(fetchStatus, 3000)
|
||||
pollTimer = setInterval(() => {
|
||||
if (window.location.pathname !== "/download_speed_limits") {
|
||||
clearInterval(pollTimer)
|
||||
pollTimer = null
|
||||
state.fetched = false
|
||||
return
|
||||
}
|
||||
if (document.visibilityState !== "visible") {
|
||||
return
|
||||
}
|
||||
fetchStatus()
|
||||
}, 3000)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user