mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 14:09:07 +00:00
Refactored issue handling (#55)
This commit is contained in:
parent
b3b8bf23dc
commit
f3aa38e090
@ -15,22 +15,8 @@
|
|||||||
@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)
|
||||||
{
|
{
|
||||||
<ContentBlockComponent Role="@this.resultingContentBlock.Role" Type="@this.resultingContentBlock.ContentType" Time="@this.resultingContentBlock.Time" Content="@this.resultingContentBlock.Content" Class="mr-2"/>
|
<ContentBlockComponent Role="@this.resultingContentBlock.Role" Type="@this.resultingContentBlock.ContentType" Time="@this.resultingContentBlock.Time" Content="@this.resultingContentBlock.Content" Class="mr-2"/>
|
||||||
|
14
app/MindWork AI Studio/Components/Blocks/Issues.razor
Normal file
14
app/MindWork AI Studio/Components/Blocks/Issues.razor
Normal 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>
|
||||||
|
}
|
9
app/MindWork AI Studio/Components/Blocks/Issues.razor.cs
Normal file
9
app/MindWork AI Studio/Components/Blocks/Issues.razor.cs
Normal 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; } = [];
|
||||||
|
}
|
@ -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>
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user