Implemented the "my tasks" assistant (#137)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2024-09-09 15:08:16 +02:00
1 parent 7a5f2d4aec
commit 09f5b83e66
16 files changed
+224 -2

No files matched your search

@@ -0,0 +1,10 @@
@using AIStudio.Settings
<MudSelect T="Profile" Strict="@true" Value="@this.Profile" ValueChanged="@this.SelectionChanged" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Person4" Margin="Margin.Dense" Label="Select one of your profiles" Variant="Variant.Outlined" Class="mb-3" Validation="@this.Validation">
@foreach (var profile in this.SettingsManager.ConfigurationData.Profiles.GetAllProfiles())
{
<MudSelectItem Value="profile">
@profile.Name
</MudSelectItem>
}
</MudSelect>
@@ -0,0 +1,26 @@
using AIStudio.Settings;
using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
public partial class ProfileFormSelection : ComponentBase
{
[Parameter]
public Profile Profile { get; set; } = Profile.NO_PROFILE;
[Parameter]
public EventCallback<Profile> ProfileChanged { get; set; }
[Parameter]
public Func<Profile, string?> Validation { get; set; } = _ => null;
[Inject]
private SettingsManager SettingsManager { get; init; } = null!;
private async Task SelectionChanged(Profile profile)
{
this.Profile = profile;
await this.ProfileChanged.InvokeAsync(profile);
}
}