Updated dialog UI

This commit is contained in:
Max 2023-07-02 20:54:18 +02:00
parent 0b35c32fe1
commit 945a0683d6
5 changed files with 13 additions and 16 deletions

View File

@ -116,7 +116,7 @@ namespace SharpRss.Services
}
private async Task SetupTestCategoriesAndFeedsAsync()
{
Log.Information("Setting up test data...");
/*Log.Information("Setting up test data...");
try
{
CategoryModel? newsCategory = await CreateCategoryAsync(new CategoryModel() { Name = "News", Icon = "<g><rect fill=\"none\" height=\"24\" width=\"24\"/></g><g><path d=\"M22,3l-1.67,1.67L18.67,3L17,4.67L15.33,3l-1.66,1.67L12,3l-1.67,1.67L8.67,3L7,4.67L5.33,3L3.67,4.67L2,3v16 c0,1.1,0.9,2,2,2l16,0c1.1,0,2-0.9,2-2V3z M11,19H4v-6h7V19z M20,19h-7v-2h7V19z M20,15h-7v-2h7V15z M20,11H4V8h16V11z\"/></g>"});
@ -156,7 +156,7 @@ namespace SharpRss.Services
catch (Exception e)
{
Log.Error(e, "Exception!");
}
}*/
}
}
}

View File

@ -1,9 +0,0 @@
@page "/read"
@using SharpRss.Services
@inject SyndicationService _syndicationService;
<MudText Typo="Typo.h1">Nothing here yet!</MudText>
@code {
}

View File

@ -1,9 +1,13 @@
@using WebSharpRSS.Models
@using ToolQit.Extensions
<MudDialog>
<DialogContent>
<MudDialog DefaultFocus="DefaultFocus.Element">
<TitleContent>
<div style="justify-self: start;" class="d-flex align-center">
@if (Data?.SyndicationParent.Category != null)
{
<MudIcon Icon="@Data.SyndicationParent.Category.Icon" Size="Size.Medium" Style="@($"color:{Data.SyndicationParent.Category.HexColor}")"/>
}
@if (Data?.SyndicationParent.ImageUrl != null)
{
<MudImage Src="@Data.SyndicationParent.ImageUrl" ObjectFit="ObjectFit.Contain" Width="32" Height="32"/>
@ -13,7 +17,9 @@
</div>
</div>
<MudDivider DividerType="DividerType.FullWidth" Light="false" Class="my-2"/>
<div style="font-size: 20px">
</TitleContent>
<DialogContent>
<div style="font-size: 20px; max-height: 80vh; height: auto; overflow-y: scroll;">
@((MarkupString)((Data?.Content == null || Data.Content.IsNullEmptyWhiteSpace() ? Data?.Description : Data.Content) ?? "This item doesn't contain any content!"))
</div>
</DialogContent>

View File

@ -56,13 +56,13 @@
@code {
[Parameter]
public HashSet<SyndicationItemData>? Items { get; set; }
DialogOptions _dialogOptions = new DialogOptions() { FullWidth = true, MaxWidth = MaxWidth.ExtraLarge, NoHeader = true, CloseButton = true, CloseOnEscapeKey = true };
DialogOptions _dialogOptions = new DialogOptions() { FullWidth = true, MaxWidth = MaxWidth.ExtraLarge, NoHeader = false, CloseButton = true, CloseOnEscapeKey = true };
private void Callback(SyndicationItemData syndicationItem)
{
var parameters = new DialogParameters();
parameters.Add("Data", syndicationItem);
_dialogService.Show<ReadDialog>("", parameters, _dialogOptions);
_dialogService.Show<ReadDialog>("Custom", parameters, _dialogOptions);
Log.Verbose("Item: {ItemId} clicked", syndicationItem.Link);
}

Binary file not shown.