mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 20:50:06 +00:00
🚸 增强面板自定义CSS功能
This commit is contained in:
@@ -27,8 +27,8 @@ func (cp *commonPage) home(c *gin.Context) {
|
||||
dao.ServerLock.RLock()
|
||||
defer dao.ServerLock.RUnlock()
|
||||
data := gin.H{
|
||||
"Servers": dao.ServerList,
|
||||
"CustomCSS": dao.Conf.Site.CustomCSS,
|
||||
"Servers": dao.ServerList,
|
||||
"CustomCode": dao.Conf.Site.CustomCode,
|
||||
}
|
||||
u, ok := c.Get(model.CtxKeyAuthorizedUser)
|
||||
if ok {
|
||||
|
||||
@@ -252,10 +252,10 @@ func (ma *memberAPI) logout(c *gin.Context) {
|
||||
}
|
||||
|
||||
type settingForm struct {
|
||||
Title string
|
||||
Admin string
|
||||
Theme string
|
||||
CustomCSS string
|
||||
Title string
|
||||
Admin string
|
||||
Theme string
|
||||
CustomCode string
|
||||
}
|
||||
|
||||
func (ma *memberAPI) updateSetting(c *gin.Context) {
|
||||
@@ -269,7 +269,7 @@ func (ma *memberAPI) updateSetting(c *gin.Context) {
|
||||
}
|
||||
dao.Conf.Site.Brand = sf.Title
|
||||
dao.Conf.Site.Theme = sf.Theme
|
||||
dao.Conf.Site.CustomCSS = sf.CustomCSS
|
||||
dao.Conf.Site.CustomCode = sf.CustomCode
|
||||
dao.Conf.GitHub.Admin = sf.Admin
|
||||
if err := dao.Conf.Save(); err != nil {
|
||||
c.JSON(http.StatusOK, model.Response{
|
||||
|
||||
Reference in New Issue
Block a user