feat(config): ThemeResp 增加品牌字段 + 公开品牌信息端点
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

- ThemeResp 新增 brand_name/brand_slogan/brand_features/brand_copyright 字段
- default_theme 提供品牌默认值
- 新增 PublicBrandResp 和 GET /api/v1/public/brand 公开端点(无需认证)
- ConfigModule 增加 public_routes 方法
- 更新测试覆盖品牌字段
This commit is contained in:
iven
2026-05-01 17:34:43 +08:00
parent a95e3d8645
commit 6eb2bf9c80
4 changed files with 68 additions and 5 deletions

View File

@@ -224,6 +224,23 @@ pub struct ThemeResp {
pub logo_url: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub sidebar_style: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub brand_name: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub brand_slogan: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub brand_features: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub brand_copyright: Option<String>,
}
/// 品牌信息公开响应(不含内部配置)
#[derive(Debug, Serialize, Deserialize, ToSchema, Clone)]
pub struct PublicBrandResp {
pub brand_name: String,
pub brand_slogan: String,
pub brand_features: String,
pub brand_copyright: String,
}
// --- Language DTOs (stored via settings) ---