mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-03-12 18:49:08 +00:00
31 lines
821 B
C#
31 lines
821 B
C#
using AIStudio.Settings;
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace AIStudio.Components;
|
|
|
|
public partial class ProfileSelection : ComponentBase
|
|
{
|
|
[Parameter]
|
|
public Profile CurrentProfile { get; set; } = Profile.NO_PROFILE;
|
|
|
|
[Parameter]
|
|
public EventCallback<Profile> CurrentProfileChanged { get; set; }
|
|
|
|
[Parameter]
|
|
public string MarginLeft { get; set; } = "ml-3";
|
|
|
|
[Parameter]
|
|
public string MarginRight { get; set; } = string.Empty;
|
|
|
|
[Inject]
|
|
private SettingsManager SettingsManager { get; init; } = null!;
|
|
|
|
private string MarginClass => $"{this.MarginLeft} {this.MarginRight}";
|
|
|
|
private async Task SelectionChanged(Profile profile)
|
|
{
|
|
this.CurrentProfile = profile;
|
|
await this.CurrentProfileChanged.InvokeAsync(profile);
|
|
}
|
|
} |