Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/Core/Components/List/FluentPersona.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,17 @@ public partial class FluentPersona : FluentComponentBase
public string? DismissTitle { get; set; }

/// <summary />
private string GetDefaultInitials()
private string GetDefaultInitials() => GetDefaultInitials(Name);

/// <summary />
internal static string GetDefaultInitials(string? name)
{
if (string.IsNullOrEmpty(Name))
if (string.IsNullOrEmpty(name))
{
return string.Empty;
}

var parts = Name.ToUpper().Split(' ', StringSplitOptions.RemoveEmptyEntries);
var parts = name.ToUpper().Split(' ', StringSplitOptions.RemoveEmptyEntries);
return parts == null
|| parts.Length == 0
|| (parts.Length == 1 && parts[0] == string.Empty)
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Components/ProfileMenu/FluentProfileMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
<FluentStack Style="height: 100%;">
<FluentPersona Image="@Image"
ImageSize="@ImageSize"
Initials="@Initials"
Style="align-items: normal;">
Initials="@(Initials ?? FluentPersona.GetDefaultInitials(FullName))"
Style="align-items: normal; font-size: x-large;">
<FluentLabel part="fullname" Typo="@Typography.Header" Style="font-weight: bold;">@FullName</FluentLabel>
<FluentLabel part="email">@EMail</FluentLabel>
</FluentPersona>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</div>
<div part="body" b-qp3z8ghd2d="">
<div class="stack-horizontal" style="justify-content: start; align-items: start; column-gap: 10px; row-gap: 10px; width: 100%; height: 100%;" b-0nr62qx0mz="">
<div class="fluent-persona" style="align-items: normal;" position="end" b-n7zog0zvqi="">
<div class="fluent-persona" style="align-items: normal; font-size: x-large;" position="end" b-n7zog0zvqi="">
<div class="initials" b-n7zog0zvqi="">
<div class="fluent-presence-badge" title="" b-1o8tp31nhy="">
<div style="display: table-cell; vertical-align: middle; width: 48px; min-width: 48px; height: 48px; min-height: 48px;" b-n7zog0zvqi="">
Expand Down