diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-12-14 07:21:04 +0100 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-12-14 07:21:04 +0100 |
commit | 226c6291551c8f07b2f67914d2b28577b1df7244 (patch) | |
tree | c6371db23b54cb30cf734c60274518fbd6954db3 /MatrixRoomUtils.Web/Pages | |
parent | Temp state (diff) | |
download | MatrixUtils-226c6291551c8f07b2f67914d2b28577b1df7244.tar.xz |
Cleanup
Diffstat (limited to 'MatrixRoomUtils.Web/Pages')
9 files changed, 14 insertions, 10 deletions
diff --git a/MatrixRoomUtils.Web/Pages/About.razor b/MatrixRoomUtils.Web/Pages/About.razor index df6e6c2..a5864ab 100644 --- a/MatrixRoomUtils.Web/Pages/About.razor +++ b/MatrixRoomUtils.Web/Pages/About.razor @@ -11,7 +11,7 @@ <p>These range from joining rooms on dead homeservers, to managing your accounts and rooms, and creating rooms based on templates.</p> <br/><br/> -<p>You can find the source code on <a href="https://git.rory.gay/MatrixRoomUtils.git/">my git server</a>.<br/></p> +<p>You can find the source code on <a href="https://cgit.rory.gay/MatrixRoomUtils.git/">my git server</a>.<br/></p> <p>You can also join the <a href="https://matrix.to/#/%23mru%3Arory.gay?via=rory.gay&via=matrix.org&via=feline.support">Matrix room</a> for this project.</p> @if (ShowBinDownload) { <p>This deployment also serves a copy of the compiled, hosting-ready binaries at <a href="MRU-BIN.tar.xz">/MRU-BIN.tar.xz</a>!</p> diff --git a/MatrixRoomUtils.Web/Pages/Index.razor b/MatrixRoomUtils.Web/Pages/Index.razor index 68a4f26..2d1d6c0 100644 --- a/MatrixRoomUtils.Web/Pages/Index.razor +++ b/MatrixRoomUtils.Web/Pages/Index.razor @@ -92,7 +92,7 @@ Small collection of tools to do not-so-everyday things. throw; } catch (HttpRequestException e) { - logger.LogError(e, $"Failed to instantiate AuthenticatedHomeserver for {_auth}, homeserver may be offline?", token.UserId); + logger.LogError(e, $"Failed to instantiate AuthenticatedHomeserver for {token.ToJson()}, homeserver may be offline?", token.UserId); return; } var roomCountTask = hs.GetJoinedRooms(); diff --git a/MatrixRoomUtils.Web/Pages/ModerationUtilities/UserRoomHistory.razor b/MatrixRoomUtils.Web/Pages/ModerationUtilities/UserRoomHistory.razor index 02dfe44..d33756b 100644 --- a/MatrixRoomUtils.Web/Pages/ModerationUtilities/UserRoomHistory.razor +++ b/MatrixRoomUtils.Web/Pages/ModerationUtilities/UserRoomHistory.razor @@ -91,7 +91,8 @@ else { Type = RoomNameEventContent.EventId, TypedContent = new RoomNameEventContent() { Name = await room.GetNameOrFallbackAsync(4) - } + }, + RoomId = null, Sender = null, EventId = null //TODO implement }); StateHasChanged(); if (mxid != UserId) { diff --git a/MatrixRoomUtils.Web/Pages/Rooms/Create.razor b/MatrixRoomUtils.Web/Pages/Rooms/Create.razor index 08b21dd..e477f4c 100644 --- a/MatrixRoomUtils.Web/Pages/Rooms/Create.razor +++ b/MatrixRoomUtils.Web/Pages/Rooms/Create.razor @@ -4,6 +4,7 @@ @using ArcaneLibs.Extensions @using LibMatrix @using LibMatrix.EventTypes.Spec.State +@using LibMatrix.EventTypes.Spec.State.RoomInfo @using LibMatrix.Homeservers @using LibMatrix.Responses @using MatrixRoomUtils.Web.Classes.RoomCreationTemplates @@ -49,15 +50,15 @@ <tr> <td>Room type:</td> <td> - @if (creationEvent._creationContentBaseType is null) { + @if (creationEvent.CreationContentBaseType is null) { <p style="color: red;">creationEvent._creationContentBaseType is null!</p> } else { - <InputSelect @bind-Value="@creationEvent._creationContentBaseType.Type"> + <InputSelect @bind-Value="@creationEvent.CreationContentBaseType.Type"> <option value="">Room</option> <option value="m.space">Space</option> </InputSelect> - <FancyTextBox @bind-Value="@creationEvent._creationContentBaseType.Type"></FancyTextBox> + <FancyTextBox @bind-Value="@creationEvent.CreationContentBaseType.Type"></FancyTextBox> } </td> </tr> diff --git a/MatrixRoomUtils.Web/Pages/Rooms/Index.razor b/MatrixRoomUtils.Web/Pages/Rooms/Index.razor index e137b6c..fb44337 100644 --- a/MatrixRoomUtils.Web/Pages/Rooms/Index.razor +++ b/MatrixRoomUtils.Web/Pages/Rooms/Index.razor @@ -161,7 +161,7 @@ } RenderContents |= queue.Count == 0; if (queue.Count > 10) RenderContents = false; - await Task.Delay(RenderContents ? 25 : 25); + await Task.Delay(RenderContents ? 25 : 12); } // else { // Console.WriteLine("Failed to dequeue item"); diff --git a/MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor b/MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor index adedbd3..846d1cb 100644 --- a/MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor +++ b/MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor @@ -3,6 +3,7 @@ @using LibMatrix.Homeservers @using ArcaneLibs.Extensions @using LibMatrix.EventTypes.Spec.State +@using LibMatrix.EventTypes.Spec.State.Policy <h3>Policy list editor - Editing @RoomId</h3> <hr/> diff --git a/MatrixRoomUtils.Web/Pages/Tools/MassJoinRoom.razor b/MatrixRoomUtils.Web/Pages/Tools/MassJoinRoom.razor index bcf8095..816b7db 100644 --- a/MatrixRoomUtils.Web/Pages/Tools/MassJoinRoom.razor +++ b/MatrixRoomUtils.Web/Pages/Tools/MassJoinRoom.razor @@ -69,7 +69,7 @@ try { try { var joinRule = await room.GetJoinRuleAsync(); - if (joinRule.JoinRule == "public") return "Room is public, no invite needed"; + if (joinRule.JoinRule == RoomJoinRulesEventContent.JoinRules.Public) return "Room is public, no invite needed"; } catch { } var pls = await room.GetPowerLevelsAsync(); diff --git a/MatrixRoomUtils.Web/Pages/User/DMManager.razor b/MatrixRoomUtils.Web/Pages/User/DMManager.razor index f753f18..1b28516 100644 --- a/MatrixRoomUtils.Web/Pages/User/DMManager.razor +++ b/MatrixRoomUtils.Web/Pages/User/DMManager.razor @@ -46,7 +46,8 @@ Type = RoomNameEventContent.EventId, TypedContent = new RoomNameEventContent() { Name = await Homeserver.GetRoom(room).GetNameOrFallbackAsync(4) - } + }, + RoomId = room, Sender = null, EventId = null }); } StateHasChanged(); diff --git a/MatrixRoomUtils.Web/Pages/User/DMSpaceStages/DMSpaceStage1.razor b/MatrixRoomUtils.Web/Pages/User/DMSpaceStages/DMSpaceStage1.razor index f953f76..5958fc5 100644 --- a/MatrixRoomUtils.Web/Pages/User/DMSpaceStages/DMSpaceStage1.razor +++ b/MatrixRoomUtils.Web/Pages/User/DMSpaceStages/DMSpaceStage1.razor @@ -84,7 +84,7 @@ else { private async Task Execute() { if (string.IsNullOrWhiteSpace(DmSpace.DmSpaceConfiguration.DMSpaceId)) { var crr = CreateRoomRequest.CreatePrivate(DmSpace.Homeserver, "Direct Messages"); - crr._creationContentBaseType.Type = "m.space"; + crr.CreationContentBaseType.Type = "m.space"; DmSpace.DmSpaceConfiguration.DMSpaceId = (await DmSpace.Homeserver.CreateRoom(crr)).RoomId; } await DmSpace.Homeserver!.SetAccountDataAsync(DMSpaceConfiguration.EventId, DmSpace.DmSpaceConfiguration); |