Added OS language to the about page (#414)

This commit is contained in:
Thorsten Sommer 2025-04-21 12:39:48 +02:00 committed by GitHub
parent e594e5c0e8
commit 1dc1c6563d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 2 deletions

View File

@ -17,6 +17,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()">
Check for updates Check for updates

View File

@ -25,6 +25,8 @@ public partial class About : ComponentBase
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 VersionDotnetRuntime => $"Used .NET runtime: v{META_DATA.DotnetVersion}"; private static string VersionDotnetRuntime => $"Used .NET runtime: v{META_DATA.DotnetVersion}";
private static string VersionDotnetSdk => $"Used .NET SDK: v{META_DATA.DotnetSdkVersion}"; private static string VersionDotnetSdk => $"Used .NET SDK: v{META_DATA.DotnetSdkVersion}";
@ -39,9 +41,9 @@ public partial class About : ComponentBase
private static string TauriVersion => $"Tauri: v{META_DATA.TauriVersion}"; private static string TauriVersion => $"Tauri: v{META_DATA.TauriVersion}";
private GetLogPathsResponse logPaths; private string OSLanguage => $"User-language provided by the OS: '{this.osLanguage}'";
#region Overrides of ComponentBase private GetLogPathsResponse logPaths;
private async Task CopyStartupLogPath() private async Task CopyStartupLogPath()
{ {
@ -53,8 +55,11 @@ public partial class About : ComponentBase
await this.RustService.CopyText2Clipboard(this.Snackbar, this.logPaths.LogAppPath); await this.RustService.CopyText2Clipboard(this.Snackbar, this.logPaths.LogAppPath);
} }
#region Overrides of ComponentBase
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
{ {
this.osLanguage = await this.RustService.ReadUserLanguage();
this.logPaths = await this.RustService.GetLogPaths(); this.logPaths = await this.RustService.GetLogPaths();
await base.OnInitializedAsync(); await base.OnInitializedAsync();
} }

View File

@ -1,2 +1,3 @@
# v0.9.41, build 216 (2025-0x-xx xx:xx UTC) # v0.9.41, build 216 (2025-0x-xx xx:xx UTC)
- Added the user-language, as provided by the OS, to the about page. This helps in identifying user-specific issues related to language settings.
- Changed the terminology from "temporary chats" to "disappearing chats" in the UI. This makes it clearer to understand the purpose of these chats. - Changed the terminology from "temporary chats" to "disappearing chats" in the UI. This makes it clearer to understand the purpose of these chats.