mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 06:01:33 -06:00
WebUI: Show 'Edit tracker URL...' only when one tracker is selected
We can only edit one URL through the dialog, so there's no point in showing this context option when more than one tracker is selected in trackers table. PR #22311.
This commit is contained in:
@@ -138,8 +138,6 @@ window.qBittorrent.PropTrackers ??= (() => {
|
|||||||
addTrackerFN();
|
addTrackerFN();
|
||||||
},
|
},
|
||||||
EditTracker: (element, ref) => {
|
EditTracker: (element, ref) => {
|
||||||
// only allow editing of one row
|
|
||||||
element.firstElementChild.click();
|
|
||||||
editTrackerFN(element);
|
editTrackerFN(element);
|
||||||
},
|
},
|
||||||
RemoveTracker: (element, ref) => {
|
RemoveTracker: (element, ref) => {
|
||||||
@@ -162,7 +160,11 @@ window.qBittorrent.PropTrackers ??= (() => {
|
|||||||
this.hideItem("CopyTrackerUrl");
|
this.hideItem("CopyTrackerUrl");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.showItem("EditTracker");
|
if (selectedTrackers.length === 1)
|
||||||
|
this.showItem("EditTracker");
|
||||||
|
else
|
||||||
|
this.hideItem("EditTracker");
|
||||||
|
|
||||||
this.showItem("RemoveTracker");
|
this.showItem("RemoveTracker");
|
||||||
this.showItem("CopyTrackerUrl");
|
this.showItem("CopyTrackerUrl");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user