diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-13 20:25:05 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-13 20:25:05 +0200 |
commit | 712ad189c99570f686ab779782b2a873e172428e (patch) | |
tree | 6102e4719416e71522e9143fa4e06951258bd77c /MatrixRoomUtils.Web/Shared/PortableDevTools.razor | |
parent | Fix passwords being visible during editing (diff) | |
download | MatrixUtils-712ad189c99570f686ab779782b2a873e172428e.tar.xz |
Change syntax style
Diffstat (limited to 'MatrixRoomUtils.Web/Shared/PortableDevTools.razor')
-rw-r--r-- | MatrixRoomUtils.Web/Shared/PortableDevTools.razor | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/MatrixRoomUtils.Web/Shared/PortableDevTools.razor b/MatrixRoomUtils.Web/Shared/PortableDevTools.razor index 84e7791..ffd7082 100644 --- a/MatrixRoomUtils.Web/Shared/PortableDevTools.razor +++ b/MatrixRoomUtils.Web/Shared/PortableDevTools.razor @@ -1,9 +1,7 @@ - -@if (Enabled) -{ +@if (Enabled) { <a href="/DevOptions">Portable devtools (enabled)</a> <div id="PortableDevTools" style="position: fixed; bottom: 0; right: 0; min-width: 200px; min-height: 100px; background: #0002;" draggable> - <p>Cache size: @RuntimeCache.GenericResponseCache.Sum(x=>x.Value.Cache.Count)</p> + <p>Cache size: @RuntimeCache.GenericResponseCache.Sum(x => x.Value.Cache.Count)</p> </div> } else { @@ -13,19 +11,16 @@ else { @code { private bool Enabled { get; set; } = LocalStorageWrapper.Settings.DeveloperSettings.EnablePortableDevtools; - protected override async Task OnInitializedAsync() - { - // if(!RuntimeCache.WasLoaded) - // await LocalStorageWrapper.LoadFromLocalStorage(LocalStorage); - // StateHasChanged(); - Task.Run(async () => - { - while (true) - { + protected override async Task OnInitializedAsync() => + // if(!RuntimeCache.WasLoaded) + // await LocalStorageWrapper.LoadFromLocalStorage(LocalStorage); + // StateHasChanged(); + Task.Run(async () => { + while (true) { await Task.Delay(100); Enabled = LocalStorageWrapper.Settings.DeveloperSettings.EnablePortableDevtools; StateHasChanged(); } }); - } + } \ No newline at end of file |