Show different icon for enterprise profiles

This commit is contained in:
Thorsten Sommer 2025-11-14 11:18:18 +01:00
parent 45bf81f927
commit f7507b0b53
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 9 additions and 1 deletions

View File

@ -19,7 +19,7 @@
<MudDivider/>
@foreach (var profile in this.SettingsManager.ConfigurationData.Profiles.GetAllProfiles())
{
<MudMenuItem Icon="@Icons.Material.Filled.Person4" OnClick="() => this.SelectionChanged(profile)">
<MudMenuItem Icon="@this.ProfileIcon(profile)" OnClick="() => this.SelectionChanged(profile)">
@profile.Name
</MudMenuItem>
}

View File

@ -38,6 +38,14 @@ public partial class ProfileSelection : MSGComponentBase
private string MarginClass => $"{this.MarginLeft} {this.MarginRight}";
private string ProfileIcon(Profile profile)
{
if (profile.IsEnterpriseConfiguration)
return Icons.Material.Filled.Business;
return Icons.Material.Filled.Person4;
}
private async Task SelectionChanged(Profile profile)
{
this.CurrentProfile = profile;