Added empty file list indicator. Removed dropzone.js

This commit is contained in:
Masu Baumgartner 2024-05-06 09:44:38 +02:00
parent b4251a0f1f
commit 406f7cad65
4 changed files with 14 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -26,7 +26,6 @@ public class FileManagerFeature : MoonlightFeature
var config = new ConfigService<CoreConfiguration>(PathBuilder.File("storage", "configs", "core.json"));
context.Builder.Services.AddSingleton(new JwtService<FileManagerJwtType>(config.Get().Security.Token));
context.AddAsset("FileManager", "js/dropzone.js");
context.AddAsset("FileManager", "js/filemanager.js");
context.AddAsset("FileManager", "editor/ace.css");
context.AddAsset("FileManager", "editor/ace.js");

View file

@ -30,7 +30,11 @@ public class FileManagerInteropService
public async Task UpdateUrl(string urlId, string url)
{
await JsRuntime.InvokeVoidAsync("filemanager.updateUrl", urlId, url);
try
{
await JsRuntime.InvokeVoidAsync("filemanager.updateUrl", urlId, url);
}
catch (TaskCanceledException) { /* ignored */ }
}
[JSInvokable]

View file

@ -209,6 +209,15 @@
}
</tbody>
</table>
@if (Entries.Length == 0)
{
<div class="py-4">
<IconAlert Color="primary" Title="No files and folders found" Icon="bx-cloud-upload">
Drag and drop files and folders here to start uploading them or click on the upload button on the top
</IconAlert>
</div>
}
</div>
@if (EnableContextMenu && ContextMenuTemplate != null)