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 AIStudio.Tools.PluginSystem;
using Microsoft.AspNetCore.Components;
using DialogOptions = AIStudio.Dialogs.DialogOptions;
namespace AIStudio.Components;
public partial class ProfileSelection : MSGComponentBase
@@ -25,6 +28,9 @@ public partial class ProfileSelection : MSGComponentBase
[Parameter]
public string DisabledText { get; set; } = string.Empty;
[Inject]
private IDialogService DialogService { get; init; } = null!;
private readonly string defaultToolTipText = TB("You can switch between your profiles here");
@@ -37,4 +43,10 @@ public partial class ProfileSelection : MSGComponentBase
this.CurrentProfile = profile;
await this.CurrentProfileChanged.InvokeAsync(profile);
}
private async Task OpenSettingsDialog()
{
var dialogParameters = new DialogParameters();
await this.DialogService.ShowAsync<SettingsDialogProfiles>(T("Open Profile Options"), dialogParameters, DialogOptions.FULLSCREEN);
}
}