WebUI: Cache server stats for statistics window

This change ensures that the WebUI caches relevant server stats for immediate display once the statistics window is opened. Previously, all stats would remain blank until maindata was fetched. This could take a while if e.g. the user was on the search tab.

Closes #22764.
PR #22817.
This commit is contained in:
Thomas Piccirello
2025-06-09 06:17:30 -07:00
committed by GitHub
parent 8aa1a96d71
commit 78fae0ae76
5 changed files with 93 additions and 15 deletions

View File

@@ -492,7 +492,10 @@ const initializeWindows = () => {
height: loadWindowHeight(id, 415),
onResize: window.qBittorrent.Misc.createDebounceHandler(500, (e) => {
saveWindowSize(id);
})
}),
onContentLoaded: () => {
window.qBittorrent.Statistics.render();
}
});
};