@page "/RoomManager"
@inject ILocalStorageService LocalStorage
@inject NavigationManager NavigationManager
Room manager
@if (Rooms.Count == 0)
{
You are not in any rooms!
@* Loading progress: @checkedRoomCount/@totalRoomCount
*@
}
else
{
Room List
@foreach (var room in Rooms)
{
}
}
@code {
public List Rooms { get; set; } = new();
protected override async Task OnInitializedAsync()
{
if (!RuntimeCache.WasLoaded) await LocalStorageWrapper.LoadFromLocalStorage(LocalStorage);
await base.OnInitializedAsync();
if (RuntimeCache.CurrentHomeServer == null)
{
NavigationManager.NavigateTo("/Login");
return;
}
Rooms = (await RuntimeCache.CurrentHomeServer.GetJoinedRooms()).Select(x=>x.RoomId).ToList();
Console.WriteLine("Fetched joined rooms!");
}
}