From 05e758268142488ad6c503aa4293c8bbb651fedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Fri, 3 Jun 2022 14:38:01 +0200 Subject: [PATCH] #387 - Release notes on about page. --- .../Components/AppVersion.razor.cs | 4 ++-- src/Money.Blazor.Host/Components/ReleaseNotes.cs | 7 ++++++- src/Money.Blazor.Host/Pages/About.razor | 15 +++++++++------ 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/Money.Blazor.Host/Components/AppVersion.razor.cs b/src/Money.Blazor.Host/Components/AppVersion.razor.cs index 8d806efb..37f2980c 100644 --- a/src/Money.Blazor.Host/Components/AppVersion.razor.cs +++ b/src/Money.Blazor.Host/Components/AppVersion.razor.cs @@ -22,8 +22,8 @@ public partial class AppVersion : IDisposable, [Inject] public IQueryDispatcher Queries { get; set; } - protected System.Version Client { get; set; } - protected System.Version Api { get; set; } + protected Version Client { get; set; } + protected Version Api { get; set; } protected async override Task OnInitializedAsync() { diff --git a/src/Money.Blazor.Host/Components/ReleaseNotes.cs b/src/Money.Blazor.Host/Components/ReleaseNotes.cs index aaece366..8bd5b374 100644 --- a/src/Money.Blazor.Host/Components/ReleaseNotes.cs +++ b/src/Money.Blazor.Host/Components/ReleaseNotes.cs @@ -17,6 +17,7 @@ public partial class ReleaseNotes : ComponentBase protected Navigator Navigator { get; set; } private readonly HttpClient http = new HttpClient(); + private static Task getTask; private string value; protected override async Task OnInitializedAsync() @@ -24,7 +25,11 @@ protected override async Task OnInitializedAsync() http.BaseAddress = new Uri(Navigator.UrlOrigin()); await base.OnInitializedAsync(); - value = await http.GetStringAsync("/release-notes.html"); + + if (getTask == null) + getTask = http.GetStringAsync("/release-notes.html"); + + value = await getTask; } protected override void BuildRenderTree(RenderTreeBuilder builder) diff --git a/src/Money.Blazor.Host/Pages/About.razor b/src/Money.Blazor.Host/Pages/About.razor index ce9cc961..134def4b 100644 --- a/src/Money.Blazor.Host/Pages/About.razor +++ b/src/Money.Blazor.Host/Pages/About.razor @@ -4,15 +4,12 @@ -

- -

- + Documentation - + Source code @@ -20,4 +17,10 @@ Report a bug -

\ No newline at end of file +

+ +

+ +

+ + \ No newline at end of file