mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-21 16:55:46 +03:00
WebUI: Show 'Rename...' context menu item only when one torrent is selected
'Rename...' item in torrents table menu is displayed only when exactly one torrent is selected. PR #21843.
This commit is contained in:
parent
f4eec75488
commit
e51fcc6ea0
1 changed files with 2 additions and 0 deletions
|
@ -392,6 +392,7 @@ window.qBittorrent.ContextMenu ??= (() => {
|
|||
const data = torrentsTable.getRow(selectedRows[0]).full_data;
|
||||
const metadata_downloaded = !((data["state"] === "metaDL") || (data["state"] === "forcedMetaDL") || (data["total_size"] === -1));
|
||||
|
||||
this.showItem("rename");
|
||||
// hide renameFiles when metadata hasn't been downloaded yet
|
||||
metadata_downloaded
|
||||
? this.showItem("renameFiles")
|
||||
|
@ -399,6 +400,7 @@ window.qBittorrent.ContextMenu ??= (() => {
|
|||
}
|
||||
else {
|
||||
this.hideItem("renameFiles");
|
||||
this.hideItem("rename");
|
||||
}
|
||||
|
||||
if (all_are_downloaded) {
|
||||
|
|
Loading…
Reference in a new issue