1 files changed, 7 insertions, 10 deletions
diff --git a/MatrixRoomUtils.Web/Shared/MainLayout.razor b/MatrixRoomUtils.Web/Shared/MainLayout.razor
index cdb1205..317f9e6 100644
--- a/MatrixRoomUtils.Web/Shared/MainLayout.razor
+++ b/MatrixRoomUtils.Web/Shared/MainLayout.razor
@@ -11,8 +11,7 @@
<PortableDevTools></PortableDevTools>
<a href="https://git.rory.gay/MatrixRoomUtils.git/" target="_blank">Git</a>
<a href="https://matrix.to/#/%23mru%3Arory.gay?via=rory.gay&via=matrix.org&via=feline.support" target="_blank">Matrix</a>
- @if (showDownload)
- {
+ @if (showDownload) {
<a href="/MRU.tar.xz" target="_blank">Download</a>
}
</div>
@@ -24,24 +23,22 @@
</div>
@code {
- private bool showDownload { get; set; } = false;
+ private bool showDownload { get; set; }
- protected override async Task OnInitializedAsync()
- {
+ protected override async Task OnInitializedAsync() {
using var hc = new HttpClient();
- var hr = await hc.SendAsync(new(HttpMethod.Head, NavigationManager.ToAbsoluteUri("/MRU-BIN.tar.xz").AbsoluteUri));
+ var hr = await hc.SendAsync(new HttpRequestMessage(HttpMethod.Head, NavigationManager.ToAbsoluteUri("/MRU-BIN.tar.xz").AbsoluteUri));
showDownload = hr.StatusCode == HttpStatusCode.OK;
await LocalStorageWrapper.LoadFromLocalStorage(LocalStorage);
- if (!LocalStorageWrapper.Settings.DeveloperSettings.EnableConsoleLogging)
- {
+ if (!LocalStorageWrapper.Settings.DeveloperSettings.EnableConsoleLogging) {
Console.WriteLine("Console logging disabled!");
var sw = new StringWriter();
Console.SetOut(sw);
Console.SetError(sw);
}
-
- await base.OnInitializedAsync();
+ await base.OnInitializedAsync();
}
+
}
\ No newline at end of file
|