Download plugin have progress status

This commit is contained in:
2024-12-25 15:05:20 +02:00
parent a754b0e5a9
commit 49fe637455
10 changed files with 146 additions and 57 deletions

View File

@@ -2,6 +2,7 @@
@using DiscordBotWebUI.Components.CustomTags
@using DiscordBotWebUI.Models
@using DiscordBotWebUI.ServerCommunication
@inject DialogService DialogService
<Marketplace PluginModels="_PluginModels" OnPluginDownloadClick="OnModelSelected"/>
@@ -20,12 +21,22 @@
});
if(!response.Success)
{
Console.WriteLine(response.Message);
return;
}
Console.WriteLine("Plugin installed");
await DialogService.OpenAsync<ProgressDialog>($"Installing {itemName}", new Dictionary<string, object>()
{
{"ProgressUrl", "/plugin/download/progress"},
{"FirstMessage", itemName}
}, new DialogOptions()
{
Draggable = false,
CloseDialogOnEsc = false,
CloseDialogOnOverlayClick = false,
ShowClose = false
});
}
protected override async Task OnInitializedAsync()