mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-25 23:46:51 +00:00
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:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user