mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06: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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user