mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
webui (js): feature: Added complete support for labels (add/set/reset/display/filter) #648
Changes: - added list of labels on the lower-left corner - added support to add/set/reset labels on context menu - added support to filter torrents by label
This commit is contained in:
committed by
ngosang
parent
76d93c23b7
commit
4ae2f6c33b
@@ -60,6 +60,7 @@ var dynamicTable = new Class({
|
||||
this.newColumn('upspeed', 'width: 100px; cursor: pointer', 'QBT_TR(Up Speed)QBT_TR');
|
||||
this.newColumn('eta', 'width: 100px; cursor: pointer', 'QBT_TR(ETA)QBT_TR');
|
||||
this.newColumn('ratio', 'width: 100px; cursor: pointer', 'QBT_TR(Ratio)QBT_TR');
|
||||
this.newColumn('label', 'width: 100px; cursor: pointer', 'QBT_TR(Label)QBT_TR');
|
||||
|
||||
this.columns['state_icon'].onclick = '';
|
||||
this.columns['state_icon'].dataProperties[0] = 'state';
|
||||
@@ -279,10 +280,13 @@ var dynamicTable = new Class({
|
||||
break;
|
||||
}
|
||||
|
||||
if (labelName == null)
|
||||
if (labelName == LABELS_ALL && row['full_data'].label.length > 0)
|
||||
return true;
|
||||
|
||||
if (labelName != row['full_data'].label)
|
||||
if (labelName == LABELS_UNLABELLED && row['full_data'].label.length === 0)
|
||||
return true;
|
||||
|
||||
if (labelName != genHash( row['full_data'].label) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user