WebUI: Add support for tracker status filter

This commit is contained in:
ivan
2025-05-24 11:28:38 -05:00
committed by Vladimir Golovnev (Glassez)
parent e309b17732
commit 44bb1ac7eb
10 changed files with 79 additions and 16 deletions

View File

@@ -620,11 +620,18 @@ window.qBittorrent.ContextMenu ??= (() => {
class TrackersFilterContextMenu extends FilterListContextMenu {
updateMenuItems() {
const id = this.options.element.id;
if ((id !== TRACKERS_ALL) && (id !== TRACKERS_TRACKERLESS))
this.showItem("deleteTracker");
else
this.hideItem("deleteTracker");
switch (this.options.element.id) {
case TRACKERS_ALL:
case TRACKERS_ANNOUNCE_ERROR:
case TRACKERS_ERROR:
case TRACKERS_TRACKERLESS:
case TRACKERS_WARNING:
this.hideItem("deleteTracker");
break;
default:
this.showItem("deleteTracker");
break;
}
this.updateTorrentActions();
}