2023-05-12 15:48:14 +02:00
|
|
|
@using SharpRss.Models;
|
2023-04-28 21:58:36 +02:00
|
|
|
@using MudBlazor.Utilities
|
2023-04-29 19:40:16 +02:00
|
|
|
@using CodeHollow.FeedReader
|
|
|
|
@using Serilog
|
2023-05-04 21:04:44 +02:00
|
|
|
|
2023-05-07 02:42:37 +02:00
|
|
|
@inject RssService _rssService
|
|
|
|
|
2023-04-29 19:40:16 +02:00
|
|
|
<MudStack Spacing="2">
|
|
|
|
<MudNavMenu>
|
|
|
|
<MudNavLink Href="/" Icon="@Icons.Material.Filled.Home">Home</MudNavLink>
|
|
|
|
</MudNavMenu>
|
2023-05-04 21:04:44 +02:00
|
|
|
<CategoryGuide Categories="Categories" CatItemClicked="CategoryClicked" FeedItemClicked="FeedClicked"/>
|
2023-04-29 19:40:16 +02:00
|
|
|
</MudStack>
|
2023-04-28 21:58:36 +02:00
|
|
|
|
|
|
|
@code {
|
2023-05-12 23:58:49 +02:00
|
|
|
public HashSet<CategoryModel> Categories = new HashSet<CategoryModel>();
|
2023-04-28 21:58:36 +02:00
|
|
|
protected override void OnInitialized()
|
|
|
|
{
|
2023-04-29 19:40:16 +02:00
|
|
|
Log.Verbose("Setting up test data");
|
2023-05-12 23:58:49 +02:00
|
|
|
Categories = _rssService.GetCategories().Result;
|
|
|
|
/*Cats = _rssService.GetCategories().Result.Select(x => new GuideModel(x)).ToHashSet();*/
|
|
|
|
/*Categories.Add(new CategoryGuideItem() { CategoryTitle = "Social", CategoryIcon = Icons.Material.Filled.People });
|
2023-04-30 20:13:14 +02:00
|
|
|
Categories.Add(new CategoryGuideItem() { CategoryTitle = "Blogs", CategoryIcon = Icons.Material.Filled.RssFeed, CategoryHexColor = Colors.Green.Accent1 });
|
|
|
|
Categories.Add(new CategoryGuideItem() { CategoryTitle = "Tech", CategoryIcon = Icons.Material.Filled.Computer, CategoryHexColor = Colors.Brown.Lighten1 });
|
2023-05-12 23:58:49 +02:00
|
|
|
Categories.Add(new CategoryGuideItem() { CategoryTitle = "News", CategoryIcon = Icons.Material.Filled.Newspaper, CategoryHexColor = Colors.Red.Accent1 });*/
|
2023-04-28 21:58:36 +02:00
|
|
|
}
|
|
|
|
|
2023-04-29 19:40:16 +02:00
|
|
|
private void Callback(MudListItem obj)
|
|
|
|
{
|
|
|
|
switch (obj.Value)
|
|
|
|
{
|
2023-05-12 23:58:49 +02:00
|
|
|
case CategoryModel catModel:
|
2023-04-29 19:40:16 +02:00
|
|
|
break;
|
2023-05-12 23:58:49 +02:00
|
|
|
case FeedModel feedModel:
|
2023-04-29 19:40:16 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-12 23:58:49 +02:00
|
|
|
private void CategoryClicked(CategoryModel cat)
|
2023-05-04 21:04:44 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-05-12 23:58:49 +02:00
|
|
|
private void FeedClicked(FeedModel guideFeedItem)
|
2023-04-30 20:13:14 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-04-28 21:58:36 +02:00
|
|
|
}
|