diff --git a/MP.Prog/Pages/Setup.razor b/MP.Prog/Pages/Setup.razor index cd9bc354..ecabc739 100644 --- a/MP.Prog/Pages/Setup.razor +++ b/MP.Prog/Pages/Setup.razor @@ -6,10 +6,22 @@ @inject MessageService AppMService -

Setup

+
+
+

Setup

+
+
+ @if(isLoading) + { + + } + else - - -@code { - -} \ No newline at end of file + { + + } +
+ @**@ +
\ No newline at end of file diff --git a/MP.Prog/Pages/Setup.razor.cs b/MP.Prog/Pages/Setup.razor.cs new file mode 100644 index 00000000..6455e67e --- /dev/null +++ b/MP.Prog/Pages/Setup.razor.cs @@ -0,0 +1,32 @@ +using Microsoft.AspNetCore.Components; +using MP.Prog.Data; + +namespace MP.Prog.Pages +{ + public partial class Setup + { + #region Private Properties + + private bool isLoading { get; set; } = false; + + #endregion Private Properties + + #region Protected Properties + + [Inject] + protected FileArchDataService DataService { get; set; } + + #endregion Protected Properties + + #region Protected Methods + + protected async void ForceCheck(int maxHour) + { + isLoading = true; + await DataService.updateAllArchive(maxHour); + isLoading = false; + } + + #endregion Protected Methods + } +} \ No newline at end of file