mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 06:38:00 +00:00
Refactored profile settings (#480)
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user