From 1dc1c6563d4b3be4c7cf18b26c211c6cffba7d05 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Mon, 21 Apr 2025 12:39:48 +0200 Subject: [PATCH] Added OS language to the about page (#414) --- app/MindWork AI Studio/Pages/About.razor | 1 + app/MindWork AI Studio/Pages/About.razor.cs | 9 +++++++-- app/MindWork AI Studio/wwwroot/changelog/v0.9.41.md | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/MindWork AI Studio/Pages/About.razor b/app/MindWork AI Studio/Pages/About.razor index 32c8b5df..ce541476 100644 --- a/app/MindWork AI Studio/Pages/About.razor +++ b/app/MindWork AI Studio/Pages/About.razor @@ -17,6 +17,7 @@ + Check for updates diff --git a/app/MindWork AI Studio/Pages/About.razor.cs b/app/MindWork AI Studio/Pages/About.razor.cs index 0be178f7..1d9b92d0 100644 --- a/app/MindWork AI Studio/Pages/About.razor.cs +++ b/app/MindWork AI Studio/Pages/About.razor.cs @@ -25,6 +25,8 @@ public partial class About : ComponentBase private static readonly MetaDataAttribute META_DATA = ASSEMBLY.GetCustomAttribute()!; private static readonly MetaDataArchitecture META_DATA_ARCH = ASSEMBLY.GetCustomAttribute()!; + private string osLanguage = string.Empty; + private static string VersionDotnetRuntime => $"Used .NET runtime: v{META_DATA.DotnetVersion}"; private static string VersionDotnetSdk => $"Used .NET SDK: v{META_DATA.DotnetSdkVersion}"; @@ -38,11 +40,11 @@ public partial class About : ComponentBase private static string MudBlazorVersion => $"MudBlazor: v{META_DATA.MudBlazorVersion}"; private static string TauriVersion => $"Tauri: v{META_DATA.TauriVersion}"; + + private string OSLanguage => $"User-language provided by the OS: '{this.osLanguage}'"; private GetLogPathsResponse logPaths; - #region Overrides of ComponentBase - private async Task CopyStartupLogPath() { await this.RustService.CopyText2Clipboard(this.Snackbar, this.logPaths.LogStartupPath); @@ -53,8 +55,11 @@ public partial class About : ComponentBase await this.RustService.CopyText2Clipboard(this.Snackbar, this.logPaths.LogAppPath); } + #region Overrides of ComponentBase + protected override async Task OnInitializedAsync() { + this.osLanguage = await this.RustService.ReadUserLanguage(); this.logPaths = await this.RustService.GetLogPaths(); await base.OnInitializedAsync(); } diff --git a/app/MindWork AI Studio/wwwroot/changelog/v0.9.41.md b/app/MindWork AI Studio/wwwroot/changelog/v0.9.41.md index f7999237..1cc23068 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v0.9.41.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v0.9.41.md @@ -1,2 +1,3 @@ # 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. \ No newline at end of file