2022-01-09 13:33:22 +00:00
|
|
|
@page "/gallery"
|
|
|
|
@layout Shared.MainLayout
|
|
|
|
|
|
|
|
@using Wabbajack.Networking.WabbajackClientApi;
|
|
|
|
@using System.Linq;
|
|
|
|
@using Wabbajack.DTOs
|
|
|
|
|
|
|
|
@inject Client _client
|
|
|
|
|
|
|
|
<div id="content">
|
2022-01-11 03:00:54 +00:00
|
|
|
@if (_listItems.Count > 0)
|
2022-01-09 13:33:22 +00:00
|
|
|
{
|
2022-01-11 03:00:54 +00:00
|
|
|
foreach (ModlistMetadata item in _listItems)
|
|
|
|
{
|
|
|
|
<ModlistItem Metadata=@item></ModlistItem>
|
|
|
|
}
|
2022-01-09 13:33:22 +00:00
|
|
|
}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@code {
|
2022-01-11 03:00:54 +00:00
|
|
|
List<ModlistMetadata> _listItems = new();
|
2022-01-09 13:33:22 +00:00
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
ModlistMetadata[] modLists = await _client.LoadLists();
|
2022-01-11 03:00:54 +00:00
|
|
|
_listItems = modLists.ToList();
|
2022-01-09 13:33:22 +00:00
|
|
|
StateHasChanged();
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
Console.WriteLine(ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|