feat: 可选社区上报与官方精选展柜
默认关闭,仪表盘一键开关;枢纽由运维配置收报,人工精选后展示于 /showcase。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -18,9 +18,10 @@ const (
|
||||
|
||||
// fileSettings 从 app.ini 读出的原始值(尚未解析为绝对路径)
|
||||
type fileSettings struct {
|
||||
Port int
|
||||
DataRel string
|
||||
JWTSecret string
|
||||
Port int
|
||||
DataRel string
|
||||
JWTSecret string
|
||||
CommunityHub bool // 维护者选项:是否作为社区枢纽收报
|
||||
}
|
||||
|
||||
func defaultFileSettings() fileSettings {
|
||||
@@ -62,6 +63,12 @@ func loadAppINI(path string) (fileSettings, error) {
|
||||
out.JWTSecret = strings.TrimSpace(sec.Key("JWT_SECRET").String())
|
||||
}
|
||||
|
||||
if sec, err := cfg.GetSection("community"); err == nil {
|
||||
if k := sec.Key("HUB"); k.String() != "" {
|
||||
out.CommunityHub = k.MustBool(false)
|
||||
}
|
||||
}
|
||||
|
||||
return out, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user