about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Pages/Index.razor
blob: decdb0c4b0f87b06ff1f9a30774a8cdaf7843ade (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@page "/"
@using MatrixRoomUtils.Web.Shared.IndexComponents
@inject NavigationManager NavigationManager
@inject ILocalStorageService LocalStorage

<PageTitle>Index</PageTitle>

<h3>Rory&::MatrixUtils</h3>
Small collection of tools to do not-so-everyday things.

<br/><br/>
<h5>Signed in accounts - <a href="/Login">Add new account</a></h5>
<hr/>
<form>
    @foreach (var (token, user) in RuntimeCache.LoginSessions)
    {
        <IndexUserItem User="@user"/>
    }
</form>

@code
{
    protected override async Task OnInitializedAsync()
    {
        if (!RuntimeCache.WasLoaded)
        {
            Console.WriteLine("[INDEX] !!! LOCALSTORAGE WAS NOT LOADED !!!");
            await LocalStorageWrapper.LoadFromLocalStorage(LocalStorage);
        }
        await base.OnInitializedAsync();
    }
}