Skip to content

Commit

Permalink
Support running concurrent searches in Web UI
Browse files Browse the repository at this point in the history
Closes #12840.
  • Loading branch information
Piccirello committed Mar 25, 2024
1 parent b489262 commit 0d480c0
Show file tree
Hide file tree
Showing 4 changed files with 387 additions and 99 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ repos:
hooks:
- id: codespell
name: Check spelling (codespell)
args: ["--ignore-words-list", "additionals,curren,fo,ist,ket,superseeding,te,ths"]
args: ["--ignore-words-list", "additionals,curren,fo,ist,ket,searchin,superseeding,te,ths"]
exclude: |
(?x)^(
.*\.desktop |
Expand Down
6 changes: 3 additions & 3 deletions src/webui/www/private/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -636,9 +636,9 @@ td.statusBarSeparator {
}

#searchResultsTableContainer {
-moz-height: calc(100% - 140px);
-webkit-height: calc(100% - 140px);
height: calc(100% - 140px);
-moz-height: calc(100% - 177px);
-webkit-height: calc(100% - 177px);
height: calc(100% - 177px);
overflow: auto;
}

Expand Down
10 changes: 7 additions & 3 deletions src/webui/www/private/scripts/dynamicTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,16 +516,20 @@ window.qBittorrent.DynamicTable = (function() {
return LocalPreferences.get('sorted_column_' + this.dynamicTableDivId);
},

setSortedColumn: function(column) {
/**
* @param {string} column name to sort by
* @param {string|null} reverse defaults to implementation-specific behavior when not specified. Should only be passed when restoring previous state.
*/
setSortedColumn: function(column, reverse = null) {
if (column != this.sortedColumn) {
const oldColumn = this.sortedColumn;
this.sortedColumn = column;
this.reverseSort = '0';
this.reverseSort = reverse ?? '0';
this.setSortedColumnIcon(column, oldColumn, false);
}
else {
// Toggle sort order
this.reverseSort = this.reverseSort === '0' ? '1' : '0';
this.reverseSort = reverse ?? (this.reverseSort === '0' ? '1' : '0');
this.setSortedColumnIcon(column, null, (this.reverseSort === '1'));
}
LocalPreferences.set('sorted_column_' + this.dynamicTableDivId, column);
Expand Down
Loading

0 comments on commit 0d480c0

Please sign in to comment.