diff --git a/Iceshrimp.Frontend/Components/Note/Note.razor b/Iceshrimp.Frontend/Components/Note/Note.razor index 335a8274..e2bfcafd 100644 --- a/Iceshrimp.Frontend/Components/Note/Note.razor +++ b/Iceshrimp.Frontend/Components/Note/Note.razor @@ -7,14 +7,7 @@
Renoted by - @if (NoteResponse.User.DisplayName != null) - { - @NoteResponse.User.DisplayName - } - else - { - @NoteResponse.User.Username - } + diff --git a/Iceshrimp.Frontend/Components/NoteLikeDetails.razor b/Iceshrimp.Frontend/Components/NoteLikeDetails.razor index 00c145e4..d4096f8e 100644 --- a/Iceshrimp.Frontend/Components/NoteLikeDetails.razor +++ b/Iceshrimp.Frontend/Components/NoteLikeDetails.razor @@ -13,7 +13,7 @@
-
@(el.DisplayName ?? el.Username)
+
@@@el.Username@(el.Host != null ? $"@{el.Host}" : "")
diff --git a/Iceshrimp.Frontend/Components/NoteRenoteDetails.razor b/Iceshrimp.Frontend/Components/NoteRenoteDetails.razor index f204fea9..aa2511c0 100644 --- a/Iceshrimp.Frontend/Components/NoteRenoteDetails.razor +++ b/Iceshrimp.Frontend/Components/NoteRenoteDetails.razor @@ -13,7 +13,7 @@
-
@(el.DisplayName ?? el.Username)
+
@@@el.Username@(el.Host != null ? $"@{el.Host}" : "")
diff --git a/Iceshrimp.Frontend/Components/NotificationComponent.razor b/Iceshrimp.Frontend/Components/NotificationComponent.razor index ccac25fc..ff59cd10 100644 --- a/Iceshrimp.Frontend/Components/NotificationComponent.razor +++ b/Iceshrimp.Frontend/Components/NotificationComponent.razor @@ -16,7 +16,7 @@
@if (NotificationResponse is { User: not null }) { - @(NotificationResponse.User.DisplayName ?? NotificationResponse.User.Username) + } @if (NotificationResponse is { Note: not null, Type: "like", User: not null }) diff --git a/Iceshrimp.Frontend/Components/ReactionDetails.razor b/Iceshrimp.Frontend/Components/ReactionDetails.razor index 2f22f7da..2dc3984b 100644 --- a/Iceshrimp.Frontend/Components/ReactionDetails.razor +++ b/Iceshrimp.Frontend/Components/ReactionDetails.razor @@ -13,7 +13,7 @@
-
@(el.DisplayName ?? el.Username)
+
@@@el.Username@(el.Host != null ? $"@{el.Host}" : "")
diff --git a/Iceshrimp.Frontend/Components/UserDisplayName.razor b/Iceshrimp.Frontend/Components/UserDisplayName.razor new file mode 100644 index 00000000..d9389cb3 --- /dev/null +++ b/Iceshrimp.Frontend/Components/UserDisplayName.razor @@ -0,0 +1,13 @@ +@using Iceshrimp.Shared.Schemas.Web +@if (User.DisplayName != null && User.Emojis.Count != 0) +{ + +} +else +{ + @(User.DisplayName ?? User.Username) +} + +@code { + [Parameter] [EditorRequired] public required UserResponse User { get; set; } +} \ No newline at end of file diff --git a/Iceshrimp.Frontend/Components/UserProfileCard.razor b/Iceshrimp.Frontend/Components/UserProfileCard.razor index 29056897..2819af51 100644 --- a/Iceshrimp.Frontend/Components/UserProfileCard.razor +++ b/Iceshrimp.Frontend/Components/UserProfileCard.razor @@ -14,7 +14,7 @@
- @(User.DisplayName ?? User.Username) +
@@@User.Username