feat: show refresh button when viewing files, not just directories
- Move refresh button out of directory-only block in FileNavToolbar - When viewing a file, refresh reloads that file's content - When in directory view, refresh reloads the listing (unchanged)
This commit is contained in:
1 parent
4403c7b6c2
commit
49a2e5bf57
2 files changed
+29
-21
No files matched your search
@@ -609,7 +609,14 @@
|
||||
{selectedFile}
|
||||
{loading}
|
||||
onNavigate={loadDir}
|
||||
onRefresh={() => loadDir(currentPath)}
|
||||
onRefresh={() => {
|
||||
if (selectedFile) {
|
||||
const fileName = selectedFile.split('/').pop() ?? '';
|
||||
openEntry({ name: fileName, type: 'file', size: 0 });
|
||||
} else {
|
||||
loadDir(currentPath);
|
||||
}
|
||||
}}
|
||||
onNewFolder={startNewFolder}
|
||||
onNewFile={startNewFile}
|
||||
onUploadFiles={handleUploadFiles}
|
||||
|
||||
Reference in new issue
Block a user