移除与 PR #66 冲突的旧版简易模式实现(commit 7d4b7de)。 新版简易模式通过 run_mode 配置文件/环境变量控制,无需数据库设置。 后端变更: - 移除 SettingKeySimpleMode 常量 - 移除 SystemSettings/PublicSettings 中的 SimpleMode 字段 - 移除 setting_handler 中的简易模式切换逻辑 - 移除 userService 依赖(不再需要自动设置管理员并发数) 前端变更: - 移除 appStore.simpleMode 状态 - 移除设置页面的"使用模式"设置区块 - 移除 GroupsView 中的简易模式相关逻辑 - 移除相关国际化文案
44 lines
1.6 KiB
Go
44 lines
1.6 KiB
Go
package dto
|
|
|
|
// SystemSettings represents the admin settings API response payload.
|
|
type SystemSettings struct {
|
|
RegistrationEnabled bool `json:"registration_enabled"`
|
|
EmailVerifyEnabled bool `json:"email_verify_enabled"`
|
|
|
|
SmtpHost string `json:"smtp_host"`
|
|
SmtpPort int `json:"smtp_port"`
|
|
SmtpUsername string `json:"smtp_username"`
|
|
SmtpPassword string `json:"smtp_password,omitempty"`
|
|
SmtpFrom string `json:"smtp_from_email"`
|
|
SmtpFromName string `json:"smtp_from_name"`
|
|
SmtpUseTLS bool `json:"smtp_use_tls"`
|
|
|
|
TurnstileEnabled bool `json:"turnstile_enabled"`
|
|
TurnstileSiteKey string `json:"turnstile_site_key"`
|
|
TurnstileSecretKey string `json:"turnstile_secret_key,omitempty"`
|
|
|
|
SiteName string `json:"site_name"`
|
|
SiteLogo string `json:"site_logo"`
|
|
SiteSubtitle string `json:"site_subtitle"`
|
|
ApiBaseUrl string `json:"api_base_url"`
|
|
ContactInfo string `json:"contact_info"`
|
|
DocUrl string `json:"doc_url"`
|
|
|
|
DefaultConcurrency int `json:"default_concurrency"`
|
|
DefaultBalance float64 `json:"default_balance"`
|
|
}
|
|
|
|
type PublicSettings struct {
|
|
RegistrationEnabled bool `json:"registration_enabled"`
|
|
EmailVerifyEnabled bool `json:"email_verify_enabled"`
|
|
TurnstileEnabled bool `json:"turnstile_enabled"`
|
|
TurnstileSiteKey string `json:"turnstile_site_key"`
|
|
SiteName string `json:"site_name"`
|
|
SiteLogo string `json:"site_logo"`
|
|
SiteSubtitle string `json:"site_subtitle"`
|
|
ApiBaseUrl string `json:"api_base_url"`
|
|
ContactInfo string `json:"contact_info"`
|
|
DocUrl string `json:"doc_url"`
|
|
Version string `json:"version"`
|
|
}
|