Skip to content

Commit

Permalink
#387 - Release notes on about page.
Browse files Browse the repository at this point in the history
  • Loading branch information
maraf committed Jun 3, 2022
1 parent 1063262 commit 05e7582
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/Money.Blazor.Host/Components/AppVersion.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
7 changes: 6 additions & 1 deletion src/Money.Blazor.Host/Components/ReleaseNotes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,19 @@ public partial class ReleaseNotes : ComponentBase
protected Navigator Navigator { get; set; }

private readonly HttpClient http = new HttpClient();
private static Task<string> getTask;
private string value;

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)
Expand Down
15 changes: 9 additions & 6 deletions src/Money.Blazor.Host/Pages/About.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
<Money.Components.Title Main="Money by Neptuo" />
<ExceptionPanel />

<p class="text-muted">
<AppVersion />
</p>
<p class="mt-4">
<a target="_blank" href="@Navigator.UrlMoneyProject()" class="btn btn-light mb-2 mr-2">
<a target="_blank" href="@Navigator.UrlMoneyProject()" class="btn btn-light mb-2 mr-2">
<Icon Identifier="book" />
Documentation
</a>
<a target="_blank" href="@Navigator.UrlGithubRepository()" class="btn btn-light mb-2 mr-2">
<a target="_blank" href="@Navigator.UrlGithubRepository()" class="btn btn-light mb-2 mr-2">
<Icon Identifier="github" Prefix="fab" />
Source code
</a>
<a target="_blank" href="@Navigator.UrlGithubRepositoryIssueNew()" class="btn btn-light mb-2 mr-2">
<Icon Identifier="bug" />
Report a bug
</a>
</p>
</p>

<p class="display-4" style="font-size: 2.5rem;">
<AppVersion />
</p>

<ReleaseNotes />

0 comments on commit 05e7582

Please sign in to comment.