refactor: remove LocaleSwitcher component and update locale handling

- Removed LocaleSwitcher from NavUser, SiteHeader, and WorkbenchHeader components.
- Updated tests to reflect the removal of LocaleSwitcher.
- Changed default locale from "en-US" to "zh-CN" in i18n configuration.
- Refactored locale resolution logic to read configured locale without relying on browser language detection.
- Updated AgentDesk SDK to support language configuration from public API.
- Cleaned up unused auth options fetching in the auth API.
This commit is contained in:
mlogclub
2026-06-26 14:46:01 +08:00
parent 12d188fc7e
commit f827a7471c
32 changed files with 215 additions and 268 deletions
+3 -2
View File
@@ -30,9 +30,10 @@ func Login(ctx *gin.Context) {
httpx.WriteJSON(ctx, ret)
}
func AuthOptions(ctx *gin.Context) {
func PublicConfig(ctx *gin.Context) {
cfg := config.Current()
httpx.WriteJSON(ctx, &response.AuthOptionsResponse{
httpx.WriteJSON(ctx, &response.PublicConfigResponse{
Language: cfg.LanguageOrDefault(),
WxWorkEnabled: cfg.WxWork.Enabled,
OIDCEnabled: cfg.OIDC.Enabled,
})