diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-10-25 14:00:02 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-10-25 14:00:02 +0200 |
commit | 89315fa530e1f21e2e50d94f955693b9413c98fe (patch) | |
tree | bc0747aa1b4f53147030be26c24d079fb0b34001 /MatrixRoomUtils.Web/Shared/InlineUserItem.razor | |
parent | Clean up MRUStorageWrapper (diff) | |
download | MatrixUtils-89315fa530e1f21e2e50d94f955693b9413c98fe.tar.xz |
New things
Diffstat (limited to 'MatrixRoomUtils.Web/Shared/InlineUserItem.razor')
-rw-r--r-- | MatrixRoomUtils.Web/Shared/InlineUserItem.razor | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/MatrixRoomUtils.Web/Shared/InlineUserItem.razor b/MatrixRoomUtils.Web/Shared/InlineUserItem.razor index 3aea0e0..7bc88e5 100644 --- a/MatrixRoomUtils.Web/Shared/InlineUserItem.razor +++ b/MatrixRoomUtils.Web/Shared/InlineUserItem.razor @@ -2,6 +2,7 @@ @using LibMatrix.EventTypes.Spec.State @using LibMatrix.Helpers @using LibMatrix.Homeservers +@using LibMatrix.Responses <div style="background-color: #ffffff11; border-radius: 0.5em; height: 1em; display: inline-block; vertical-align: middle;" alt="@UserId"> <img style="@(ChildContent is not null ? "vertical-align: baseline;" : "vertical-align: top;") width: 1em; height: 1em; border-radius: 50%;" src="@ProfileAvatar"/> <span style="position: relative; top: -5px;">@ProfileName</span> @@ -20,10 +21,10 @@ public RenderFragment? ChildContent { get; set; } [Parameter] - public ProfileResponseEventContent User { get; set; } + public UserProfileResponse? User { get; set; } [Parameter] - public ProfileResponseEventContent MemberEvent { get; set; } + public RoomMemberEventContent? MemberEvent { get; set; } [Parameter] public string? UserId { get; set; } @@ -50,7 +51,7 @@ throw new ArgumentNullException(nameof(UserId)); if (MemberEvent != null) { - User = new ProfileResponseEventContent { + User = new UserProfileResponse { AvatarUrl = MemberEvent.AvatarUrl, DisplayName = MemberEvent.DisplayName }; @@ -61,7 +62,7 @@ } - ProfileAvatar ??= await hsResolver.ResolveMediaUri(HomeServer.ServerName, User.AvatarUrl); + ProfileAvatar ??= HomeServer.ResolveMediaUri(User.AvatarUrl); ProfileName ??= User.DisplayName; _semaphoreSlim.Release(); |