fix: make Dashboard Files Download button work for a single selection

In mobile select mode the floating action bar appears with one item selected
(minCountForActionBar is 1) and shows an enabled Download button, but the
click handler only acted when 2+ rows were selected — so downloading a single
file did nothing.

Gate on `> 0` instead. window.zipItems already normalizes a single item to an
array, so the one-file case works. On desktop the bar only appears at 2+
selections, so this changes nothing there.
This commit is contained in:
jelveh
2026-07-16 19:50:36 -07:00
parent 8418520661
commit 6e92f2d3e6
+1 -1
View File
@@ -1291,7 +1291,7 @@ const TabFiles = {
// Download button
$actions.find('.download-btn').on('click', function () {
const selectedRows = document.querySelectorAll('.files-tab .row.selected');
if ( selectedRows.length >= 2 ) {
if ( selectedRows.length > 0 ) {
window.zipItems(Array.from(selectedRows), _this.currentPath, true);
}
});