diff options
Diffstat (limited to 'MatrixRoomUtils.Web')
38 files changed, 163 insertions, 95 deletions
diff --git a/MatrixRoomUtils.Web/Classes/LocalStorageProviderService.cs b/MatrixRoomUtils.Web/Classes/LocalStorageProviderService.cs index 256c43d..02d691a 100644 --- a/MatrixRoomUtils.Web/Classes/LocalStorageProviderService.cs +++ b/MatrixRoomUtils.Web/Classes/LocalStorageProviderService.cs @@ -1,7 +1,7 @@ using Blazored.LocalStorage; -using MatrixRoomUtils.Core.Interfaces.Services; +using LibMatrix.Interfaces.Services; -namespace MatrixRoomUtils.Web.Classes; +namespace MatrixRoomUtils.Web.Classes; public class LocalStorageProviderService : IStorageProvider { private readonly ILocalStorageService _localStorageService; @@ -23,4 +23,4 @@ public class LocalStorageProviderService : IStorageProvider { async Task<List<string>> IStorageProvider.GetAllKeysAsync() => (await _localStorageService.KeysAsync()).ToList(); async Task IStorageProvider.DeleteObjectAsync(string key) => await _localStorageService.RemoveItemAsync(key); -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/Classes/MRUStorageWrapper.cs b/MatrixRoomUtils.Web/Classes/MRUStorageWrapper.cs index d4b256b..e9d56b9 100644 --- a/MatrixRoomUtils.Web/Classes/MRUStorageWrapper.cs +++ b/MatrixRoomUtils.Web/Classes/MRUStorageWrapper.cs @@ -1,6 +1,6 @@ -using MatrixRoomUtils.Core; -using MatrixRoomUtils.Core.Responses; -using MatrixRoomUtils.Core.Services; +using LibMatrix; +using LibMatrix.Responses; +using LibMatrix.Services; using Microsoft.AspNetCore.Components; namespace MatrixRoomUtils.Web.Classes; diff --git a/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs b/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs index f895173..b6f6d56 100644 --- a/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs +++ b/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/DefaultRoomCreationTemplate.cs @@ -1,8 +1,8 @@ using System.Text.Json.Nodes; -using MatrixRoomUtils.Core; -using MatrixRoomUtils.Core.Responses; -using MatrixRoomUtils.Core.StateEventTypes; -using MatrixRoomUtils.Core.StateEventTypes.Spec; +using LibMatrix; +using LibMatrix.Responses; +using LibMatrix.StateEventTypes.Spec; +using LibMatrix.StateEventTypes; namespace MatrixRoomUtils.Web.Classes.RoomCreationTemplates; @@ -89,4 +89,4 @@ public class DefaultRoomCreationTemplate : IRoomCreationTemplate { } } }; -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/IRoomCreationTemplate.cs b/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/IRoomCreationTemplate.cs index bbb09b7..42503f7 100644 --- a/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/IRoomCreationTemplate.cs +++ b/MatrixRoomUtils.Web/Classes/RoomCreationTemplates/IRoomCreationTemplate.cs @@ -1,8 +1,8 @@ -using MatrixRoomUtils.Core.Responses; +using LibMatrix.Responses; namespace MatrixRoomUtils.Web.Classes.RoomCreationTemplates; public interface IRoomCreationTemplate { public CreateRoomRequest CreateRoomRequest { get; } public string Name { get; } -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/Classes/RoomInfo.cs b/MatrixRoomUtils.Web/Classes/RoomInfo.cs index f9d5452..4df81ec 100644 --- a/MatrixRoomUtils.Web/Classes/RoomInfo.cs +++ b/MatrixRoomUtils.Web/Classes/RoomInfo.cs @@ -1,7 +1,6 @@ -using MatrixRoomUtils.Core; -using MatrixRoomUtils.Core.Interfaces; -using MatrixRoomUtils.Core.Responses; -using MatrixRoomUtils.Core.RoomTypes; +using LibMatrix; +using LibMatrix.Responses; +using LibMatrix.RoomTypes; namespace MatrixRoomUtils.Web.Classes; diff --git a/MatrixRoomUtils.Web/Classes/SessionStorageProviderService.cs b/MatrixRoomUtils.Web/Classes/SessionStorageProviderService.cs index e497ee3..6f11cad 100644 --- a/MatrixRoomUtils.Web/Classes/SessionStorageProviderService.cs +++ b/MatrixRoomUtils.Web/Classes/SessionStorageProviderService.cs @@ -1,7 +1,7 @@ using Blazored.SessionStorage; -using MatrixRoomUtils.Core.Interfaces.Services; +using LibMatrix.Interfaces.Services; -namespace MatrixRoomUtils.Web.Classes; +namespace MatrixRoomUtils.Web.Classes; public class SessionStorageProviderService : IStorageProvider { private readonly ISessionStorageService _sessionStorageService; @@ -9,7 +9,7 @@ public class SessionStorageProviderService : IStorageProvider { public SessionStorageProviderService(ISessionStorageService sessionStorage) { _sessionStorageService = sessionStorage; } - + async Task IStorageProvider.SaveAllChildrenAsync<T>(string key, T value) => throw new NotImplementedException(); async Task<T?> IStorageProvider.LoadAllChildrenAsync<T>(string key) where T : default => throw new NotImplementedException(); @@ -23,4 +23,4 @@ public class SessionStorageProviderService : IStorageProvider { async Task<List<string>> IStorageProvider.GetAllKeysAsync() => (await _sessionStorageService.KeysAsync()).ToList(); async Task IStorageProvider.DeleteObjectAsync(string key) => await _sessionStorageService.RemoveItemAsync(key); -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/MatrixRoomUtils.Web.csproj b/MatrixRoomUtils.Web/MatrixRoomUtils.Web.csproj index 4b874c9..e6580e9 100644 --- a/MatrixRoomUtils.Web/MatrixRoomUtils.Web.csproj +++ b/MatrixRoomUtils.Web/MatrixRoomUtils.Web.csproj @@ -14,7 +14,7 @@ </ItemGroup> <ItemGroup> - <ProjectReference Include="..\MatrixRoomUtils.Core\MatrixRoomUtils.Core.csproj" /> + <ProjectReference Include="..\LibMatrix\LibMatrix\LibMatrix.csproj" /> </ItemGroup> </Project> diff --git a/MatrixRoomUtils.Web/Pages/DebugTools.razor b/MatrixRoomUtils.Web/Pages/DebugTools.razor index 5116754..afb1da2 100644 --- a/MatrixRoomUtils.Web/Pages/DebugTools.razor +++ b/MatrixRoomUtils.Web/Pages/DebugTools.razor @@ -1,6 +1,7 @@ @page "/Debug" @using System.Reflection -@using MatrixRoomUtils.Core.Interfaces +@using LibMatrix.Extensions +@using LibMatrix.Interfaces @inject ILocalStorageService LocalStorage @inject NavigationManager NavigationManager <h3>Debug Tools</h3> @@ -74,4 +75,4 @@ else { StateHasChanged(); } -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/Pages/DevOptions.razor b/MatrixRoomUtils.Web/Pages/DevOptions.razor index 70dac31..bf499a3 100644 --- a/MatrixRoomUtils.Web/Pages/DevOptions.razor +++ b/MatrixRoomUtils.Web/Pages/DevOptions.razor @@ -1,4 +1,5 @@ @page "/DevOptions" +@using LibMatrix.Extensions @inject NavigationManager NavigationManager @inject ILocalStorageService LocalStorage @@ -26,4 +27,4 @@ await TieredStorage.DataStorageProvider.SaveObjectAsync("mru.settings", settings); } -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/Pages/HSAdmin/RoomQuery.razor b/MatrixRoomUtils.Web/Pages/HSAdmin/RoomQuery.razor index e3ebc72..b2928ee 100644 --- a/MatrixRoomUtils.Web/Pages/HSAdmin/RoomQuery.razor +++ b/MatrixRoomUtils.Web/Pages/HSAdmin/RoomQuery.razor @@ -1,7 +1,8 @@ @page "/HSAdmin/RoomQuery" -@using MatrixRoomUtils.Core.Filters -@using MatrixRoomUtils.Core.Responses.Admin @using MatrixRoomUtils.Web.Shared.SimpleComponents +@using LibMatrix.Responses.Admin +@using LibMatrix.Filters +@using LibMatrix.Extensions <h3>Homeserver Administration - Room Query</h3> @@ -121,7 +122,7 @@ .tile150 { min-width: 150px; } - .range-sep { + .range-sep { display: inline-block; padding: 4px; width: 150px; @@ -193,4 +194,4 @@ { "state_events", "Number of state events" } }; -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/Pages/Index.razor b/MatrixRoomUtils.Web/Pages/Index.razor index 01e2be4..65ba68b 100644 --- a/MatrixRoomUtils.Web/Pages/Index.razor +++ b/MatrixRoomUtils.Web/Pages/Index.razor @@ -1,7 +1,8 @@ @page "/" -@using MatrixRoomUtils.Core.Helpers -@using MatrixRoomUtils.Core.Responses @using MatrixRoomUtils.Web.Shared.SimpleComponents +@using LibMatrix.Responses +@using LibMatrix +@using LibMatrix.Helpers <PageTitle>Index</PageTitle> diff --git a/MatrixRoomUtils.Web/Pages/InvalidSession.razor b/MatrixRoomUtils.Web/Pages/InvalidSession.razor index 3bcd797..2b030ce 100644 --- a/MatrixRoomUtils.Web/Pages/InvalidSession.razor +++ b/MatrixRoomUtils.Web/Pages/InvalidSession.razor @@ -1,7 +1,7 @@ @page "/InvalidSession" -@using MatrixRoomUtils.Core.Helpers -@using MatrixRoomUtils.Core.Responses @using MatrixRoomUtils.Web.Shared.SimpleComponents +@using LibMatrix.Responses +@using LibMatrix <PageTitle>Invalid session</PageTitle> diff --git a/MatrixRoomUtils.Web/Pages/KnownHomeserverList.razor b/MatrixRoomUtils.Web/Pages/KnownHomeserverList.razor index 5ccecab..10a2929 100644 --- a/MatrixRoomUtils.Web/Pages/KnownHomeserverList.razor +++ b/MatrixRoomUtils.Web/Pages/KnownHomeserverList.razor @@ -1,8 +1,10 @@ @page "/KnownHomeserverList" @using System.Text.Json @using System.Diagnostics -@using MatrixRoomUtils.Core.Responses -@using MatrixRoomUtils.Core.StateEventTypes +@using LibMatrix +@using LibMatrix.Extensions +@using LibMatrix.RoomTypes +@using LibMatrix.StateEventTypes <h3>Known Homeserver List</h3> <hr/> @@ -62,7 +64,7 @@ else { private async Task<List<HomeServerInfo>> GetHomeservers(int memberLimit = 1000, Func<HomeServerInfoQueryProgress, Task<bool>>? progressCallback = null) { HomeServerInfoQueryProgress progress = new(); List<HomeServerInfo> homeServers = new(); - + var rooms = await hs.GetJoinedRooms(); progress.TotalRooms = rooms.Count; @@ -168,4 +170,4 @@ else { } } -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/Pages/LoginPage.razor b/MatrixRoomUtils.Web/Pages/LoginPage.razor index e19dd04..9730cbe 100644 --- a/MatrixRoomUtils.Web/Pages/LoginPage.razor +++ b/MatrixRoomUtils.Web/Pages/LoginPage.razor @@ -1,6 +1,6 @@ @page "/Login" @using System.Text.Json -@using MatrixRoomUtils.Core.Responses +@using LibMatrix.Responses @using MatrixRoomUtils.Web.Shared.SimpleComponents @inject ILocalStorageService LocalStorage @inject IJSRuntime JsRuntime @@ -49,7 +49,7 @@ (string homeserver, string username, string password) newRecordInput = ("", "", ""); List<LoginResponse> LoggedInSessions { get; set; } = new(); - + async Task Login() { var loginTasks = records.Select(async record => { var (homeserver, username, password) = record; @@ -97,4 +97,4 @@ newRecordInput = ("", "", ""); } -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/Pages/MediaLocator.razor b/MatrixRoomUtils.Web/Pages/MediaLocator.razor index 6221041..8c41440 100644 --- a/MatrixRoomUtils.Web/Pages/MediaLocator.razor +++ b/MatrixRoomUtils.Web/Pages/MediaLocator.razor @@ -1,4 +1,5 @@ @page "/MediaLocator" +@using LibMatrix @inject HttpClient Http <h3>Media locator</h3> <hr/> @@ -106,4 +107,4 @@ StateHasChanged(); } -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/Pages/Rooms/Create.razor b/MatrixRoomUtils.Web/Pages/Rooms/Create.razor index 3a98801..ebf6444 100644 --- a/MatrixRoomUtils.Web/Pages/Rooms/Create.razor +++ b/MatrixRoomUtils.Web/Pages/Rooms/Create.razor @@ -1,10 +1,12 @@ @page "/Rooms/Create" -@using MatrixRoomUtils.Core.Responses @using System.Text.Json @using System.Reflection -@using MatrixRoomUtils.Core.Helpers -@using MatrixRoomUtils.Core.StateEventTypes -@using MatrixRoomUtils.Core.StateEventTypes.Spec +@using LibMatrix +@using LibMatrix.Extensions +@using LibMatrix.Helpers +@using LibMatrix.Responses +@using LibMatrix.StateEventTypes.Spec +@using LibMatrix.StateEventTypes @using MatrixRoomUtils.Web.Classes.RoomCreationTemplates @* @* ReSharper disable once RedundantUsingDirective - Must not remove this, Rider marks this as "unused" when it's not */ *@ @using MatrixRoomUtils.Web.Shared.SimpleComponents diff --git a/MatrixRoomUtils.Web/Pages/Rooms/Index.razor b/MatrixRoomUtils.Web/Pages/Rooms/Index.razor index 6d12dc2..89ededf 100644 --- a/MatrixRoomUtils.Web/Pages/Rooms/Index.razor +++ b/MatrixRoomUtils.Web/Pages/Rooms/Index.razor @@ -1,9 +1,9 @@ @page "/Rooms" -@using MatrixRoomUtils.Core.StateEventTypes -@using MatrixRoomUtils.Core.StateEventTypes.Spec -@using MatrixRoomUtils.Core.Filters -@using MatrixRoomUtils.Core.Helpers -@using MatrixRoomUtils.Core.Responses +@using LibMatrix.StateEventTypes +@using LibMatrix.StateEventTypes.Spec +@using LibMatrix.Filters +@using LibMatrix.Helpers +@using LibMatrix.Responses <h3>Room list</h3> <p>@Status</p> @if (RenderContents) { diff --git a/MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor b/MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor index cd4788b..3297bcb 100644 --- a/MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor +++ b/MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor @@ -1,9 +1,11 @@ @page "/Rooms/{RoomId}/Policies" -@using MatrixRoomUtils.Core.StateEventTypes +@using LibMatrix.StateEventTypes @using System.Text.Json -@using MatrixRoomUtils.Core.Helpers -@using MatrixRoomUtils.Core.Responses -@using MatrixRoomUtils.Core.StateEventTypes.Spec +@using LibMatrix +@using LibMatrix.Extensions +@using LibMatrix.Helpers +@using LibMatrix.Responses +@using LibMatrix.StateEventTypes.Spec <h3>Policy list editor - Editing @RoomId</h3> <hr/> diff --git a/MatrixRoomUtils.Web/Pages/Rooms/Space.razor b/MatrixRoomUtils.Web/Pages/Rooms/Space.razor index 91f97d0..15c7c70 100644 --- a/MatrixRoomUtils.Web/Pages/Rooms/Space.razor +++ b/MatrixRoomUtils.Web/Pages/Rooms/Space.razor @@ -1,6 +1,8 @@ @page "/Rooms/{RoomId}/Space" @using System.Text.Json -@using MatrixRoomUtils.Core.Responses +@using LibMatrix.Extensions +@using LibMatrix.Responses +@using LibMatrix.RoomTypes <h3>Room manager - Viewing Space</h3> <button onclick="@JoinAllRooms">Join all rooms</button> diff --git a/MatrixRoomUtils.Web/Pages/Rooms/StateEditor.razor b/MatrixRoomUtils.Web/Pages/Rooms/StateEditor.razor index 8b2ff0c..e01fca8 100644 --- a/MatrixRoomUtils.Web/Pages/Rooms/StateEditor.razor +++ b/MatrixRoomUtils.Web/Pages/Rooms/StateEditor.razor @@ -1,7 +1,8 @@ @page "/Rooms/{RoomId}/State/Edit" @using System.Net.Http.Headers @using System.Text.Json -@using MatrixRoomUtils.Core.Responses +@using LibMatrix.Extensions +@using LibMatrix.Responses @inject ILocalStorageService LocalStorage @inject NavigationManager NavigationManager <h3>Room state editor - Editing @RoomId</h3> @@ -142,4 +143,4 @@ } private string shownEventJson { get; set; } -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/Pages/Rooms/StateViewer.razor b/MatrixRoomUtils.Web/Pages/Rooms/StateViewer.razor index 09b38f0..cf23c36 100644 --- a/MatrixRoomUtils.Web/Pages/Rooms/StateViewer.razor +++ b/MatrixRoomUtils.Web/Pages/Rooms/StateViewer.razor @@ -1,7 +1,8 @@ @page "/Rooms/{RoomId}/State/View" @using System.Net.Http.Headers @using System.Text.Json -@using MatrixRoomUtils.Core.Responses +@using LibMatrix.Extensions +@using LibMatrix.Responses @inject ILocalStorageService LocalStorage @inject NavigationManager NavigationManager <h3>Room state viewer - Viewing @RoomId</h3> @@ -125,4 +126,4 @@ } private bool _showMembershipEvents; -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/Pages/Rooms/Timeline.razor b/MatrixRoomUtils.Web/Pages/Rooms/Timeline.razor index 2234dd9..7fe89cc 100644 --- a/MatrixRoomUtils.Web/Pages/Rooms/Timeline.razor +++ b/MatrixRoomUtils.Web/Pages/Rooms/Timeline.razor @@ -1,7 +1,8 @@ @page "/Rooms/{RoomId}/Timeline" @using MatrixRoomUtils.Web.Shared.TimelineComponents -@using MatrixRoomUtils.Core.Responses -@using MatrixRoomUtils.Core.StateEventTypes.Spec +@using LibMatrix +@using LibMatrix.Responses +@using LibMatrix.StateEventTypes.Spec <h3>RoomManagerTimeline</h3> <hr/> <p>Loaded @Events.Count events...</p> diff --git a/MatrixRoomUtils.Web/Program.cs b/MatrixRoomUtils.Web/Program.cs index 54d4f0d..c760108 100644 --- a/MatrixRoomUtils.Web/Program.cs +++ b/MatrixRoomUtils.Web/Program.cs @@ -2,7 +2,7 @@ using System.Text.Json; using System.Text.Json.Serialization; using Blazored.LocalStorage; using Blazored.SessionStorage; -using MatrixRoomUtils.Core.Services; +using LibMatrix.Services; using MatrixRoomUtils.Web; using MatrixRoomUtils.Web.Classes; using Microsoft.AspNetCore.Components.Web; @@ -41,4 +41,4 @@ builder.Services.AddScoped<TieredStorageService>(x => builder.Services.AddRoryLibMatrixServices(); builder.Services.AddScoped<MRUStorageWrapper>(); -await builder.Build().RunAsync(); \ No newline at end of file +await builder.Build().RunAsync(); diff --git a/MatrixRoomUtils.Web/Shared/InlineUserItem.razor b/MatrixRoomUtils.Web/Shared/InlineUserItem.razor index 25db838..f3a7162 100644 --- a/MatrixRoomUtils.Web/Shared/InlineUserItem.razor +++ b/MatrixRoomUtils.Web/Shared/InlineUserItem.razor @@ -1,7 +1,7 @@ -@using MatrixRoomUtils.Core.Responses -@using MatrixRoomUtils.Core.StateEventTypes -@using MatrixRoomUtils.Core.Helpers -@using MatrixRoomUtils.Core.StateEventTypes.Spec +@using LibMatrix.StateEventTypes +@using LibMatrix.StateEventTypes.Spec +@using LibMatrix +@using LibMatrix.Helpers <div style="background-color: #ffffff11; border-radius: 0.5em; height: 1em; display: inline-block; vertical-align: middle;" alt="@UserId"> <img style="@(ChildContent is not null ? "vertical-align: baseline;" : "vertical-align: top;") width: 1em; height: 1em; border-radius: 50%;" src="@ProfileAvatar"/> <span style="position: relative; top: -5px;">@ProfileName</span> diff --git a/MatrixRoomUtils.Web/Shared/ModalWindow.razor b/MatrixRoomUtils.Web/Shared/ModalWindow.razor index b40d246..2f001e1 100644 --- a/MatrixRoomUtils.Web/Shared/ModalWindow.razor +++ b/MatrixRoomUtils.Web/Shared/ModalWindow.razor @@ -1,3 +1,4 @@ +@using LibMatrix.Extensions <div class="r-modal" style="top: @(_y)px; left: @(_x)px;"> <div class="titlebar" @onmousedown="MouseDown" @onmouseup="MouseUp" @onmousemove="MouseMove" @onmouseleave="MouseMove"> <b class="title" @ref="_titleRef">@Title</b> diff --git a/MatrixRoomUtils.Web/Shared/RoomList.razor b/MatrixRoomUtils.Web/Shared/RoomList.razor index e3894a6..dc06d90 100644 --- a/MatrixRoomUtils.Web/Shared/RoomList.razor +++ b/MatrixRoomUtils.Web/Shared/RoomList.razor @@ -1,7 +1,8 @@ @using MatrixRoomUtils.Web.Shared.RoomListComponents; -@using MatrixRoomUtils.Core.StateEventTypes -@using MatrixRoomUtils.Core.StateEventTypes.Common -@using MatrixRoomUtils.Core.StateEventTypes.Spec +@using LibMatrix.StateEventTypes +@using LibMatrix.StateEventTypes.Spec +@using LibMatrix +@using LibMatrix.Extensions @if(Rooms.Count != RoomsWithTypes.Sum(x=>x.Value.Count)) { <p>Fetching room details... @RoomsWithTypes.Sum(x=>x.Value.Count) out of @Rooms.Count done!</p> @foreach (var category in RoomsWithTypes.OrderBy(x => x.Value.Count)) { diff --git a/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListCategory.razor b/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListCategory.razor index b798d49..c04df3f 100644 --- a/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListCategory.razor +++ b/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListCategory.razor @@ -1,6 +1,7 @@ -@using MatrixRoomUtils.Core.StateEventTypes -@using MatrixRoomUtils.Core.StateEventTypes.Spec +@using LibMatrix.StateEventTypes @using MatrixRoomUtils.Web.Classes.Constants +@using LibMatrix.StateEventTypes.Spec +@using LibMatrix <details> <summary>@roomType (@rooms.Count)</summary> @foreach (var room in rooms) { diff --git a/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListPolicyRoom.razor b/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListPolicyRoom.razor index f05ac7b..7afdc8c 100644 --- a/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListPolicyRoom.razor +++ b/MatrixRoomUtils.Web/Shared/RoomListComponents/RoomListPolicyRoom.razor @@ -1,3 +1,4 @@ +@using LibMatrix.RoomTypes <LinkButton href="@($"/Rooms/{Room.RoomId}/Policies")">Manage policies</LinkButton> @code { @@ -9,4 +10,4 @@ await base.OnInitializedAsync(); } -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/Shared/RoomListItem.razor b/MatrixRoomUtils.Web/Shared/RoomListItem.razor index e12f622..6e3adc6 100644 --- a/MatrixRoomUtils.Web/Shared/RoomListItem.razor +++ b/MatrixRoomUtils.Web/Shared/RoomListItem.razor @@ -1,8 +1,9 @@ -@using MatrixRoomUtils.Core.Extensions @using System.Text.Json -@using MatrixRoomUtils.Core.Helpers -@using MatrixRoomUtils.Core.StateEventTypes -@using MatrixRoomUtils.Core.StateEventTypes.Spec +@using LibMatrix +@using LibMatrix.Helpers +@using LibMatrix.RoomTypes +@using LibMatrix.StateEventTypes.Spec +@using LibMatrix.StateEventTypes @using MatrixRoomUtils.Web.Classes.Constants <div class="roomListItem" id="@RoomId" style="background-color: #ffffff11; border-radius: 25px; margin: 8px; width: fit-Content; @(hasDangerousRoomVersion ? "border: red 4px solid;" : hasOldRoomVersion ? "border: #FF0 1px solid;" : "")"> @if (OwnMemberState != null) { diff --git a/MatrixRoomUtils.Web/Shared/SimpleComponents/DictionaryEditor.razor b/MatrixRoomUtils.Web/Shared/SimpleComponents/DictionaryEditor.razor index ea7d2ec..afd1fdc 100644 --- a/MatrixRoomUtils.Web/Shared/SimpleComponents/DictionaryEditor.razor +++ b/MatrixRoomUtils.Web/Shared/SimpleComponents/DictionaryEditor.razor @@ -1,3 +1,4 @@ +@using LibMatrix.Extensions <table> @foreach (var i in Items.Keys) { var key = i; @@ -34,4 +35,4 @@ ItemsChanged.InvokeAsync(); } -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/Shared/TimelineComponents/BaseTimelineItem.razor b/MatrixRoomUtils.Web/Shared/TimelineComponents/BaseTimelineItem.razor index 920a38d..5172fa4 100644 --- a/MatrixRoomUtils.Web/Shared/TimelineComponents/BaseTimelineItem.razor +++ b/MatrixRoomUtils.Web/Shared/TimelineComponents/BaseTimelineItem.razor @@ -1,4 +1,5 @@ -@using MatrixRoomUtils.Core.Responses +@using LibMatrix.Responses +@using LibMatrix <h3>BaseTimelineItem</h3> @code { diff --git a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMemberItem.razor b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMemberItem.razor index 44eb06e..8239367 100644 --- a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMemberItem.razor +++ b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMemberItem.razor @@ -1,6 +1,6 @@ -@using MatrixRoomUtils.Core.Responses -@using MatrixRoomUtils.Core.StateEventTypes -@using MatrixRoomUtils.Core.StateEventTypes.Spec +@using LibMatrix.StateEventTypes +@using LibMatrix.StateEventTypes.Spec +@using LibMatrix.Extensions @inherits BaseTimelineItem @if (roomMemberData is not null) { diff --git a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMessageItem.razor b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMessageItem.razor index bf0e083..411b750 100644 --- a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMessageItem.razor +++ b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineMessageItem.razor @@ -1,4 +1,4 @@ -@using MatrixRoomUtils.Core.Responses +@using LibMatrix.Extensions @inherits BaseTimelineItem <pre> diff --git a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineRoomCreateItem.razor b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineRoomCreateItem.razor index de204a3..b20cc1a 100644 --- a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineRoomCreateItem.razor +++ b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineRoomCreateItem.razor @@ -1,5 +1,5 @@ -@using MatrixRoomUtils.Core.Responses -@using MatrixRoomUtils.Core.StateEventTypes.Spec +@using LibMatrix.StateEventTypes.Spec +@using LibMatrix.Extensions @inherits BaseTimelineItem <p> diff --git a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineUnknownItem.razor b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineUnknownItem.razor index d0871c3..8166f8a 100644 --- a/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineUnknownItem.razor +++ b/MatrixRoomUtils.Web/Shared/TimelineComponents/TimelineUnknownItem.razor @@ -1,3 +1,4 @@ +@using LibMatrix.Extensions @inherits BaseTimelineItem <div> diff --git a/MatrixRoomUtils.Web/Shared/UserListItem.razor b/MatrixRoomUtils.Web/Shared/UserListItem.razor index 20b1c8c..a85a68d 100644 --- a/MatrixRoomUtils.Web/Shared/UserListItem.razor +++ b/MatrixRoomUtils.Web/Shared/UserListItem.razor @@ -1,7 +1,6 @@ -@using MatrixRoomUtils.Core.Responses -@using MatrixRoomUtils.Core.StateEventTypes -@using MatrixRoomUtils.Core.Helpers -@using MatrixRoomUtils.Core.StateEventTypes.Spec +@using LibMatrix.StateEventTypes +@using LibMatrix.StateEventTypes.Spec +@using LibMatrix.Helpers <div style="background-color: #ffffff11; border-radius: 25px; margin: 8px; width: fit-Content;"> <img style="@(ChildContent is not null ? "vertical-align: baseline;" : "") width: 32px; height: 32px; border-radius: 50%;" src="@profileAvatar"/> <span style="vertical-align: middle; margin-right: 8px; border-radius: 75px;">@profileName</span> @@ -35,7 +34,7 @@ var hs = await MRUStorage.GetCurrentSessionOrNavigate(); if (hs is null) return; - + await _semaphoreSlim.WaitAsync(); if (User == null) { @@ -52,4 +51,4 @@ _semaphoreSlim.Release(); } -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/_Imports.razor b/MatrixRoomUtils.Web/_Imports.razor index b1d9212..cb08515 100644 --- a/MatrixRoomUtils.Web/_Imports.razor +++ b/MatrixRoomUtils.Web/_Imports.razor @@ -1,7 +1,7 @@ @using System.Net.Http @using System.Net.Http.Json @using Blazored.LocalStorage -@using MatrixRoomUtils.Core +@using LibMatrix.Services @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Web @@ -11,9 +11,6 @@ @using MatrixRoomUtils.Web @using MatrixRoomUtils.Web.Classes @using MatrixRoomUtils.Web.Shared -@using MatrixRoomUtils.Core.RoomTypes -@using MatrixRoomUtils.Core.Extensions -@using MatrixRoomUtils.Core.Services @using LinkButton = MatrixRoomUtils.Web.Shared.SimpleComponents.LinkButton diff --git a/MatrixRoomUtils.Web/deps.nix b/MatrixRoomUtils.Web/deps.nix new file mode 100644 index 0000000..f300724 --- /dev/null +++ b/MatrixRoomUtils.Web/deps.nix @@ -0,0 +1,49 @@ +{ fetchNuGet }: [ + (fetchNuGet { pname = "Blazored.LocalStorage"; version = "4.3.0"; sha256 = "086zf61frl1rhvppgns0lf9vjacx71z1qc8s4br8x22987ggzbj1"; }) + (fetchNuGet { pname = "Blazored.SessionStorage"; version = "2.3.0"; sha256 = "1fw7pmsf63cqkxpymgxbm4lvvp3770rza2ag968vrcm723jpbw29"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "7.0.8"; sha256 = "1w4x1spgb4x57qn3d1m9a3gyqnwwfk952kaxg8bqrki20a7qkhl4"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Authorization"; version = "7.0.0"; sha256 = "17q08sk2sfd68yb9iw1i6wkpk85ac8rj9ifrsb38psr44xs7060r"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Authorization"; version = "7.0.1"; sha256 = "0258g82vi5hnhicmdzkq75gdiwb0f5hlf7a75592hdcx23n7pjfx"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Authorization"; version = "7.0.7"; sha256 = "014mqxfic81hzacr1inigzwcl3ij03dzd7x1r1cvmjjw5br31yi1"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Components"; version = "7.0.0"; sha256 = "01r1wnzmgfmk21rq8w03i7n9rs4fqipki9f6m6qchp5acdi76kx2"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Components"; version = "7.0.1"; sha256 = "0y26ghy62qcqn3346dijppdhb8ipvlgg7sxscbpqsccs2607w97r"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Components"; version = "7.0.7"; sha256 = "0mggzxclxzk3ap73r2pilhq9gibjcw6zk2nkm0d6swflcsbaa2d8"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Components.Analyzers"; version = "7.0.0"; sha256 = "1b9cm4wz7h021al9ywpq3jijwh53hcqkf7q2410mwx1l5iibcam9"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Components.Analyzers"; version = "7.0.1"; sha256 = "17f7d2v2akz3d7zihlabjrd3viciilfj5qin9xqk4rzw8qqi2s6x"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Components.Analyzers"; version = "7.0.7"; sha256 = "0w14sv0rvwlghsgyyh2mbr37mi5azg9s84g1bpr8zwvwqdp9xkmk"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Components.Forms"; version = "7.0.0"; sha256 = "0szkcvkdpxrvldx9dzpnyrfgz9sjrl0am6p61z6da4aafrafzys1"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Components.Forms"; version = "7.0.1"; sha256 = "0x6mpaqlrcv2c6gs4arm2smy2c9q9m95jyc20i216hfrigym5vbs"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Components.Forms"; version = "7.0.7"; sha256 = "18g7v868113hh0nkljwsxbpdhiz1d1a8zz305cmnzhhwpqyqfn59"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Components.Web"; version = "7.0.0"; sha256 = "1w3ph80prpx5sb130mkl3zlgspvdhwygljhf3yjxnay2dd05rw0k"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Components.Web"; version = "7.0.1"; sha256 = "1izj62mfn4p98jhjvcr0mhvqyvigpf18hkamm202a2r11j6mvlkq"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Components.Web"; version = "7.0.7"; sha256 = "06l07l371ap8jl0nyv2w1yjsvpasqvvxdpc3bk3vlxbqa3gyaq9i"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Components.WebAssembly"; version = "7.0.7"; sha256 = "1fjwiala80ndbbp2wmw9hywq1id7lvqsv0c6g8f60rabhw0kndbm"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Components.WebAssembly.DevServer"; version = "7.0.7"; sha256 = "010a7l3dp7dg5ljsk3iv1yq3qjafzggss1v5hnycrrzklhy67m6d"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Metadata"; version = "7.0.0"; sha256 = "1vnilgndj5cck68a6r3vq40889049w7kmx9jm0c0af4f8xl4rgjz"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Metadata"; version = "7.0.1"; sha256 = "0mbhp8gfjfn7p9snd88zkds0jqcyrmw0zm4lpjq10ss6yiq8pxnj"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.Metadata"; version = "7.0.7"; sha256 = "1jd36lxh130m3fighgkmqbahc1qf17jsn18kr44bvi533h2wzqcm"; }) + (fetchNuGet { pname = "Microsoft.Extensions.Configuration"; version = "7.0.0"; sha256 = "0n1grglxql9llmrsbbnlz5chx8mxrb5cpvjngm0hfyrkgzcwz90d"; }) + (fetchNuGet { pname = "Microsoft.Extensions.Configuration.Abstractions"; version = "7.0.0"; sha256 = "1as8cygz0pagg17w22nsf6mb49lr2mcl1x8i3ad1wi8lyzygy1a3"; }) + (fetchNuGet { pname = "Microsoft.Extensions.Configuration.Binder"; version = "7.0.4"; sha256 = "0nj424i9428p5k0vpr7rmqs54fbr31f043y1bpl007g3xmy2xn4p"; }) + (fetchNuGet { pname = "Microsoft.Extensions.Configuration.FileExtensions"; version = "7.0.0"; sha256 = "1fk7dcz6gfhd1k1d8ksz22rnjvj1waqjzk29ym4i3dz73rsq8j1i"; }) + (fetchNuGet { pname = "Microsoft.Extensions.Configuration.Json"; version = "7.0.0"; sha256 = "05zjmrpp99l128wijp1fy8asskc11ls871qaqr4mjnz3gbfycxnj"; }) + (fetchNuGet { pname = "Microsoft.Extensions.DependencyInjection"; version = "7.0.0"; sha256 = "121zs4jp8iimgbpzm3wsglhjwkc06irg1pxy8c1zcdlsg34cfq1p"; }) + (fetchNuGet { pname = "Microsoft.Extensions.DependencyInjection.Abstractions"; version = "7.0.0"; sha256 = "181d7mp9307fs17lyy42f8cxnjwysddmpsalky4m0pqxcimnr6g7"; }) + (fetchNuGet { pname = "Microsoft.Extensions.FileProviders.Abstractions"; version = "7.0.0"; sha256 = "0ff20yklyjgyjzdyv7sybczgqhgd557m05dbwxzjznr0x41b180d"; }) + (fetchNuGet { pname = "Microsoft.Extensions.FileProviders.Physical"; version = "7.0.0"; sha256 = "1f1h0l47abw0spssd64qkhgd7b54pyzslyb586zp21milimcfmgv"; }) + (fetchNuGet { pname = "Microsoft.Extensions.FileSystemGlobbing"; version = "7.0.0"; sha256 = "1812vnkn8n0i4yr3k5azcxcfx1bbpcsmms95rdyxjfrzfksr05ai"; }) + (fetchNuGet { pname = "Microsoft.Extensions.Logging"; version = "7.0.0"; sha256 = "1bqd3pqn5dacgnkq0grc17cgb2i0w8z1raw12nwm3p3zhrfcvgxf"; }) + (fetchNuGet { pname = "Microsoft.Extensions.Logging.Abstractions"; version = "7.0.0"; sha256 = "1gn7d18i1wfy13vrwhmdv1rmsb4vrk26kqdld4cgvh77yigj90xs"; }) + (fetchNuGet { pname = "Microsoft.Extensions.Logging.Abstractions"; version = "7.0.1"; sha256 = "0xv3sqc1lbx5j4yy6g2w3kakzvrpwqs2ihax6lqasj5sz5map6fk"; }) + (fetchNuGet { pname = "Microsoft.Extensions.Options"; version = "7.0.0"; sha256 = "0b90zkrsk5dw3wr749rbynhpxlg4bgqdnd7d5vdlw2g9c7zlhgx6"; }) + (fetchNuGet { pname = "Microsoft.Extensions.Options"; version = "7.0.1"; sha256 = "0ghz4y4gxnf2vw8yvhz9nkw21p6q2qqwh19phkk1xwxywyilr3mq"; }) + (fetchNuGet { pname = "Microsoft.Extensions.Primitives"; version = "7.0.0"; sha256 = "1b4km9fszid9vp2zb3gya5ni9fn8bq62bzaas2ck2r7gs0sdys80"; }) + (fetchNuGet { pname = "Microsoft.JSInterop"; version = "7.0.0"; sha256 = "11215mbpdzwijikvhd30lzrarg07h94l0993gh94n6yvxp3b6wrp"; }) + (fetchNuGet { pname = "Microsoft.JSInterop"; version = "7.0.1"; sha256 = "0xkggwxd55azqcrwibvjzd4pksprlsk0331vfqrj7hsn7dlbrjkc"; }) + (fetchNuGet { pname = "Microsoft.JSInterop"; version = "7.0.7"; sha256 = "1pnmm8yyn5w3zr2war9jg33yjnvr24d27axsgybpx8n109hgs4aq"; }) + (fetchNuGet { pname = "Microsoft.JSInterop.WebAssembly"; version = "7.0.7"; sha256 = "06vx3amlfavww1xy1jnhrj8q9x4vkacrkgfwvylxj12ji8ski65q"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.linux-x64"; version = "7.0.8"; sha256 = "1dflhc1dfral612bdqxhm8dznyphvnl56ywjjak6s9nsjc4q8h0s"; }) + (fetchNuGet { pname = "System.IO.Pipelines"; version = "7.0.0"; sha256 = "1ila2vgi1w435j7g2y7ykp2pdbh9c5a02vm85vql89az93b7qvav"; }) + (fetchNuGet { pname = "System.Text.Encodings.Web"; version = "7.0.0"; sha256 = "1151hbyrcf8kyg1jz8k9awpbic98lwz9x129rg7zk1wrs6vjlpxl"; }) + (fetchNuGet { pname = "System.Text.Json"; version = "7.0.0"; sha256 = "0scb0lp7wbgcinaa4kqiqs7b8i5nx4ppfad81138jiwd1sl37pyp"; }) +] |