Refactored issue handling (#55)

This commit is contained in:
Thorsten Sommer 2024-07-28 13:53:22 +02:00 committed by GitHub
parent b3b8bf23dc
commit f3aa38e090
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 28 additions and 31 deletions

View File

@ -15,21 +15,7 @@
@this.Body @this.Body
} }
</MudForm> </MudForm>
<Issues IssuesData="@this.inputIssues"/>
@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>
}
@if (this.resultingContentBlock is not null) @if (this.resultingContentBlock is not null)
{ {

View File

@ -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>
}

View File

@ -0,0 +1,9 @@
using Microsoft.AspNetCore.Components;
namespace AIStudio.Components.Blocks;
public partial class Issues : ComponentBase
{
[Parameter]
public IEnumerable<string> IssuesData { get; set; } = [];
}

View File

@ -1,6 +1,7 @@
@using AIStudio.Provider @using AIStudio.Provider
@using AIStudio.Provider.SelfHosted @using AIStudio.Provider.SelfHosted
@using MudBlazor @using MudBlazor
@using AIStudio.Components.Blocks
<MudDialog> <MudDialog>
<DialogContent> <DialogContent>
@ -92,21 +93,7 @@
/> />
</MudForm> </MudForm>
<Issues IssuesData="@this.dataIssues"/>
@if (this.dataIssues.Any())
{
<MudPaper Class="pa-2 mt-3">
<MudText Typo="Typo.h6">Issues</MudText>
<MudList T="string">
@foreach (var issue in this.dataIssues)
{
<MudListItem T="string" Icon="@Icons.Material.Filled.Error" IconColor="Color.Error">
@issue
</MudListItem>
}
</MudList>
</MudPaper>
}
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>
<MudButton OnClick="@this.Cancel" Variant="Variant.Filled">Cancel</MudButton> <MudButton OnClick="@this.Cancel" Variant="Variant.Filled">Cancel</MudButton>

View File

@ -3,6 +3,7 @@
- Added the possibility to provide default options for the translation assistant - Added the possibility to provide default options for the translation assistant
- Added the possibility to provide default options for the coding assistant - Added the possibility to provide default options for the coding assistant
- Added the possibility to provide default options for the text summarizer assistant - Added the possibility to provide default options for the text summarizer assistant
- Improved readability of the issue component
- Improved switches: when an option is enabled, the switch is using a different color - Improved switches: when an option is enabled, the switch is using a different color
- Fixed the applying of spellchecking settings to the single-line dialog - Fixed the applying of spellchecking settings to the single-line dialog
- Restructured the layout of the settings page - Restructured the layout of the settings page