From 65ae8c6eae25c84caa62f8baaaeca0bd088fc3c3 Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Sun, 13 Sep 2026 11:29:41 -0700 Subject: [PATCH] Dashboard Files: hide New Folder and Upload in the Shared view Shared is a query over other people's items, not a directory. Both buttons stayed visible there: New Folder did nothing, and Upload opened the OS file picker and then silently dropped whatever the user picked. Hide them the same way Trash already does. --- src/gui/src/UI/Dashboard/TabFiles.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/src/UI/Dashboard/TabFiles.js b/src/gui/src/UI/Dashboard/TabFiles.js index 03e44ed24..ae9010e81 100644 --- a/src/gui/src/UI/Dashboard/TabFiles.js +++ b/src/gui/src/UI/Dashboard/TabFiles.js @@ -1822,16 +1822,19 @@ const TabFiles = { * Updates header action buttons based on current folder context. * * Shows/hides new folder, upload, and empty trash buttons as appropriate. + * Neither Trash nor the Shared view (a query, not a directory) can have + * anything created or uploaded into it, so those two buttons stay out + * there rather than opening a picker whose files would be dropped. * * @param {boolean} isTrashFolder - Whether the current folder is the Trash * @returns {void} */ updateActionButtons (isTrashFolder) { const $pathActions = this.$el_window.find('.path-actions'); + const canCreate = ! isTrashFolder && this.currentPath !== window.shared_path; + $pathActions.find('.new-folder-btn, .upload-btn').toggle(canCreate); if ( isTrashFolder ) { - $pathActions.find('.new-folder-btn, .upload-btn').hide(); - if ( $pathActions.find('.empty-trash-btn').length === 0 ) { const emptyTrashBtn = $(``); $pathActions.append(emptyTrashBtn); @@ -1841,7 +1844,6 @@ const TabFiles = { } $pathActions.find('.empty-trash-btn').show(); } else { - $pathActions.find('.new-folder-btn, .upload-btn').show(); $pathActions.find('.empty-trash-btn').hide(); } },