Refactored profile settings (#480)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2025-05-25 13:27:22 +02:00
1 parent e3110820d2
commit 801179e835
13 files changed
+264 -203

No files matched your search

@@ -1,7 +1,10 @@
using AIStudio.Dialogs.Settings;
using AIStudio.Settings;
using Microsoft.AspNetCore.Components;
using DialogOptions = AIStudio.Dialogs.DialogOptions;
namespace AIStudio.Components;
public partial class ProfileFormSelection : MSGComponentBase
@@ -15,9 +18,18 @@ public partial class ProfileFormSelection : MSGComponentBase
[Parameter]
public Func<Profile, string?> Validation { get; set; } = _ => null;
[Inject]
public IDialogService DialogService { get; init; } = null!;
private async Task SelectionChanged(Profile profile)
{
this.Profile = profile;
await this.ProfileChanged.InvokeAsync(profile);
}
private async Task OpenSettingsDialog()
{
var dialogParameters = new DialogParameters();
await this.DialogService.ShowAsync<SettingsDialogProfiles>(T("Open Profile Options"), dialogParameters, DialogOptions.FULLSCREEN);
}
}