Reworking UI

This commit is contained in:
Max 2023-06-23 19:36:58 +02:00
parent a4788dbd02
commit 11f8425b3f
5 changed files with 9 additions and 5 deletions

View File

@ -241,10 +241,10 @@ namespace SharpRss
Log.Information("Checking table: {Table}", "category");
await dbc.ExecuteAsync("CREATE TABLE IF NOT EXISTS category (id STRING PRIMARY KEY, name STRING NOT NULL, hex_color STRING NOT NULL, icon STRING, last_updated INT)");
Log.Information("Checking table: {Table}", "feed");
Log.Information("Checking table: {Table}", "syndication");
await dbc.ExecuteAsync("CREATE TABLE IF NOT EXISTS syndication (encoded_url STRING PRIMARY KEY, title STRING, category_id STRING, syndication_type STRING, version STRING, description STRING, language STRING, copyright STRING, last_updated INT, publication_date INT, syn_updated_date INT, categories STRING, image_url STRING)");
Log.Information("Checking table: {Table}", "feed_item");
Log.Information("Checking table: {Table}", "syndication_item");
await dbc.ExecuteAsync("CREATE TABLE IF NOT EXISTS syndication_item (link STRING PRIMARY KEY, encoded_syndication_url STRING, read STRING, type STRING, title STRING, description STRING, last_updated INT, item_updated_date INT, publishing_date INT, authors STRING, categories STRING, content STRING, comments_url STRING)");
Log.Information("Checking database done!");
_isInitialized = true;

View File

@ -104,7 +104,7 @@ namespace SharpRss.Services
}
private async void SetupTestCategoriesAndFeedsAsync()
{
Log.Information("Setting up test data...");
/*Log.Information("Setting up test data...");
try
{
CategoryModel? newsCategory = await CreateCategoryAsync(new CategoryModel() { Name = "News" });
@ -144,7 +144,7 @@ namespace SharpRss.Services
catch (Exception e)
{
Log.Error(e, "Exception!");
}
}*/
}
}
}

View File

@ -15,7 +15,7 @@
}
else
{
<FeedItemList Items="items"/>
<SyndicationListItem Items="items"/>
}
</div>

View File

@ -12,6 +12,10 @@
<MudItem @onclick="@(() => Callback(feedItemData))">
<MudPaper Height="250" Width="300" Class="px-2">
<div style="justify-self: start;" class="d-flex align-center">
@if (feedItemData.SyndicationParent.Category != null && !feedItemData.SyndicationParent.Category.Icon.IsNullEmptyWhiteSpace())
{
<MudIcon Icon="@feedItemData.SyndicationParent.Category.Icon" Style="@($"color:{feedItemData.SyndicationParent.Category.HexColor}")"/>
}
@if (feedItemData.SyndicationParent.ImageUrl != null)
{
<MudImage Src="@feedItemData.SyndicationParent.ImageUrl" ObjectFit="ObjectFit.Contain" Width="32" Height="32"/>

Binary file not shown.