mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-06 23:52:31 -06:00
WebUI: Clear properties panel when torrent no longer selected
PR #21654.
This commit is contained in:
committed by
GitHub
parent
e0431e3ffb
commit
c3c91be578
@@ -32,7 +32,8 @@ window.qBittorrent ??= {};
|
||||
window.qBittorrent.PropGeneral ??= (() => {
|
||||
const exports = () => {
|
||||
return {
|
||||
updateData: updateData
|
||||
updateData: updateData,
|
||||
clear: clear
|
||||
};
|
||||
};
|
||||
|
||||
@@ -83,7 +84,6 @@ window.qBittorrent.PropGeneral ??= (() => {
|
||||
if (current_id === "") {
|
||||
clearData();
|
||||
clearTimeout(loadTorrentDataTimer);
|
||||
loadTorrentDataTimer = loadTorrentData.delay(5000);
|
||||
return;
|
||||
}
|
||||
const url = new URI("api/v2/torrents/properties?hash=" + current_id);
|
||||
@@ -254,6 +254,10 @@ window.qBittorrent.PropGeneral ??= (() => {
|
||||
loadTorrentData();
|
||||
};
|
||||
|
||||
const clear = function() {
|
||||
clearData();
|
||||
};
|
||||
|
||||
return exports();
|
||||
})();
|
||||
Object.freeze(window.qBittorrent.PropGeneral);
|
||||
|
||||
Reference in New Issue
Block a user