f827a7471c
- 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.
27 lines
766 B
Go
27 lines
766 B
Go
package response
|
|
|
|
import "agent-desk/internal/pkg/enums"
|
|
|
|
type AuthUserResponse struct {
|
|
ID int64 `json:"id"`
|
|
Username string `json:"username"`
|
|
Nickname string `json:"nickname"`
|
|
Avatar string `json:"avatar"`
|
|
Status enums.Status `json:"status"`
|
|
Roles []string `json:"roles"`
|
|
}
|
|
|
|
type LoginResponse struct {
|
|
AccessToken string `json:"accessToken"`
|
|
ExpiresAt string `json:"expiresAt"`
|
|
User *AuthUserResponse `json:"user"`
|
|
Permissions []string `json:"permissions"`
|
|
Roles []string `json:"roles"`
|
|
}
|
|
|
|
type PublicConfigResponse struct {
|
|
Language string `json:"language"`
|
|
WxWorkEnabled bool `json:"wxworkEnabled"`
|
|
OIDCEnabled bool `json:"oidcEnabled"`
|
|
}
|