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.Build" Text="@VersionRust"/>
<MudListItem T="string" Icon="@Icons.Material.Outlined.Widgets" Text="@MudBlazorVersion"/> <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.Memory" Text="@TauriVersion"/>
<MudListItem T="string" Icon="@Icons.Material.Outlined.Translate" Text="@this.OSLanguage"/>
</MudList> </MudList>
<MudButton Variant="Variant.Filled" Color="Color.Info" StartIcon="@Icons.Material.Filled.Update" OnClick="() => this.CheckForUpdate()"> <MudButton Variant="Variant.Filled" Color="Color.Info" StartIcon="@Icons.Material.Filled.Update" OnClick="() => this.CheckForUpdate()">
@T("Check for updates") @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 MetaDataAttribute META_DATA = ASSEMBLY.GetCustomAttribute<MetaDataAttribute>()!;
private static readonly MetaDataArchitecture META_DATA_ARCH = ASSEMBLY.GetCustomAttribute<MetaDataArchitecture>()!; 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 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 MudBlazorVersion => $"MudBlazor: v{META_DATA.MudBlazorVersion}";
private static string TauriVersion => $"Tauri: v{META_DATA.TauriVersion}"; 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 VersionRust => $"{T("Used Rust compiler")}: v{META_DATA.RustVersion}";
private string VersionDotnetRuntime => $"{T("Used .NET runtime")}: v{META_DATA.DotnetVersion}"; private string VersionDotnetRuntime => $"{T("Used .NET runtime")}: v{META_DATA.DotnetVersion}";
@ -42,6 +46,15 @@ public partial class About : MSGComponentBase
#region Overrides of ComponentBase #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() private async Task CopyStartupLogPath()
{ {
await this.RustService.CopyText2Clipboard(this.Snackbar, this.logPaths.LogStartupPath); await this.RustService.CopyText2Clipboard(this.Snackbar, this.logPaths.LogStartupPath);
@ -52,14 +65,6 @@ public partial class About : MSGComponentBase
await this.RustService.CopyText2Clipboard(this.Snackbar, this.logPaths.LogAppPath); 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 = """ private const string LICENSE = """
# Functional Source License, Version 1.1, MIT Future License # Functional Source License, Version 1.1, MIT Future License