mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
37 lines
813 B
Plaintext
37 lines
813 B
Plaintext
@page "/gallery"
|
|
@layout Shared.MainLayout
|
|
@using Wabbajack.Networking.WabbajackClientApi;
|
|
@using Wabbajack.DTOs
|
|
|
|
@inject Client _client
|
|
|
|
<div id="content">
|
|
@foreach (ModlistMetadata item in _listItems)
|
|
{
|
|
<ModlistItem Metadata=@item></ModlistItem>
|
|
}
|
|
</div>
|
|
|
|
@code {
|
|
|
|
List<ModlistMetadata> _listItems = new();
|
|
|
|
protected override async Task<Task> OnAfterRenderAsync(bool firstRender)
|
|
{
|
|
if (!firstRender) return base.OnAfterRenderAsync(firstRender);
|
|
|
|
try
|
|
{
|
|
ModlistMetadata[] modLists = await _client.LoadLists();
|
|
_listItems = modLists.ToList();
|
|
StateHasChanged();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Console.WriteLine(ex);
|
|
}
|
|
|
|
return base.OnAfterRenderAsync(firstRender);
|
|
}
|
|
|
|
} |