about summary refs log tree commit diff
path: root/MatrixUtils.Web/Shared/RoomListComponents/RoomListCategory.razor
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-01-29 10:15:27 +0100
committerRory& <root@rory.gay>2024-01-29 10:15:27 +0100
commit3e6a73599bb58161c08d8675ea23ee6c82c6675c (patch)
treef3c0d1e797a77ed5993478d742751d386e004fb7 /MatrixUtils.Web/Shared/RoomListComponents/RoomListCategory.razor
parentRoom member migrations (diff)
downloadMatrixUtils-3e6a73599bb58161c08d8675ea23ee6c82c6675c.tar.xz
Room list fixes, migration fix, update available handler
Diffstat (limited to 'MatrixUtils.Web/Shared/RoomListComponents/RoomListCategory.razor')
-rw-r--r--MatrixUtils.Web/Shared/RoomListComponents/RoomListCategory.razor11
1 files changed, 1 insertions, 10 deletions
diff --git a/MatrixUtils.Web/Shared/RoomListComponents/RoomListCategory.razor b/MatrixUtils.Web/Shared/RoomListComponents/RoomListCategory.razor
index 3d0070f..4b24c18 100644
--- a/MatrixUtils.Web/Shared/RoomListComponents/RoomListCategory.razor
+++ b/MatrixUtils.Web/Shared/RoomListComponents/RoomListCategory.razor
@@ -16,6 +16,7 @@
             <LinkButton href="@($"/Rooms/{room.Room.RoomId}/Timeline")">View timeline</LinkButton>
             <LinkButton href="@($"/Rooms/{room.Room.RoomId}/State/View")">View state</LinkButton>
             <LinkButton href="@($"/Rooms/{room.Room.RoomId}/State/Edit")">Edit state</LinkButton>
+            <LinkButton href="@($"/Tools/LeaveRoom?roomId={room.Room.RoomId}")" Color="#FF0000">Leave room</LinkButton>
 
             @if (room.CreationEventContent?.Type == "m.space") {
                 <RoomListSpace Space="@room"></RoomListSpace>
@@ -49,15 +50,5 @@
             : RoomConstants.DangerousRoomVersions.Contains(roomVersionContent.RoomVersion) ? 2
                 : roomVersionContent.RoomVersion != RoomConstants.RecommendedRoomVersion ? 1 : 0;
     }
-    
-    public static string GetRoomTypeName(string roomType) {
-        return roomType switch {
-            null => "Room",
-            "m.space" => "Space",
-            "org.matrix.mjolnir.policy" => "Policy room",
-            
-            _ => roomType
-        };
-    }
 
 }