about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Pages/Index.razor
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-05-03 20:42:20 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-05-03 20:42:20 +0200
commitb02fb81a56bd94b38fdb26771c3e591419f0f49c (patch)
tree617538d36ff9be9ba0f5d13cb6076b02f017a91b /MatrixRoomUtils.Web/Pages/Index.razor
parentRefactor (diff)
downloadMatrixUtils-b02fb81a56bd94b38fdb26771c3e591419f0f49c.tar.xz
Small refactoring
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/Index.razor')
-rw-r--r--MatrixRoomUtils.Web/Pages/Index.razor17
1 files changed, 7 insertions, 10 deletions
diff --git a/MatrixRoomUtils.Web/Pages/Index.razor b/MatrixRoomUtils.Web/Pages/Index.razor
index ea9404d..8a5dcc4 100644
--- a/MatrixRoomUtils.Web/Pages/Index.razor
+++ b/MatrixRoomUtils.Web/Pages/Index.razor
@@ -1,8 +1,6 @@
-@page "/"
-@using MatrixRoomUtils.Web.Classes
-@using MatrixRoomUtils.Web.Shared.IndexComponents
-@using Blazored.LocalStorage
-@inject NavigationManager NavigationManager
+    @page "/"
+    @using MatrixRoomUtils.Web.Shared.IndexComponents
+    @inject NavigationManager NavigationManager
 @inject ILocalStorageService LocalStorage
 
 <PageTitle>Index</PageTitle>
@@ -14,20 +12,19 @@ Small collection of tools to do not-so-everyday things.
 <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: " + LocalStorageWrapper.LoginSessions.Count);
-    if (!LocalStorageWrapper.WasLoaded)
+    if (!RuntimeCache.WasLoaded)
     {
         Console.WriteLine("[INDEX] !!! LOCALSTORAGE WAS NOT LOADED !!!");
         LocalStorageWrapper.LoadFromLocalStorage(LocalStorage).GetAwaiter().OnCompleted(() =>
         {
-            Console.WriteLine("Users in cache: " + LocalStorageWrapper.LoginSessions.Count);
+            Console.WriteLine("Users in cache: " + RuntimeCache .LoginSessions.Count);
             StateHasChanged();
         });
     }
 }
 <form>
-    @foreach (var (token, user) in LocalStorageWrapper.LoginSessions)
+    @foreach (var (token, user) in RuntimeCache.LoginSessions)
     {
-        <IndexUserItem User="@user" Token="@token"/>
+        <IndexUserItem User="@user"/>
     }
 </form>
\ No newline at end of file