mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-06 21:21:24 -07:00
Add ability to display torrent "privateness" in UI
PR #20951. --------- Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com> Co-authored-by: Vladimir Golovnev <glassez@yandex.ru> Co-authored-by: thalieht <thalieht@users.noreply.github.com>
This commit is contained in:
parent
a4f63a5c30
commit
87a202c71e
13 changed files with 183 additions and 85 deletions
|
@ -948,6 +948,7 @@ window.qBittorrent.DynamicTable = (function() {
|
|||
this.newColumn("last_activity", "", "QBT_TR(Last Activity)QBT_TR[CONTEXT=TransferListModel]", 100, false);
|
||||
this.newColumn("availability", "", "QBT_TR(Availability)QBT_TR[CONTEXT=TransferListModel]", 100, false);
|
||||
this.newColumn("reannounce", "", "QBT_TR(Reannounce In)QBT_TR[CONTEXT=TransferListModel]", 100, false);
|
||||
this.newColumn("private", "", "QBT_TR(Private)QBT_TR[CONTEXT=TransferListModel]", 100, false);
|
||||
|
||||
this.columns["state_icon"].onclick = "";
|
||||
this.columns["state_icon"].dataProperties[0] = "state";
|
||||
|
@ -1331,6 +1332,19 @@ window.qBittorrent.DynamicTable = (function() {
|
|||
td.set("text", time);
|
||||
td.set("title", time);
|
||||
};
|
||||
|
||||
// private
|
||||
this.columns["private"].updateTd = function(td, row) {
|
||||
const hasMetadata = row["full_data"].has_metadata;
|
||||
const isPrivate = this.getRowValue(row);
|
||||
const string = hasMetadata
|
||||
? (isPrivate
|
||||
? "QBT_TR(Yes)QBT_TR[CONTEXT=PropertiesWidget]"
|
||||
: "QBT_TR(No)QBT_TR[CONTEXT=PropertiesWidget]")
|
||||
: "QBT_TR(N/A)QBT_TR[CONTEXT=PropertiesWidget]";
|
||||
td.set("text", string);
|
||||
td.set("title", string);
|
||||
};
|
||||
},
|
||||
|
||||
applyFilter: function(row, filterName, categoryHash, tagHash, trackerHash, filterTerms) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue