mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-14 06:33:47 +00:00
Multiple Profiles can now be selected
This commit is contained in:
1 parent
d043fbc8f0
commit
cefc5464d5
89 files changed
+1360
-503
No files matched your search
@@ -1,12 +1,12 @@
|
||||
@using AIStudio.Settings
|
||||
@inherits MSGComponentBase
|
||||
<MudTooltip Text="@this.ToolTipText" Placement="Placement.Top">
|
||||
<MudMenu TransformOrigin="@Origin.BottomLeft" AnchorOrigin="Origin.TopLeft" StartIcon="@Icons.Material.Filled.Person4" EndIcon="@Icons.Material.Filled.KeyboardArrowDown" Label="@this.CurrentProfile.Name" Variant="Variant.Filled" Color="Color.Default" Class="@this.MarginClass" Disabled="@this.Disabled">
|
||||
<MudMenu TransformOrigin="@Origin.BottomLeft" AnchorOrigin="Origin.TopLeft" StartIcon="@Icons.Material.Filled.Person4" EndIcon="@Icons.Material.Filled.KeyboardArrowDown" Label="@this.SelectionLabel" Variant="Variant.Filled" Color="Color.Default" Class="@this.MarginClass" Disabled="@this.Disabled">
|
||||
<ActivatorContent>
|
||||
@if (this.CurrentProfile != Profile.NO_PROFILE)
|
||||
@if (this.SelectedProfiles.Count > 0)
|
||||
{
|
||||
<MudButton IconSize="Size.Large" StartIcon="@Icons.Material.Filled.Person4" IconColor="Color.Default">
|
||||
@this.CurrentProfile.GetSafeName()
|
||||
@this.SelectionLabel
|
||||
</MudButton>
|
||||
}
|
||||
else
|
||||
@@ -17,10 +17,16 @@
|
||||
<ChildContent>
|
||||
<MudMenuItem Icon="@Icons.Material.Filled.Settings" Label="@T("Manage your profiles")" OnClick="@(async () => await this.OpenSettingsDialog())" />
|
||||
<MudDivider/>
|
||||
@foreach (var profile in this.SettingsManager.ConfigurationData.Profiles.GetAllProfiles())
|
||||
<MudMenuItem Icon="@Icons.Material.Filled.PersonOff" AutoClose="false" Disabled="@(this.SelectedProfiles.Count == 0)" OnClick="@this.ClearSelection">
|
||||
@T("Clear all")
|
||||
</MudMenuItem>
|
||||
@foreach (var profile in this.SettingsManager.ConfigurationData.Profiles)
|
||||
{
|
||||
<MudMenuItem Icon="@this.ProfileIcon(profile)" OnClick="@(() => this.SelectionChanged(profile))">
|
||||
@profile.GetSafeName()
|
||||
<MudMenuItem Icon="@(this.SelectedProfileIds.Contains(profile.Id) ? Icons.Material.Filled.CheckBox : Icons.Material.Filled.CheckBoxOutlineBlank)" IconColor="Color.Primary" AutoClose="false" Class="mud-list-item-dense" OnClick="@(() => this.SelectionChanged(profile, !this.SelectedProfileIds.Contains(profile.Id)))">
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1">
|
||||
<MudIcon Icon="@this.ProfileIcon(profile)" Size="Size.Small" Style="color: var(--mud-palette-action-default);" />
|
||||
<MudText Typo="Typo.body1">@profile.GetSafeName()</MudText>
|
||||
</MudStack>
|
||||
</MudMenuItem>
|
||||
}
|
||||
</ChildContent>
|
||||
|
||||
Reference in new issue
Block a user