diff options
Diffstat (limited to 'MatrixRoomUtils.Web/Shared/RoomListComponents')
3 files changed, 24 insertions, 1 deletions
diff --git a/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListCategory.razor b/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListCategory.razor index a7e9399..e860321 100644 --- a/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListCategory.razor +++ b/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListCategory.razor @@ -1,9 +1,12 @@ +@using MatrixRoomUtils.Core.StateEventTypes <details> <summary>@roomType (@rooms.Count)</summary> @foreach (var room in rooms) { <div class="room-list-item"> <RoomListItem Room="@room" ShowOwnProfile="@(roomType == "Room")"></RoomListItem> <MatrixRoomUtils.Web.Shared.SimpleComponents.LinkButton href="@($"/Rooms/{room.RoomId}/Timeline")">View timeline</MatrixRoomUtils.Web.Shared.SimpleComponents.LinkButton> + <MatrixRoomUtils.Web.Shared.SimpleComponents.LinkButton href="@($"/Rooms/{room.RoomId}/State/View")">View state</MatrixRoomUtils.Web.Shared.SimpleComponents.LinkButton> + <MatrixRoomUtils.Web.Shared.SimpleComponents.LinkButton href="@($"/Rooms/{room.RoomId}/State/Edit")">Edit state</MatrixRoomUtils.Web.Shared.SimpleComponents.LinkButton> @if (roomType == "Space") { <RoomListSpace Space="@room"></RoomListSpace> @@ -17,6 +20,9 @@ [Parameter] public KeyValuePair<string, List<GenericRoom>> Category { get; set; } + + [Parameter] + public ProfileResponse? GlobalProfile { get; set; } private string roomType => Category.Key; private List<GenericRoom> rooms => Category.Value; diff --git a/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListPolicyRoom.razor b/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListPolicyRoom.razor new file mode 100644 index 0000000..f05ac7b --- /dev/null +++ b/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListPolicyRoom.razor @@ -0,0 +1,12 @@ +<LinkButton href="@($"/Rooms/{Room.RoomId}/Policies")">Manage policies</LinkButton> + +@code { + + [Parameter] + public GenericRoom Room { get; set; } + + protected override async Task OnInitializedAsync() { + await base.OnInitializedAsync(); + } + +} \ No newline at end of file diff --git a/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListSpace.razor b/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListSpace.razor index 5d106c3..73dc334 100644 --- a/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListSpace.razor +++ b/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListSpace.razor @@ -26,7 +26,12 @@ protected override async Task OnInitializedAsync() { if (Breadcrumbs == null) throw new ArgumentNullException(nameof(Breadcrumbs)); - Children = (await Space.AsSpace.GetRoomsAsync()).Where(x => !Breadcrumbs.Contains(x.RoomId)).ToList(); + await Task.Delay(Random.Shared.Next(1000, 10000)); + var rooms = Space.AsSpace.GetRoomsAsync(); + await foreach (var room in rooms) { + if(Breadcrumbs.Contains(room.RoomId)) continue; + Children.Add(room); + } await base.OnInitializedAsync(); } |