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:
Timothy Jaeryang Baek committed 2026-03-04 16:48:01 -06:00
1 parent 4403c7b6c2
commit 49a2e5bf57
2 files changed
+29 -21

No files matched your search

+8 -1
View File
@@ -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}