@page "/Dev/Options"
@using ArcaneLibs.Extensions
@using System.Text.Unicode
@using System.Text
@using System.Text.Json
@inject NavigationManager NavigationManager
@inject ILocalStorageService LocalStorage
Developer options
Rory&::MatrixUtils - Developer options
Import local storage:
Export local storage:
@if (userSettings is not null) {
}
@code {
private MRUStorageWrapper.Settings? userSettings { get; set; }
protected override async Task OnInitializedAsync() {
// userSettings = await TieredStorage.DataStorageProvider.LoadObjectAsync("mru.settings");
await base.OnInitializedAsync();
}
private async Task LogStuff() {
await Task.Delay(100);
Console.WriteLine($"Settings: {userSettings.ToJson()}");
await TieredStorage.DataStorageProvider.SaveObjectAsync("mru.settings", userSettings);
}
private async Task ExportLocalStorage() {
var keys = await TieredStorage.DataStorageProvider.GetAllKeysAsync();
var data = new Dictionary();
foreach (var key in keys) {
data.Add(key, await TieredStorage.DataStorageProvider.LoadObjectAsync