From a67276252c8bfcd6b6c5344e70debc6d67d917a9 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sat, 27 May 2023 00:39:49 +0200 Subject: Been a while since I last committed --- MatrixRoomUtils.Web/Shared/EditablePre.razor | 18 ++++++++++++++++++ .../Shared/IndexComponents/IndexUserItem.razor | 2 +- MatrixRoomUtils.Web/Shared/MainLayout.razor | 2 +- MatrixRoomUtils.Web/Shared/RoomListItem.razor | 6 +++--- 4 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 MatrixRoomUtils.Web/Shared/EditablePre.razor (limited to 'MatrixRoomUtils.Web/Shared') diff --git a/MatrixRoomUtils.Web/Shared/EditablePre.razor b/MatrixRoomUtils.Web/Shared/EditablePre.razor new file mode 100644 index 0000000..01bea0d --- /dev/null +++ b/MatrixRoomUtils.Web/Shared/EditablePre.razor @@ -0,0 +1,18 @@ +@inherits InputBase +
@CurrentValue
+@code { + protected override bool TryParseValueFromString(string? value, out string result, out string? validationErrorMessage) + { + result = value; + validationErrorMessage = null; + return true; + } + + public object Id { get; set; } + + private async Task Callback() + { + Console.WriteLine("beep"); + } + +} \ No newline at end of file diff --git a/MatrixRoomUtils.Web/Shared/IndexComponents/IndexUserItem.razor b/MatrixRoomUtils.Web/Shared/IndexComponents/IndexUserItem.razor index 87ef831..016b993 100644 --- a/MatrixRoomUtils.Web/Shared/IndexComponents/IndexUserItem.razor +++ b/MatrixRoomUtils.Web/Shared/IndexComponents/IndexUserItem.razor @@ -31,7 +31,7 @@ { var hs = await new AuthenticatedHomeServer(User.LoginResponse.UserId, User.AccessToken, User.LoginResponse.HomeServer).Configure(); if (User.Profile.AvatarUrl != null && User.Profile.AvatarUrl != "") - _avatarUrl = await hs.ResolveMediaUri(User.Profile.AvatarUrl); + _avatarUrl = hs.ResolveMediaUri(User.Profile.AvatarUrl); else _avatarUrl = "https://api.dicebear.com/6.x/identicon/svg?seed=" + User.LoginResponse.UserId; _roomCount = (await hs.GetJoinedRooms()).Count; await base.OnInitializedAsync(); diff --git a/MatrixRoomUtils.Web/Shared/MainLayout.razor b/MatrixRoomUtils.Web/Shared/MainLayout.razor index b1b0b53..cdb1205 100644 --- a/MatrixRoomUtils.Web/Shared/MainLayout.razor +++ b/MatrixRoomUtils.Web/Shared/MainLayout.razor @@ -17,7 +17,7 @@ } -
+
@Body
diff --git a/MatrixRoomUtils.Web/Shared/RoomListItem.razor b/MatrixRoomUtils.Web/Shared/RoomListItem.razor index 317d25a..b7394c1 100644 --- a/MatrixRoomUtils.Web/Shared/RoomListItem.razor +++ b/MatrixRoomUtils.Web/Shared/RoomListItem.razor @@ -1,7 +1,7 @@ @using MatrixRoomUtils.Core.Authentication @using System.Text.Json @using MatrixRoomUtils.Core.Extensions -
+
@if (ShowOwnProfile) { @@ -96,7 +96,7 @@ var url = state.Value.GetProperty("url").GetString(); if (url != null) { - roomIcon = await RuntimeCache.CurrentHomeServer.ResolveMediaUri(url); + roomIcon = RuntimeCache.CurrentHomeServer.ResolveMediaUri(url); } } catch (InvalidOperationException e) @@ -116,7 +116,7 @@ if (_avatar.ValueKind == JsonValueKind.String) { hasCustomProfileAvatar = _avatar.GetString() != profile.AvatarUrl; - profileAvatar = await RuntimeCache.CurrentHomeServer.ResolveMediaUri(_avatar.GetString()); + profileAvatar = RuntimeCache.CurrentHomeServer.ResolveMediaUri(_avatar.GetString()); } else { -- cgit 1.5.1