@using Iceshrimp.Frontend.Localization @using Iceshrimp.Shared.Schemas.Web @using Microsoft.Extensions.Localization @using Iceshrimp.Assets.PhosphorIcons @using Iceshrimp.Frontend.Core.Miscellaneous @inject IStringLocalizer Loc;
@if (UserProfile.Lang != null && (UserProfile.Pronouns?.TryGetValue(UserProfile.Lang, out var pronouns) ?? false)) { @pronouns } @switch (UserProfile.Role) { case Role.Moderator: @Loc["Moderator"] break; case Role.Admin: @Loc["Admin"] break; case Role.None: break; default: throw new ArgumentOutOfRangeException(); } @if (User.IsBot) { @Loc["Automated"] } @if (UserProfile.IsLocked) { @Loc["Private"] }
@if (UserProfile.Bio != null) {
}
@if (UserProfile.Birthday != null) {
@Loc["Birthday"] @UserProfile.Birthday
} @if (UserProfile.Location != null) {
@Loc["Location"] @UserProfile.Location
} @if (UserProfile.Pronouns != null) {
@Loc["Pronouns"] @string.Join(", ", UserProfile.Pronouns.Select(p => $"{p.Value} ({_languages.GetValueOrDefault(p.Key) ?? p.Key.ToUpper()})"))
}
@if (UserProfile.Fields != null) {
@foreach (var field in UserProfile.Fields) { }
}
@code { [Parameter] [EditorRequired] public required UserResponse User { get; set; } [Parameter] [EditorRequired] public required UserProfileResponse UserProfile { get; set; } [Parameter] [EditorRequired] public required List Emojis { get; set; } private Dictionary _languages = LanguageHelper.Bcp47Languages; }