mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-28 20:23:36 +00:00
35 lines
2.1 KiB
Plaintext
35 lines
2.1 KiB
Plaintext
@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.SelectionLabel" Variant="Variant.Filled" Color="Color.Default" Class="@this.MarginClass" Disabled="@this.Disabled">
|
|
<ActivatorContent>
|
|
@if (this.SelectedProfiles.Count > 0)
|
|
{
|
|
<MudButton IconSize="Size.Large" StartIcon="@Icons.Material.Filled.Person4" IconColor="Color.Default">
|
|
@this.SelectionLabel
|
|
</MudButton>
|
|
}
|
|
else
|
|
{
|
|
<MudIconButton Icon="@Icons.Material.Filled.Person4" Color="Color.Default" />
|
|
}
|
|
</ActivatorContent>
|
|
<ChildContent>
|
|
<MudMenuItem Icon="@Icons.Material.Filled.Settings" Label="@T("Manage your profiles")" OnClick="@(async () => await this.OpenSettingsDialog())" />
|
|
<MudDivider/>
|
|
<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.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>
|
|
</MudMenu>
|
|
</MudTooltip>
|