mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-13 11:13:48 +00:00
Improved the loading of some components that require data fetching (#512)
This commit is contained in:
1 parent
3587f547b5
commit
181ba07d2d
5 files changed
+29
-18
No files matched your search
@@ -66,7 +66,10 @@ public partial class About : MSGComponentBase
|
||||
this.logPaths = await this.RustService.GetLogPaths();
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
await this.DeterminePandocVersion();
|
||||
|
||||
// Determine the Pandoc version may take some time, so we start it here
|
||||
// without waiting for the result:
|
||||
_ = this.DeterminePandocVersion();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -19,10 +19,12 @@ public partial class Home : MSGComponentBase
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await this.ReadLastChangeAsync();
|
||||
await base.OnInitializedAsync();
|
||||
|
||||
this.InitializeAdvantagesItems();
|
||||
|
||||
// Read the last change content asynchronously
|
||||
// without blocking the UI thread:
|
||||
_ = this.ReadLastChangeAsync();
|
||||
}
|
||||
|
||||
private void InitializeAdvantagesItems()
|
||||
@@ -61,6 +63,8 @@ public partial class Home : MSGComponentBase
|
||||
var latest = Changelog.LOGS.MaxBy(n => n.Build);
|
||||
using var response = await this.HttpClient.GetAsync($"changelog/{latest.Filename}");
|
||||
this.LastChangeContent = await response.Content.ReadAsStringAsync();
|
||||
|
||||
await this.InvokeAsync(this.StateHasChanged);
|
||||
}
|
||||
|
||||
private const string QUICK_START_GUIDE =
|
||||
|
||||
Reference in new issue
Block a user