diff options
author | Emma@Rory& <root@rory.gay> | 2023-09-15 09:55:36 +0200 |
---|---|---|
committer | Emma@Rory& <root@rory.gay> | 2023-09-15 09:55:36 +0200 |
commit | e10fa389ce3c4d42deadfec8bf08c2fbb1a88d79 (patch) | |
tree | 1e2f8d8de07c6037ac4aa20be3b54ac43c2d7f2e /MatrixRoomUtils.Web/Shared/TimelineComponents | |
parent | Code cleanup (diff) | |
download | MatrixUtils-e10fa389ce3c4d42deadfec8bf08c2fbb1a88d79.tar.xz |
Refactors
Diffstat (limited to 'MatrixRoomUtils.Web/Shared/TimelineComponents')
5 files changed, 12 insertions, 8 deletions
diff --git a/MatrixRoomUtils.Web/Shared/TimelineComponents/BaseTimelineItem.razor b/MatrixRoomUtils.Web/Shared/TimelineComponents/BaseTimelineItem.razor index 5172fa4..e4ee873 100644 --- a/MatrixRoomUtils.Web/Shared/TimelineComponents/BaseTimelineItem.razor +++ b/MatrixRoomUtils.Web/Shared/TimelineComponents/BaseTimelineItem.razor @@ -1,5 +1,6 @@ @using LibMatrix.Responses @using LibMatrix +@using LibMatrix.Homeservers <h3>BaseTimelineItem</h3> @code { @@ -11,6 +12,6 @@ public List<StateEventResponse> Events { get; set; } [Parameter] - public AuthenticatedHomeServer HomeServer { get; set; } + public AuthenticatedHomeserverGeneric Homeserver { get; set; } } diff --git a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMemberItem.razor b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMemberItem.razor index d67fdab..c450211 100644 --- a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMemberItem.razor +++ b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMemberItem.razor @@ -1,6 +1,6 @@ -@using LibMatrix.StateEventTypes @using LibMatrix.StateEventTypes.Spec @using LibMatrix.Extensions +@using ArcaneLibs.Extensions @inherits BaseTimelineItem @if (roomMemberData is not null) { @@ -15,7 +15,7 @@ <i>@Event.StateKey changed their display name to @(roomMemberData.Displayname ?? Event.Sender)</i> break; case "join": - <i><InlineUserItem User="@(new ProfileResponseEventData())" HomeServer="@HomeServer" UserId="@Event.StateKey"></InlineUserItem> joined</i> + <i><InlineUserItem User="@(new ProfileResponseEventContent())" HomeServer="@Homeserver" UserId="@Event.StateKey"></InlineUserItem> joined</i> break; case "leave": <i>@Event.StateKey left</i> @@ -26,8 +26,8 @@ default: <i>@Event.StateKey has an unknown state:</i> <pre> - @Event.ToJson() - </pre> + @Event.ToJson() + </pre> break; } } @@ -42,6 +42,6 @@ else { @code { - private RoomMemberEventData? roomMemberData => Event.TypedContent as RoomMemberEventData; + private RoomMemberEventContent? roomMemberData => Event.TypedContent as RoomMemberEventContent; } diff --git a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMessageItem.razor b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMessageItem.razor index 13cce88..5dd87e0 100644 --- a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMessageItem.razor +++ b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMessageItem.razor @@ -1,4 +1,5 @@ @using LibMatrix.Extensions +@using ArcaneLibs.Extensions @inherits BaseTimelineItem <pre> diff --git a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineRoomCreateItem.razor b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineRoomCreateItem.razor index 8053a47..9c48455 100644 --- a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineRoomCreateItem.razor +++ b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineRoomCreateItem.razor @@ -1,10 +1,11 @@ @using LibMatrix.StateEventTypes.Spec @using LibMatrix.Extensions +@using ArcaneLibs.Extensions @inherits BaseTimelineItem <p> @Event.Sender created the room with room version @CreationEventContent.RoomVersion - @CreationEventContent.Federate ? "and" : "without" federating with other servers.<br/> + @(CreationEventContent.Federate ?? false ? "and" : "without") federating with other servers.<br/> This room is of type @(CreationEventContent.Type ?? "Untyped room (usually a chat room)") </p> <pre> @@ -13,6 +14,6 @@ @code { - private RoomCreateEventData CreationEventContent => Event.TypedContent as RoomCreateEventData; + private RoomCreateEventContent CreationEventContent => Event.TypedContent as RoomCreateEventContent; } diff --git a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineUnknownItem.razor b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineUnknownItem.razor index 8166f8a..69845d9 100644 --- a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineUnknownItem.razor +++ b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineUnknownItem.razor @@ -1,4 +1,5 @@ @using LibMatrix.Extensions +@using ArcaneLibs.Extensions @inherits BaseTimelineItem <div> |