about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Pages/HSAdmin
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-11-09 07:38:33 +0100
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-11-09 07:38:33 +0100
commitc37bcb0e4a878d4f4c0e47988adb8624131c82cd (patch)
tree706f5300ce83b511d807decddd5b3521168b5fc7 /MatrixRoomUtils.Web/Pages/HSAdmin
parentFix updates (diff)
downloadMatrixUtils-c37bcb0e4a878d4f4c0e47988adb8624131c82cd.tar.xz
event types
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/HSAdmin')
-rw-r--r--MatrixRoomUtils.Web/Pages/HSAdmin/HSAdmin.razor22
1 files changed, 18 insertions, 4 deletions
diff --git a/MatrixRoomUtils.Web/Pages/HSAdmin/HSAdmin.razor b/MatrixRoomUtils.Web/Pages/HSAdmin/HSAdmin.razor

index 59ce70f..c605e7a 100644 --- a/MatrixRoomUtils.Web/Pages/HSAdmin/HSAdmin.razor +++ b/MatrixRoomUtils.Web/Pages/HSAdmin/HSAdmin.razor
@@ -1,20 +1,34 @@ @page "/HSAdmin" @using LibMatrix.Homeservers +@using ArcaneLibs.Extensions <h3>Homeserver Admininistration</h3> <hr/> -<h4>Synapse tools</h4> -<hr/> -<a href="/HSAdmin/RoomQuery">Query rooms</a> +@if (Homeserver is null) { + <p>Homeserver is null...</p> +} +else { + @if (Homeserver is AuthenticatedHomeserverSynapse) { + <h4>Synapse tools</h4> + <hr/> + <a href="/HSAdmin/RoomQuery">Query rooms</a> + } + else { + <p>Homeserver type @Homeserver.GetType().Name does not have any administration tools in MRU.</p> + <p>Server info:</p> + <pre>@ServerVersionResponse?.ToJson(ignoreNull: true)</pre> + } +} @code { public AuthenticatedHomeserverGeneric? Homeserver { get; set; } + public ServerVersionResponse? ServerVersionResponse { get; set; } protected override async Task OnInitializedAsync() { Homeserver = await MRUStorage.GetCurrentSessionOrNavigate(); if (Homeserver is null) return; + ServerVersionResponse = await Homeserver.GetServerVersionAsync(); await base.OnInitializedAsync(); } - } \ No newline at end of file