feat(custom): custom sidebar items
This commit is contained in:
@@ -13,13 +13,14 @@ import (
|
||||
// SiteConfig 站点全局设置序列
|
||||
type SiteConfig struct {
|
||||
// Basic Section
|
||||
InstanceID string `json:"instance_id,omitempty"`
|
||||
SiteName string `json:"title,omitempty"`
|
||||
Themes string `json:"themes,omitempty"`
|
||||
DefaultTheme string `json:"default_theme,omitempty"`
|
||||
User *user.User `json:"user,omitempty"`
|
||||
Logo string `json:"logo,omitempty"`
|
||||
LogoLight string `json:"logo_light,omitempty"`
|
||||
InstanceID string `json:"instance_id,omitempty"`
|
||||
SiteName string `json:"title,omitempty"`
|
||||
Themes string `json:"themes,omitempty"`
|
||||
DefaultTheme string `json:"default_theme,omitempty"`
|
||||
User *user.User `json:"user,omitempty"`
|
||||
Logo string `json:"logo,omitempty"`
|
||||
LogoLight string `json:"logo_light,omitempty"`
|
||||
CustomNavItems []setting.CustomNavItem `json:"custom_nav_items,omitempty"`
|
||||
|
||||
// Login Section
|
||||
LoginCaptcha bool `json:"login_captcha,omitempty"`
|
||||
@@ -128,7 +129,7 @@ func (s *GetSettingService) GetSiteConfig(c *gin.Context) (*SiteConfig, error) {
|
||||
reCaptcha := settings.ReCaptcha(c)
|
||||
capCaptcha := settings.CapCaptcha(c)
|
||||
appSetting := settings.AppSetting(c)
|
||||
|
||||
customNavItems := settings.CustomNavItems(c)
|
||||
return &SiteConfig{
|
||||
InstanceID: siteBasic.ID,
|
||||
SiteName: siteBasic.Name,
|
||||
@@ -144,6 +145,7 @@ func (s *GetSettingService) GetSiteConfig(c *gin.Context) (*SiteConfig, error) {
|
||||
CapSiteKey: capCaptcha.SiteKey,
|
||||
CapAssetServer: capCaptcha.AssetServer,
|
||||
AppPromotion: appSetting.Promotion,
|
||||
CustomNavItems: customNavItems,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user