mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-13 10:44:20 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
cd80bb8aac
2 changed files with 10 additions and 1 deletions
|
|
@ -152,7 +152,7 @@ func setFiletree(c *gin.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
fileTree := &conf.FileTree{}
|
fileTree := conf.NewFileTree()
|
||||||
if err = gulu.JSON.UnmarshalJSON(param, fileTree); nil != err {
|
if err = gulu.JSON.UnmarshalJSON(param, fileTree); nil != err {
|
||||||
ret.Code = -1
|
ret.Code = -1
|
||||||
ret.Msg = err.Error()
|
ret.Msg = err.Error()
|
||||||
|
|
@ -166,6 +166,12 @@ func setFiletree(c *gin.Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if 1 > fileTree.MaxOpenTabCount {
|
||||||
|
fileTree.MaxOpenTabCount = 12
|
||||||
|
}
|
||||||
|
if 32 < fileTree.MaxOpenTabCount {
|
||||||
|
fileTree.MaxOpenTabCount = 32
|
||||||
|
}
|
||||||
model.Conf.FileTree = fileTree
|
model.Conf.FileTree = fileTree
|
||||||
model.Conf.Save()
|
model.Conf.Save()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,9 @@ func InitConf() {
|
||||||
if 1 > Conf.FileTree.MaxOpenTabCount {
|
if 1 > Conf.FileTree.MaxOpenTabCount {
|
||||||
Conf.FileTree.MaxOpenTabCount = 12
|
Conf.FileTree.MaxOpenTabCount = 12
|
||||||
}
|
}
|
||||||
|
if 32 < Conf.FileTree.MaxOpenTabCount {
|
||||||
|
Conf.FileTree.MaxOpenTabCount = 32
|
||||||
|
}
|
||||||
if nil == Conf.Tag {
|
if nil == Conf.Tag {
|
||||||
Conf.Tag = conf.NewTag()
|
Conf.Tag = conf.NewTag()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue