diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a910f1c7788f..816654ef8f10 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 | diff --git a/src/webui/www/private/css/style.css b/src/webui/www/private/css/style.css index 4387c43a268b..554a91954166 100644 --- a/src/webui/www/private/css/style.css +++ b/src/webui/www/private/css/style.css @@ -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; } diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index ce0e7d2ebc8a..24850e3a0fcf 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -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); diff --git a/src/webui/www/private/views/search.html b/src/webui/www/private/views/search.html index 338274e39d4f..558f96b7235b 100644 --- a/src/webui/www/private/views/search.html +++ b/src/webui/www/private/views/search.html @@ -18,14 +18,15 @@ width: 150px; } - #searchResultsNoPlugins { + #searchResultsNoPlugins, + #searchResultsNoSearches { height: calc(100% - 110px); - } - #searchResultsNoPlugins table { - height: 100%; - width: 100%; - text-align: center; + table { + height: 100%; + width: 100%; + text-align: center; + } } #searchResultsFilters { @@ -75,9 +76,9 @@
-
-
- +
+
+ @@ -99,7 +100,25 @@
-
+ + + + +