From 923a3c18b8cd65e0fbd201ac8c8f544d2ed372bb Mon Sep 17 00:00:00 2001 From: Masu Baumgartner Date: Mon, 13 May 2024 16:20:38 +0200 Subject: [PATCH] Started adding archive ui --- Moonlight/Features/FileManager/FileManagerFeature.cs | 1 + Moonlight/Features/FileManager/UI/Components/FileManager.razor | 3 ++- Moonlight/Features/FileManager/UI/Components/FileView.razor | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Moonlight/Features/FileManager/FileManagerFeature.cs b/Moonlight/Features/FileManager/FileManagerFeature.cs index c3171a6..029e9ff 100644 --- a/Moonlight/Features/FileManager/FileManagerFeature.cs +++ b/Moonlight/Features/FileManager/FileManagerFeature.cs @@ -57,6 +57,7 @@ public class FileManagerFeature : MoonlightFeature await pluginService.RegisterImplementation(new DeleteContextAction()); await pluginService.RegisterImplementation(new MoveSelectionAction()); + await pluginService.RegisterImplementation(new ArchiveSelectionAction()); await pluginService.RegisterImplementation(new DeleteSelectionAction()); await pluginService.RegisterImplementation(new CreateFileAction()); diff --git a/Moonlight/Features/FileManager/UI/Components/FileManager.razor b/Moonlight/Features/FileManager/UI/Components/FileManager.razor index 16e3701..e51c145 100644 --- a/Moonlight/Features/FileManager/UI/Components/FileManager.razor +++ b/Moonlight/Features/FileManager/UI/Components/FileManager.razor @@ -95,7 +95,8 @@ else OnEntryClicked="OnEntryClicked" OnNavigateUpClicked="OnNavigateUpClicked" OnSelectionChanged="OnSelectionChanged" - EnableContextMenu="true"> + EnableContextMenu="true" + ShowUploadPrompt="true"> @foreach (var action in ContextActions) { diff --git a/Moonlight/Features/FileManager/UI/Components/FileView.razor b/Moonlight/Features/FileManager/UI/Components/FileView.razor index 8970f4d..aabdae0 100644 --- a/Moonlight/Features/FileManager/UI/Components/FileView.razor +++ b/Moonlight/Features/FileManager/UI/Components/FileView.razor @@ -210,7 +210,7 @@ - @if (Entries.Length == 0) + @if (Entries.Length == 0 && ShowUploadPrompt) {
@@ -240,6 +240,7 @@ [Parameter] public bool ShowDate { get; set; } = true; [Parameter] public bool ShowSelect { get; set; } = true; [Parameter] public bool ShowNavigateUp { get; set; } = true; + [Parameter] public bool ShowUploadPrompt { get; set; } = false; [Parameter] public RenderFragment? ContextMenuTemplate { get; set; } [Parameter] public bool EnableContextMenu { get; set; } = false;