From 60d713b82fcc6b17858dd4975601ee67177a9313 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sun, 14 May 2023 15:07:47 +0200 Subject: Local changes --- MatrixRoomUtils.Web/Pages/MediaLocator.razor | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 MatrixRoomUtils.Web/Pages/MediaLocator.razor (limited to 'MatrixRoomUtils.Web/Pages/MediaLocator.razor') diff --git a/MatrixRoomUtils.Web/Pages/MediaLocator.razor b/MatrixRoomUtils.Web/Pages/MediaLocator.razor new file mode 100644 index 0000000..cd244ef --- /dev/null +++ b/MatrixRoomUtils.Web/Pages/MediaLocator.razor @@ -0,0 +1,36 @@ +@page "/MediaLocator" +

MediaLocator

+
+ +MXC URL: + + + + +@code { + string mxcUrl { get; set; } + List successResults = new List(); + List errorResults = new List(); + List homeservers = new List(); + + protected override async Task OnInitializedAsync() + { + base.OnInitializedAsync(); + + } + + async Task executeSearch() + { + var client = new HttpClient(); + var response = await client.GetAsync($"https://matrix.org/_matrix/media/r0/identicon/{mxcUrl}"); + if (response.IsSuccessStatusCode) + { + successResults.Add(mxcUrl); + } + else + { + errorResults.Add(mxcUrl); + } + } + +} \ No newline at end of file -- cgit 1.4.1