about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Pages/Dev/DevOptions.razor
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-10-19 07:21:41 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-10-19 07:21:41 +0200
commit063fb6f12aea3a5b71c05beea22e7f6482c2f1cf (patch)
tree064aa9edd5a27017f95ed0a6b19ac69499005778 /MatrixRoomUtils.Web/Pages/Dev/DevOptions.razor
parentAdd user management page (diff)
downloadMatrixUtils-063fb6f12aea3a5b71c05beea22e7f6482c2f1cf.tar.xz
Refactor, fix stuff
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/Dev/DevOptions.razor')
-rw-r--r--MatrixRoomUtils.Web/Pages/Dev/DevOptions.razor30
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);
+    }
+
+}