diff options
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/Dev/DevOptions.razor')
-rw-r--r-- | MatrixRoomUtils.Web/Pages/Dev/DevOptions.razor | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/MatrixRoomUtils.Web/Pages/Dev/DevOptions.razor b/MatrixRoomUtils.Web/Pages/Dev/DevOptions.razor new file mode 100644 index 0000000..9b0f61c --- /dev/null +++ b/MatrixRoomUtils.Web/Pages/Dev/DevOptions.razor @@ -0,0 +1,30 @@ +@page "/Dev/Options" +@using ArcaneLibs.Extensions +@inject NavigationManager NavigationManager +@inject ILocalStorageService LocalStorage + +<PageTitle>Developer options</PageTitle> + +<h3>Rory&::MatrixUtils - Developer options</h3> +<hr/> + +<InputCheckbox @bind-Value="@settings.DeveloperSettings.EnableLogViewers" @oninput="@LogStuff"></InputCheckbox><label> Enable log views</label><br/> +<InputCheckbox @bind-Value="@settings.DeveloperSettings.EnableConsoleLogging" @oninput="@LogStuff"></InputCheckbox><label> Enable console logging</label><br/> +<InputCheckbox @bind-Value="@settings.DeveloperSettings.EnablePortableDevtools" @oninput="@LogStuff"></InputCheckbox><label> Enable portable devtools</label><br/> +<br/> + +@code { + + MRUStorageWrapper.Settings settings { get; set; } = new(); + protected override async Task OnInitializedAsync() { + settings = await TieredStorage.DataStorageProvider.LoadObjectAsync<MRUStorageWrapper.Settings>("mru.settings"); + await base.OnInitializedAsync(); + } + + private async Task LogStuff() { + await Task.Delay(100); + Console.WriteLine($"Settings: {settings.ToJson()}"); + await TieredStorage.DataStorageProvider.SaveObjectAsync("mru.settings", settings); + } + +} |