From 6736570ee70367af61a86b017ab4c83ad457def2 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Wed, 19 Jul 2023 15:45:12 -0400 Subject: [PATCH] FileManager modification to support ShowFolders = False --- Oqtane.Client/Modules/Controls/FileManager.razor | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Oqtane.Client/Modules/Controls/FileManager.razor b/Oqtane.Client/Modules/Controls/FileManager.razor index c37cef543..f6ee48c25 100644 --- a/Oqtane.Client/Modules/Controls/FileManager.razor +++ b/Oqtane.Client/Modules/Controls/FileManager.razor @@ -168,7 +168,21 @@ ShowSuccess = true; } - _folders = await FolderService.GetFoldersAsync(ModuleState.SiteId); + if (ShowFolders) + { + _folders = await FolderService.GetFoldersAsync(ModuleState.SiteId); + } + else + { + if (FolderId != -1) + { + var folder = await FolderService.GetFolderAsync(FolderId); + if (folder != null) + { + _folders = new List { folder }; + } + } + } if (!string.IsNullOrEmpty(Folder) && Folder != Constants.PackagesFolder) {