feature(BuildCalc) Added reset button, can change micro delay, and can alter timing interval again
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
@using System.Net.Http.Json
|
||||
@using Markdig.Extensions.Yaml
|
||||
@using Markdig.Syntax
|
||||
@using YamlDotNet.Serialization
|
||||
@inject HttpClient httpClient
|
||||
|
||||
@if (content == null)
|
||||
@@ -19,10 +15,10 @@ else
|
||||
</div>
|
||||
</div>
|
||||
<div class="docContent">@((MarkupString)Markdown.ToHtml(content, Pipeline))</div>
|
||||
<div class="docFooter"><EditLinkComponent Href="@GitUrl"></EditLinkComponent></div>
|
||||
<div class="docFooter">
|
||||
<EditLinkComponent Href="@GitUrl"></EditLinkComponent>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
}
|
||||
|
||||
<style>
|
||||
@@ -56,22 +52,33 @@ else
|
||||
</style>
|
||||
|
||||
@code {
|
||||
[Parameter] public DocContentModel DocContentModel { get; set; } = default!;
|
||||
|
||||
[Parameter]
|
||||
public DocContentModel DocContentModel { get; set; } = default!;
|
||||
|
||||
DocFrontMatterModel docFrontMatter = null!;
|
||||
private string? content = null;
|
||||
|
||||
|
||||
private string Filepath => $"content/docs/{DocContentModel.Content}.md";
|
||||
private string GitUrl => $"{Project.GitResourcesUrl}/{Filepath}";
|
||||
private MarkdownPipeline Pipeline => MarkdownFiles.Pipeline;
|
||||
|
||||
private async Task<DocFrontMatterModel> LoadContent() {
|
||||
private async Task<DocFrontMatterModel> LoadContent()
|
||||
{
|
||||
content = await MarkdownFiles.LoadMarkdown(httpClient, Filepath);
|
||||
|
||||
|
||||
return docFrontMatter =
|
||||
await MarkdownFiles.LoadFrontMatter<DocFrontMatterModel>(httpClient, Filepath);
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync() => await LoadContent();
|
||||
protected override async Task OnInitializedAsync() => await LoadContent();
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await LoadContent();
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await LoadContent();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user