Refactored issue handling (#55)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2024-07-28 13:53:22 +02:00
1 parent b3b8bf23dc
commit f3aa38e090
5 files changed
+28 -31

No files matched your search

@@ -15,22 +15,8 @@
@this.Body
}
</MudForm>
@if (this.inputIssues.Any())
{
<MudPaper Class="pr-2 mt-3" Outlined="@true">
<MudText Typo="Typo.h6">Issues</MudText>
<MudList T="string">
@foreach (var issue in this.inputIssues)
{
<MudListItem Icon="@Icons.Material.Filled.Error" IconColor="Color.Error">
@issue
</MudListItem>
}
</MudList>
</MudPaper>
}
<Issues IssuesData="@this.inputIssues"/>
@if (this.resultingContentBlock is not null)
{
<ContentBlockComponent Role="@this.resultingContentBlock.Role" Type="@this.resultingContentBlock.ContentType" Time="@this.resultingContentBlock.Time" Content="@this.resultingContentBlock.Content" Class="mr-2"/>
@@ -0,0 +1,14 @@
@if (this.IssuesData.Any())
{
<MudPaper Class="pa-3 mr-3 mt-3 border-dashed border rounded-lg mud-alert-outlined-error">
<MudText Typo="Typo.h6">Issues</MudText>
<MudList T="string">
@foreach (var issue in this.IssuesData)
{
<MudListItem Icon="@Icons.Material.Filled.Error" IconColor="Color.Error">
@issue
</MudListItem>
}
</MudList>
</MudPaper>
}
@@ -0,0 +1,9 @@
using Microsoft.AspNetCore.Components;
namespace AIStudio.Components.Blocks;
public partial class Issues : ComponentBase
{
[Parameter]
public IEnumerable<string> IssuesData { get; set; } = [];
}