mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
WebUI: Improve sort order in Status column
This commit adds custom compare function to Status column (same sort order as in the GUI). Closes #15499. PR #21570.
This commit is contained in:
@@ -1102,6 +1102,10 @@ window.qBittorrent.DynamicTable ??= (() => {
|
||||
td.title = status;
|
||||
};
|
||||
|
||||
this.columns["status"].compareRows = function(row1, row2) {
|
||||
return compareNumbers(row1.full_data._statusOrder, row2.full_data._statusOrder);
|
||||
};
|
||||
|
||||
// priority
|
||||
this.columns["priority"].updateTd = function(td, row) {
|
||||
const queuePos = this.getRowValue(row);
|
||||
|
||||
Reference in New Issue
Block a user