mirror of
https://github.com/hmaxnl/SharpRSS.git
synced 2024-11-09 23:44:20 +01:00
38 lines
900 B
Plaintext
38 lines
900 B
Plaintext
@page "/"
|
|
@page "/dashboard"
|
|
@using WebSharpRSS.Models;
|
|
@using SharpRss.Models
|
|
@using SharpRss.Services
|
|
|
|
@inject FeedStateContainer _stateContainer;
|
|
@inject SyndicationService _service;
|
|
|
|
<MudGrid Spacing="2" Class="mx-2" Justify="Justify.FlexStart">
|
|
@if (_loading)
|
|
{
|
|
<MudProgressCircular Indeterminate="true" Color="Color.Primary"/>
|
|
}
|
|
else
|
|
{
|
|
@foreach (CategoryModel category in _categories)
|
|
{
|
|
<MudItem>
|
|
<DashboardCategoryItemView Category="category"/>
|
|
</MudItem>
|
|
}
|
|
}
|
|
</MudGrid>
|
|
|
|
@code {
|
|
bool _loading = true;
|
|
HashSet<CategoryModel> _categories = new HashSet<CategoryModel>();
|
|
|
|
protected override async void OnInitialized()
|
|
{
|
|
await _service.GetCategoriesAsync().ContinueWith(task =>
|
|
{
|
|
_categories = task.Result;
|
|
_loading = false;
|
|
});
|
|
}
|
|
} |