mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 09:38:13 -05:00
Compare commits
No commits in common. "1acb4d033029a26640ef7c05ac7c4399573255a3" and "838106845902f736701b65ded6334bba19eb8884" have entirely different histories.
1acb4d0330
...
8381068459
@ -2,7 +2,6 @@ package controller
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
@ -40,8 +39,6 @@ func listConfig(c *gin.Context) (model.SettingResponse, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
conf.Config.Language = strings.Replace(conf.Config.Language, "_", "-", -1)
|
|
||||||
|
|
||||||
return conf, nil
|
return conf, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,9 +70,7 @@ func updateConfig(c *gin.Context) (any, error) {
|
|||||||
if !userTemplateValid {
|
if !userTemplateValid {
|
||||||
return nil, errors.New("invalid user template")
|
return nil, errors.New("invalid user template")
|
||||||
}
|
}
|
||||||
|
singleton.Conf.Language = sf.Language
|
||||||
singleton.Conf.Language = strings.Replace(sf.Language, "-", "_", -1)
|
|
||||||
|
|
||||||
singleton.Conf.EnableIPChangeNotification = sf.EnableIPChangeNotification
|
singleton.Conf.EnableIPChangeNotification = sf.EnableIPChangeNotification
|
||||||
singleton.Conf.EnablePlainIPInNotification = sf.EnablePlainIPInNotification
|
singleton.Conf.EnablePlainIPInNotification = sf.EnablePlainIPInNotification
|
||||||
singleton.Conf.Cover = sf.Cover
|
singleton.Conf.Cover = sf.Cover
|
||||||
|
@ -79,11 +79,12 @@ func (c *Config) Read(path string, frontendTemplates []FrontendTemplate) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.ListenPort == 0 {
|
if c.ListenPort == 0 {
|
||||||
c.ListenPort = 8008
|
c.ListenPort = 8008
|
||||||
}
|
}
|
||||||
if c.Language == "" {
|
if c.Language == "" {
|
||||||
c.Language = "en_US"
|
c.Language = "zh_CN"
|
||||||
}
|
}
|
||||||
if c.Location == "" {
|
if c.Location == "" {
|
||||||
c.Location = "Asia/Shanghai"
|
c.Location = "Asia/Shanghai"
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
name: "OfficialAdmin"
|
name: "OfficialAdmin"
|
||||||
repository: "https://github.com/nezhahq/admin-frontend"
|
repository: "https://github.com/nezhahq/admin-frontend"
|
||||||
author: "nezhahq"
|
author: "nezhahq"
|
||||||
version: "v1.2.0"
|
version: "v1.1.7"
|
||||||
isadmin: true
|
isadmin: true
|
||||||
isofficial: true
|
isofficial: true
|
||||||
- path: "user-dist"
|
- path: "user-dist"
|
||||||
name: "Official"
|
name: "Official"
|
||||||
repository: "https://github.com/hamster1963/nezha-dash-v1"
|
repository: "https://github.com/hamster1963/nezha-dash-v1"
|
||||||
author: "hamster1963"
|
author: "hamster1963"
|
||||||
version: "v1.3.5"
|
version: "v1.2.8"
|
||||||
isofficial: true
|
isofficial: true
|
||||||
- path: "nazhua-dist"
|
- path: "nazhua-dist"
|
||||||
name: "Nazhua"
|
name: "Nazhua"
|
||||||
|
Loading…
Reference in New Issue
Block a user