about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListCategory.razor
blob: ecdcc680ac0474da875c04c1319fb40ea0a4b3b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<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>
            
            @if (roomType == "Space") {
                <RoomListSpace Space="@room"></RoomListSpace>
            }
        </div>
    }
</details>
<br/>

@code {

    [Parameter]
    public KeyValuePair<string, List<Room>> Category { get; set; }

    private string roomType => Category.Key;
    private List<Room> rooms => Category.Value;
    
}