diff --git a/Newsbot.Portal.Blazor.Server/Global.cs b/Newsbot.Portal.Blazor.Server/Global.cs index 9bc1ab7..0eda7bd 100644 --- a/Newsbot.Portal.Blazor.Server/Global.cs +++ b/Newsbot.Portal.Blazor.Server/Global.cs @@ -4,5 +4,4 @@ public static class Global { public static HttpClient HttpClient { get; set; } public static string? DefaultInstanceUri { get; set; } - } \ No newline at end of file diff --git a/Newsbot.Portal.Blazor.Server/Pages/Sources/List.razor b/Newsbot.Portal.Blazor.Server/Pages/Sources/List.razor index 5a07999..aa1b953 100644 --- a/Newsbot.Portal.Blazor.Server/Pages/Sources/List.razor +++ b/Newsbot.Portal.Blazor.Server/Pages/Sources/List.razor @@ -1,6 +1,37 @@ @page "/sources/list" -

list

+@using Newsbot.Collector.Client +@using Newsbot.Collector.Client.Domain.Dto + +

Available Sources

+ + + + + + + @foreach (var item in Data ??= new List()) + { + if (!item.Enabled) + { + continue; + } + + + + + + } +
TitlePublish Date
+ @item.Name
+
@item.Source
@code { + private List Data { get; set; } + protected override async Task OnInitializedAsync() + { + var c = new SourcesClient(Global.HttpClient, Global.DefaultInstanceUri ?? ""); + var items = await c.ListAsync(); + Data = items; + } } \ No newline at end of file