about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Shared/MainLayout.razor
diff options
context:
space:
mode:
Diffstat (limited to 'MatrixRoomUtils.Web/Shared/MainLayout.razor')
-rw-r--r--MatrixRoomUtils.Web/Shared/MainLayout.razor36
1 files changed, 36 insertions, 0 deletions
diff --git a/MatrixRoomUtils.Web/Shared/MainLayout.razor b/MatrixRoomUtils.Web/Shared/MainLayout.razor
new file mode 100644

index 0000000..e0c8260 --- /dev/null +++ b/MatrixRoomUtils.Web/Shared/MainLayout.razor
@@ -0,0 +1,36 @@ +@inherits LayoutComponentBase + +@using Blazored.LocalStorage +@using MatrixRoomUtils.Web.Classes +@inject ILocalStorageService LocalStorage +@inject NavigationManager NavigationManager + +<div class="page"> + <div class="sidebar"> + <NavMenu/> + </div> + + <main> + <div class="top-row px-4"> + <a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a> + </div> + + <article class="content px-4"> + @Body + </article> + </main> +</div> + +@code { + + protected override async Task OnInitializedAsync() + { + if (!RuntimeStorage.WasLoaded) + { + await RuntimeStorage.LoadFromLocalStorage(LocalStorage); + Console.WriteLine("Loaded from local storage"); + StateHasChanged(); + } + } + +} \ No newline at end of file