diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-05-01 02:43:32 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-05-01 02:43:32 +0200 |
commit | df9031c47f8e97d8e2df3177093271a458f27267 (patch) | |
tree | 4e81dec4048c6e76a928ef69c905560d7c173fdf /MatrixRoomUtils.Web/Pages/Index.razor | |
download | MatrixUtils-df9031c47f8e97d8e2df3177093271a458f27267.tar.xz |
Initial commit
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/Index.razor')
-rw-r--r-- | MatrixRoomUtils.Web/Pages/Index.razor | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/MatrixRoomUtils.Web/Pages/Index.razor b/MatrixRoomUtils.Web/Pages/Index.razor new file mode 100644 index 0000000..7e9facf --- /dev/null +++ b/MatrixRoomUtils.Web/Pages/Index.razor @@ -0,0 +1,33 @@ +@page "/" +@using MatrixRoomUtils.Web.Classes +@using MatrixRoomUtils.Web.Shared.IndexComponents +@using Blazored.LocalStorage +@inject NavigationManager NavigationManager +@inject ILocalStorageService LocalStorage + +<PageTitle>Index</PageTitle> + +<h1>Rory&::MatrixUtils</h1> +Small collection of tools to do not-so-everyday things. + +<br/><br/> +<h5>Signed in accounts - <a href="/Login">Add new account</a> or <a href="/ImportUsers">Import from TSV</a></h5> +<hr/> +@{ + Console.WriteLine("Users in cache: " + RuntimeStorage.UsersCache.Count); + if (!RuntimeStorage.WasLoaded) + { + Console.WriteLine("[INDEX] !!! LOCALSTORAGE WAS NOT LOADED !!!"); + RuntimeStorage.LoadFromLocalStorage(LocalStorage).GetAwaiter().OnCompleted(() => + { + Console.WriteLine("Users in cache: " + RuntimeStorage.UsersCache.Count); + StateHasChanged(); + }); + } +} +<form> + @foreach (var (token, user) in RuntimeStorage.UsersCache) + { + <IndexUserItem User="@user" Token="@token"/> + } +</form> \ No newline at end of file |