This commit is contained in:
truewhile
2026-09-04 11:56:29 +08:00
parent cc40169616
commit 203abd106a
72 changed files with 1979 additions and 1155 deletions
+4 -1
View File
@@ -95,7 +95,10 @@ export function StrmManagePage() {
// 有进行中的同步时轮询刷新状态
useEffect(() => {
if (!paths.some((p) => p.last_sync_status === 'running')) return
const timer = setInterval(() => refresh().catch(() => undefined), 4000)
const timer = setInterval(() => {
if (document.hidden) return
refresh().catch(() => undefined)
}, 4000)
return () => clearInterval(timer)
}, [paths, refresh])