🎨 支持设置页签打开最大数量 https://github.com/siyuan-note/siyuan/issues/2098

This commit is contained in:
Liang Ding 2022-06-23 10:59:24 +08:00
parent 57c094ee15
commit 4d0a71ce07
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 5 additions and 0 deletions

View file

@ -26,6 +26,7 @@ type FileTree struct {
RefCreateSavePath string `json:"refCreateSavePath"` // 块引时新建文档存储文件夹路径
CreateDocNameTemplate string `json:"createDocNameTemplate"` // 新建文档名模板
MaxListCount int `json:"maxListCount"` // 最大列出数量
MaxOpenTabCount int `json:"maxOpenTabCount"` // 最大打开页签数量
AllowCreateDeeper bool `json:"allowCreateDeeper"` // 允许创建超过 7 层深度的子文档
RemoveDocWithoutConfirm bool `json:"removeDocWithoutConfirm"` // 删除文档时是否不需要确认
@ -39,6 +40,7 @@ func NewFileTree() *FileTree {
Sort: util.SortModeCustom,
CreateDocNameTemplate: "",
MaxListCount: 512,
MaxOpenTabCount: 12,
AllowCreateDeeper: false,
}
}

View file

@ -130,6 +130,9 @@ func InitConf() {
if 1 > Conf.FileTree.MaxListCount {
Conf.FileTree.MaxListCount = 512
}
if 1 > Conf.FileTree.MaxOpenTabCount {
Conf.FileTree.MaxOpenTabCount = 12
}
if nil == Conf.Tag {
Conf.Tag = conf.NewTag()
}