From e10fa389ce3c4d42deadfec8bf08c2fbb1a88d79 Mon Sep 17 00:00:00 2001 From: "Emma@Rory&" Date: Fri, 15 Sep 2023 09:55:36 +0200 Subject: Refactors --- MatrixRoomUtils.Web/Shared/InlineUserItem.razor | 9 ++- MatrixRoomUtils.Web/Shared/ModalWindow.razor | 86 ---------------------- MatrixRoomUtils.Web/Shared/ModalWindow.razor.css | 70 ------------------ MatrixRoomUtils.Web/Shared/RoomList.razor | 5 +- .../RoomListComponents/RoomListCategory.razor | 15 ++-- .../Shared/RoomListComponents/RoomListSpace.razor | 2 +- MatrixRoomUtils.Web/Shared/RoomListItem.razor | 15 ++-- .../Shared/SimpleComponents/DictionaryEditor.razor | 38 ---------- .../Shared/SimpleComponents/FancyTextBox.razor | 29 -------- .../Shared/SimpleComponents/FancyTextBox.razor.css | 5 -- .../Shared/SimpleComponents/LinkButton.razor | 20 ----- .../Shared/SimpleComponents/StringListEditor.razor | 29 -------- .../Shared/SimpleComponents/ToggleSlider.razor | 72 ------------------ .../TimelineComponents/BaseTimelineItem.razor | 3 +- .../TimelineComponents/TimelineMemberItem.razor | 10 +-- .../TimelineComponents/TimelineMessageItem.razor | 1 + .../TimelineRoomCreateItem.razor | 5 +- .../TimelineComponents/TimelineUnknownItem.razor | 1 + MatrixRoomUtils.Web/Shared/UserListItem.razor | 2 +- 19 files changed, 38 insertions(+), 379 deletions(-) delete mode 100644 MatrixRoomUtils.Web/Shared/ModalWindow.razor delete mode 100644 MatrixRoomUtils.Web/Shared/ModalWindow.razor.css delete mode 100644 MatrixRoomUtils.Web/Shared/SimpleComponents/DictionaryEditor.razor delete mode 100644 MatrixRoomUtils.Web/Shared/SimpleComponents/FancyTextBox.razor delete mode 100644 MatrixRoomUtils.Web/Shared/SimpleComponents/FancyTextBox.razor.css delete mode 100644 MatrixRoomUtils.Web/Shared/SimpleComponents/LinkButton.razor delete mode 100644 MatrixRoomUtils.Web/Shared/SimpleComponents/StringListEditor.razor delete mode 100644 MatrixRoomUtils.Web/Shared/SimpleComponents/ToggleSlider.razor (limited to 'MatrixRoomUtils.Web/Shared') diff --git a/MatrixRoomUtils.Web/Shared/InlineUserItem.razor b/MatrixRoomUtils.Web/Shared/InlineUserItem.razor index db66309..af2fa29 100644 --- a/MatrixRoomUtils.Web/Shared/InlineUserItem.razor +++ b/MatrixRoomUtils.Web/Shared/InlineUserItem.razor @@ -2,6 +2,7 @@ @using LibMatrix.StateEventTypes.Spec @using LibMatrix @using LibMatrix.Helpers +@using LibMatrix.Homeservers
@ProfileName @@ -20,10 +21,10 @@ public RenderFragment? ChildContent { get; set; } [Parameter] - public ProfileResponseEventData User { get; set; } + public ProfileResponseEventContent User { get; set; } [Parameter] - public ProfileResponseEventData MemberEvent { get; set; } + public ProfileResponseEventContent MemberEvent { get; set; } [Parameter] public string? UserId { get; set; } @@ -35,7 +36,7 @@ public string? ProfileName { get; set; } = null; [Parameter] - public AuthenticatedHomeServer? HomeServer { get; set; } + public AuthenticatedHomeserverGeneric? HomeServer { get; set; } private static SemaphoreSlim _semaphoreSlim = new(128); @@ -50,7 +51,7 @@ throw new ArgumentNullException(nameof(UserId)); if (MemberEvent != null) { - User = new ProfileResponseEventData { + User = new ProfileResponseEventContent { AvatarUrl = MemberEvent.AvatarUrl, DisplayName = MemberEvent.DisplayName }; diff --git a/MatrixRoomUtils.Web/Shared/ModalWindow.razor b/MatrixRoomUtils.Web/Shared/ModalWindow.razor deleted file mode 100644 index beb7198..0000000 --- a/MatrixRoomUtils.Web/Shared/ModalWindow.razor +++ /dev/null @@ -1,86 +0,0 @@ -@using LibMatrix.Extensions -
-
- @Title - - -
-
- @ChildContent -
-
- -@code { - - [Parameter] - public RenderFragment? ChildContent { get; set; } - - [Parameter] - public string Title { get; set; } = "Untitled window"; - - [Parameter] - public double X { get; set; } = 60; - - [Parameter] - public double Y { get; set; } = 60; - - [Parameter] - public double MinWidth { get; set; } = 100; - - [Parameter] - public Action OnCloseClicked { get; set; } - - [Parameter] - public bool Collapsed { get; set; } = false; - - private ElementReference _titleRef; - - private double _x = 60; - private double _y = 60; - - protected override async Task OnInitializedAsync() { - _x = X; - _y = Y; - await base.OnInitializedAsync(); - } - - protected override async Task OnAfterRenderAsync(bool firstRender) { - //set minwidth to title width - MinWidth = await JSRuntime.InvokeAsync("getWidth", _titleRef) + 75; - await base.OnAfterRenderAsync(firstRender); - } - - private void WindowDrag(DragEventArgs obj) { - Console.WriteLine("Drag: " + obj.ToJson()); - - _x += obj.MovementX; - _y += obj.MovementY; - - StateHasChanged(); - } - - private bool isDragging = false; - private double dragX = 0; - private double dragY = 0; - - private void MouseDown(MouseEventArgs obj) { - isDragging = true; - dragX = obj.ClientX; - dragY = obj.ClientY; - } - - private void MouseUp(MouseEventArgs obj) { - isDragging = false; - } - - private void MouseMove(MouseEventArgs obj) { - if (!isDragging) return; - - _x += obj.ClientX - dragX; - _y += obj.ClientY - dragY; - dragX = obj.ClientX; - dragY = obj.ClientY; - StateHasChanged(); - } - -} diff --git a/MatrixRoomUtils.Web/Shared/ModalWindow.razor.css b/MatrixRoomUtils.Web/Shared/ModalWindow.razor.css deleted file mode 100644 index 6d08114..0000000 --- a/MatrixRoomUtils.Web/Shared/ModalWindow.razor.css +++ /dev/null @@ -1,70 +0,0 @@ -.r-modal { - position: absolute; - width: fit-content; - height: fit-content; - z-index: 1000; -} -.r-modal:hover { - z-index: 1001; -} - -.r-modal > .titlebar { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 25px; - background-color: #000; - user-select: none; -} - -.r-modal > .titlebar > .title { - position: relative; - top: 0; - left: 0; - width: fit-content; - text-wrap: nowrap; - height: 100%; - line-height: 25px; - padding-left: 10px; - color: #fff; -} - -.r-modal > .titlebar > .btnclose { - position: absolute; - top: 0; - right: 0; - width: 25px; - height: 100%; - line-height: 25px; - text-align: center; - color: #fff; - background-color: #111; - cursor: pointer; -} -.r-modal > .titlebar > .btncollapse { - position: absolute; - top: 0; - right: 25px; - width: 25px; - height: 100%; - line-height: 25px; - text-align: center; - color: #fff; - background-color: #111; - cursor: pointer; -} - -.r-modal > .r-modal-content { - position: relative; - top: 25px; - left: 0; - width: fit-content; - height: fit-content; - min-width: 150px; - max-width: 75vw; - max-height: 75vh; - overflow: auto; - background-color: #111; -} diff --git a/MatrixRoomUtils.Web/Shared/RoomList.razor b/MatrixRoomUtils.Web/Shared/RoomList.razor index 3b057a4..b0548cb 100644 --- a/MatrixRoomUtils.Web/Shared/RoomList.razor +++ b/MatrixRoomUtils.Web/Shared/RoomList.razor @@ -3,6 +3,7 @@ @using LibMatrix.StateEventTypes.Spec @using LibMatrix @using LibMatrix.Extensions +@using ArcaneLibs.Extensions @if(Rooms.Count != RoomsWithTypes.Sum(x=>x.Value.Count)) {

Fetching room details... @RoomsWithTypes.Sum(x=>x.Value.Count) out of @Rooms.Count done!

@foreach (var category in RoomsWithTypes.OrderBy(x => x.Value.Count)) { @@ -20,7 +21,7 @@ else { [Parameter] public List Rooms { get; set; } [Parameter] - public ProfileResponseEventData? GlobalProfile { get; set; } + public ProfileResponseEventContent? GlobalProfile { get; set; } Dictionary> RoomsWithTypes = new(); @@ -51,7 +52,7 @@ else { await _semaphoreSlim.WaitAsync(); string roomType; try { - var createEvent = (await room.GetStateEvent("m.room.create")).TypedContent as RoomCreateEventData; + var createEvent = (await room.GetStateEvent("m.room.create")).TypedContent as RoomCreateEventContent; roomType = GetRoomTypeName(createEvent.Type); if (roomType == "Room") { diff --git a/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListCategory.razor b/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListCategory.razor index 381ecd1..d717186 100644 --- a/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListCategory.razor +++ b/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListCategory.razor @@ -2,18 +2,19 @@ @using MatrixRoomUtils.Web.Classes.Constants @using LibMatrix.StateEventTypes.Spec @using LibMatrix +@using LibMatrix.Homeservers
@roomType (@rooms.Count) @foreach (var room in rooms) {
@* @if (RoomVersionDangerLevel(room) != 0 && *@ - @* (room.StateEvents.FirstOrDefault(x=>x.Type == "m.room.power_levels")?.TypedContent is RoomPowerLevelEventData powerLevels && powerLevels.UserHasPermission(HomeServer.UserId, "m.room.tombstone"))) { *@ + @* (room.StateEvents.FirstOrDefault(x=>x.Type == "m.room.power_levels")?.TypedContent is RoomPowerLevelEventContent powerLevels && powerLevels.UserHasPermission(HomeServer.UserId, "m.room.tombstone"))) { *@ @* Upgrade room *@ @* } *@ - View timeline - View state - Edit state + View timeline + View state + Edit state @if (roomType == "Space") { @@ -29,10 +30,10 @@ public KeyValuePair> Category { get; set; } [Parameter] - public ProfileResponseEventData? GlobalProfile { get; set; } + public ProfileResponseEventContent? GlobalProfile { get; set; } [CascadingParameter] - public AuthenticatedHomeServer HomeServer { get; set; } = null!; + public AuthenticatedHomeserverGeneric Homeserver { get; set; } = null!; private string roomType => Category.Key; private List rooms => Category.Value; @@ -40,7 +41,7 @@ private int RoomVersionDangerLevel(RoomInfo room) { var roomVersion = room.StateEvents.FirstOrDefault(x => x.Type == "m.room.create"); if (roomVersion is null) return 0; - return roomVersion.TypedContent is not RoomCreateEventData roomVersionContent ? 0 + return roomVersion.TypedContent is not RoomCreateEventContent roomVersionContent ? 0 : RoomConstants.DangerousRoomVersions.Contains(roomVersionContent.RoomVersion) ? 2 : roomVersionContent.RoomVersion != RoomConstants.RecommendedRoomVersion ? 1 : 0; } diff --git a/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListSpace.razor b/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListSpace.razor index 0867b48..1b54577 100644 --- a/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListSpace.razor +++ b/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListSpace.razor @@ -30,7 +30,7 @@ protected override async Task OnInitializedAsync() { if (Breadcrumbs == null) throw new ArgumentNullException(nameof(Breadcrumbs)); await Task.Delay(Random.Shared.Next(1000, 10000)); - var rooms = Space.Room.AsSpace.GetRoomsAsync(); + var rooms = Space.Room.AsSpace.GetChildrenAsync(); await foreach (var room in rooms) { if (Breadcrumbs.Contains(room.RoomId)) continue; var roomInfo = KnownRooms.FirstOrDefault(x => x.Room.RoomId == room.RoomId); diff --git a/MatrixRoomUtils.Web/Shared/RoomListItem.razor b/MatrixRoomUtils.Web/Shared/RoomListItem.razor index 79844ef..b74643b 100644 --- a/MatrixRoomUtils.Web/Shared/RoomListItem.razor +++ b/MatrixRoomUtils.Web/Shared/RoomListItem.razor @@ -1,6 +1,7 @@ @using System.Text.Json @using LibMatrix @using LibMatrix.Helpers +@using LibMatrix.Homeservers @using LibMatrix.RoomTypes @using LibMatrix.StateEventTypes.Spec @using LibMatrix.StateEventTypes @@ -44,10 +45,10 @@ public bool ShowOwnProfile { get; set; } = false; [Parameter] - public RoomMemberEventData? OwnMemberState { get; set; } + public RoomMemberEventContent? OwnMemberState { get; set; } [CascadingParameter] - public ProfileResponseEventData? GlobalProfile { get; set; } + public ProfileResponseEventContent? GlobalProfile { get; set; } private string? roomName { get; set; } @@ -57,7 +58,7 @@ private bool hasDangerousRoomVersion { get; set; } = false; private static SemaphoreSlim _semaphoreSlim = new(8); - private static AuthenticatedHomeServer? hs { get; set; } + private static AuthenticatedHomeserverGeneric? hs { get; set; } protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); @@ -102,7 +103,7 @@ private async Task LoadOwnProfile() { if (!ShowOwnProfile) return; try { - OwnMemberState ??= (await RoomInfo.GetStateEvent("m.room.member", hs.UserId)).TypedContent as RoomMemberEventData; + OwnMemberState ??= (await RoomInfo.GetStateEvent("m.room.member", hs.UserId)).TypedContent as RoomMemberEventContent; GlobalProfile ??= await hs.GetProfile(hs.UserId); } catch (MatrixException e) { @@ -117,7 +118,7 @@ } private async Task CheckRoomVersion() { - var ce = (await RoomInfo.GetStateEvent("m.room.create")).TypedContent as RoomCreateEventData; + var ce = (await RoomInfo.GetStateEvent("m.room.create")).TypedContent as RoomCreateEventContent; if (int.TryParse(ce.RoomVersion, out var rv)) { if (rv < 10) hasOldRoomVersion = true; @@ -133,9 +134,9 @@ private async Task GetRoomInfo() { try { - roomName ??= ((await RoomInfo.GetStateEvent("m.room.name"))?.TypedContent as RoomNameEventData)?.Name ?? RoomId; + roomName ??= ((await RoomInfo.GetStateEvent("m.room.name"))?.TypedContent as RoomNameEventContent)?.Name ?? RoomId; - var state = (await RoomInfo.GetStateEvent("m.room.avatar")).TypedContent as RoomAvatarEventData; + var state = (await RoomInfo.GetStateEvent("m.room.avatar")).TypedContent as RoomAvatarEventContent; if (state?.Url is { } url) { roomIcon = MediaResolver.ResolveMediaUri(hs.FullHomeServerDomain, url); // Console.WriteLine($"Got avatar for room {RoomId}: {roomIcon} ({url})"); diff --git a/MatrixRoomUtils.Web/Shared/SimpleComponents/DictionaryEditor.razor b/MatrixRoomUtils.Web/Shared/SimpleComponents/DictionaryEditor.razor deleted file mode 100644 index afd1fdc..0000000 --- a/MatrixRoomUtils.Web/Shared/SimpleComponents/DictionaryEditor.razor +++ /dev/null @@ -1,38 +0,0 @@ -@using LibMatrix.Extensions - - @foreach (var i in Items.Keys) { - var key = i; - - -
- } -
- - -@code { - - [Parameter] - public Dictionary Items { get; set; } = new(); - - [Parameter] - [EditorRequired] - public EventCallback ItemsChanged { get; set; } - - [Parameter] - public Func? KeyFormatter { get; set; } - - [Parameter] - public Action? OnFocusLost { get; set; } - - protected override Task OnInitializedAsync() { - Console.WriteLine($"DictionaryEditor initialized with {Items.Count} items: {Items.ToJson()}"); - return base.OnInitializedAsync(); - } - - private void inputChanged(ChangeEventArgs obj, string key) { - Console.WriteLine($"StringListEditor inputChanged {key} {obj.Value}"); - Items[key] = obj.Value.ToString(); - ItemsChanged.InvokeAsync(); - } - -} diff --git a/MatrixRoomUtils.Web/Shared/SimpleComponents/FancyTextBox.razor b/MatrixRoomUtils.Web/Shared/SimpleComponents/FancyTextBox.razor deleted file mode 100644 index 966c44d..0000000 --- a/MatrixRoomUtils.Web/Shared/SimpleComponents/FancyTextBox.razor +++ /dev/null @@ -1,29 +0,0 @@ -@inject IJSRuntime JsRuntime -@if (isVisible) { - -} -else { - @(Formatter?.Invoke(Value) ?? (IsPassword ? string.Join("", Value.Select(x => '*')) : Value)) -} - -@code { - - [Parameter] - public string Value { get; set; } - - [Parameter] - public bool IsPassword { get; set; } = false; - - [Parameter] - public EventCallback ValueChanged { get; set; } - - [Parameter] - public Func? Formatter { get; set; } - - private bool isVisible { get; set; } = false; - - private ElementReference elementToFocus; - - protected override async Task OnAfterRenderAsync(bool firstRender) => await JsRuntime.InvokeVoidAsync("BlazorFocusElement", elementToFocus); - -} \ No newline at end of file diff --git a/MatrixRoomUtils.Web/Shared/SimpleComponents/FancyTextBox.razor.css b/MatrixRoomUtils.Web/Shared/SimpleComponents/FancyTextBox.razor.css deleted file mode 100644 index 01b2c6f..0000000 --- a/MatrixRoomUtils.Web/Shared/SimpleComponents/FancyTextBox.razor.css +++ /dev/null @@ -1,5 +0,0 @@ -.fancy-textbox-inline { - border-bottom: #ccc solid 1px; - height: 1.4em; - display: inline-block; -} \ No newline at end of file diff --git a/MatrixRoomUtils.Web/Shared/SimpleComponents/LinkButton.razor b/MatrixRoomUtils.Web/Shared/SimpleComponents/LinkButton.razor deleted file mode 100644 index b800989..0000000 --- a/MatrixRoomUtils.Web/Shared/SimpleComponents/LinkButton.razor +++ /dev/null @@ -1,20 +0,0 @@ - - @ChildContent - - -@code { - - [Parameter] - public string? href { get; set; } - - [Parameter] - public RenderFragment ChildContent { get; set; } - - [Parameter] - public string? Color { get; set; } - - [Parameter] - public Func? OnClick { get; set; } - -} diff --git a/MatrixRoomUtils.Web/Shared/SimpleComponents/StringListEditor.razor b/MatrixRoomUtils.Web/Shared/SimpleComponents/StringListEditor.razor deleted file mode 100644 index 2bd6ed5..0000000 --- a/MatrixRoomUtils.Web/Shared/SimpleComponents/StringListEditor.razor +++ /dev/null @@ -1,29 +0,0 @@ -@for (var i = 0; i < Items.Count; i++) { - var self = i; - - -
-} - - -@code { - - [Parameter] - public List Items { get; set; } = new(); - - [Parameter] - [EditorRequired] - public EventCallback ItemsChanged { get; set; } - - protected override Task OnInitializedAsync() { - Console.WriteLine($"StringListEditor initialized with {Items.Count} items: {string.Join(",", Items)}"); - return base.OnInitializedAsync(); - } - - private void inputChanged(string obj, int i) { - Console.WriteLine($"StringListEditor inputChanged {i} {obj}"); - Items[i] = obj; - ItemsChanged.InvokeAsync(); - } - -} \ No newline at end of file diff --git a/MatrixRoomUtils.Web/Shared/SimpleComponents/ToggleSlider.razor b/MatrixRoomUtils.Web/Shared/SimpleComponents/ToggleSlider.razor deleted file mode 100644 index 1a38e26..0000000 --- a/MatrixRoomUtils.Web/Shared/SimpleComponents/ToggleSlider.razor +++ /dev/null @@ -1,72 +0,0 @@ -@ChildContent - -
- -
- - - -@code { - - [Parameter] - public RenderFragment? ChildContent { get; set; } - - [Parameter] - public bool Value { get; set; } - - [Parameter] - public EventCallback ValueChanged { get; set; } - -} \ No newline at end of file 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

BaseTimelineItem

@code { @@ -11,6 +12,6 @@ public List 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 @@ @Event.StateKey changed their display name to @(roomMemberData.Displayname ?? Event.Sender) break; case "join": - joined + joined break; case "leave": @Event.StateKey left @@ -26,8 +26,8 @@ default: @Event.StateKey has an unknown state:
-        @Event.ToJson()
-    
+ @Event.ToJson() + 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
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
 
 

@Event.Sender created the room with room version @CreationEventContent.RoomVersion - @CreationEventContent.Federate ? "and" : "without" federating with other servers.
+ @(CreationEventContent.Federate ?? false ? "and" : "without") federating with other servers.
This room is of type @(CreationEventContent.Type ?? "Untyped room (usually a chat room)")

@@ -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
 
 
diff --git a/MatrixRoomUtils.Web/Shared/UserListItem.razor b/MatrixRoomUtils.Web/Shared/UserListItem.razor index a85a68d..7a55380 100644 --- a/MatrixRoomUtils.Web/Shared/UserListItem.razor +++ b/MatrixRoomUtils.Web/Shared/UserListItem.razor @@ -19,7 +19,7 @@ public RenderFragment? ChildContent { get; set; } [Parameter] - public ProfileResponseEventData User { get; set; } + public ProfileResponseEventContent User { get; set; } [Parameter] public string UserId { get; set; } -- cgit 1.5.1