Merged changes from main

This commit is contained in:
Thorsten Sommer 2025-04-24 13:39:34 +02:00
parent 573abd4de4
commit 4df405608f
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 15 additions and 9 deletions

View File

@ -20,6 +20,7 @@
<MudListItem T="string" Icon="@Icons.Material.Outlined.Build" Text="@VersionRust"/>
<MudListItem T="string" Icon="@Icons.Material.Outlined.Widgets" Text="@MudBlazorVersion"/>
<MudListItem T="string" Icon="@Icons.Material.Outlined.Memory" Text="@TauriVersion"/>
<MudListItem T="string" Icon="@Icons.Material.Outlined.Translate" Text="@this.OSLanguage"/>
</MudList>
<MudButton Variant="Variant.Filled" Color="Color.Info" StartIcon="@Icons.Material.Filled.Update" OnClick="() => this.CheckForUpdate()">
@T("Check for updates")

View File

@ -23,12 +23,16 @@ public partial class About : MSGComponentBase
private static readonly MetaDataAttribute META_DATA = ASSEMBLY.GetCustomAttribute<MetaDataAttribute>()!;
private static readonly MetaDataArchitecture META_DATA_ARCH = ASSEMBLY.GetCustomAttribute<MetaDataArchitecture>()!;
private string osLanguage = string.Empty;
private static string VersionApp => $"MindWork AI Studio: v{META_DATA.Version} (commit {META_DATA.AppCommitHash}, build {META_DATA.BuildNum}, {META_DATA_ARCH.Architecture.ToRID().ToUserFriendlyName()})";
private static string MudBlazorVersion => $"MudBlazor: v{META_DATA.MudBlazorVersion}";
private static string TauriVersion => $"Tauri: v{META_DATA.TauriVersion}";
private string OSLanguage => $"{this.T("User-language provided by the OS")}: '{this.osLanguage}'";
private string VersionRust => $"{T("Used Rust compiler")}: v{META_DATA.RustVersion}";
private string VersionDotnetRuntime => $"{T("Used .NET runtime")}: v{META_DATA.DotnetVersion}";
@ -39,8 +43,17 @@ public partial class About : MSGComponentBase
private GetLogPathsResponse logPaths;
#region Overrides of ComponentBase
protected override async Task OnInitializedAsync()
{
this.osLanguage = await this.RustService.ReadUserLanguage();
this.logPaths = await this.RustService.GetLogPaths();
await base.OnInitializedAsync();
}
#endregion
private async Task CopyStartupLogPath()
{
@ -52,14 +65,6 @@ public partial class About : MSGComponentBase
await this.RustService.CopyText2Clipboard(this.Snackbar, this.logPaths.LogAppPath);
}
protected override async Task OnInitializedAsync()
{
this.logPaths = await this.RustService.GetLogPaths();
await base.OnInitializedAsync();
}
#endregion
private const string LICENSE = """
# Functional Source License, Version 1.1, MIT Future License