-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
filetree.go
51 lines (46 loc) · 2.38 KB
/
filetree.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// SiYuan - Refactor your thinking
// Copyright (c) 2020-present, b3log.org
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
package conf
import (
"github.com/siyuan-note/siyuan/kernel/util"
)
type FileTree struct {
AlwaysSelectOpenedFile bool `json:"alwaysSelectOpenedFile"` // 是否自动选中当前打开的文件
OpenFilesUseCurrentTab bool `json:"openFilesUseCurrentTab"` // 在当前页签打开文件
RefCreateSaveBox string `json:"refCreateSaveBox"` // 块引时新建文档存储笔记本
RefCreateSavePath string `json:"refCreateSavePath"` // 块引时新建文档存储路径
DocCreateSaveBox string `json:"docCreateSaveBox"` // 新建文档存储笔记本
DocCreateSavePath string `json:"docCreateSavePath"` // 新建文档存储路径
MaxListCount int `json:"maxListCount"` // 最大列出数量
MaxOpenTabCount int `json:"maxOpenTabCount"` // 最大打开页签数量
AllowCreateDeeper bool `json:"allowCreateDeeper"` // 允许创建超过 7 层深度的子文档
RemoveDocWithoutConfirm bool `json:"removeDocWithoutConfirm"` // 删除文档时是否不需要确认
CloseTabsOnStart bool `json:"closeTabsOnStart"` // 启动时关闭所有页签
UseSingleLineSave bool `json:"useSingleLineSave"` // 使用单行保存文档 .sy 和属性视图 .json
Sort int `json:"sort"` // 排序方式
}
func NewFileTree() *FileTree {
return &FileTree{
AlwaysSelectOpenedFile: false,
OpenFilesUseCurrentTab: false,
Sort: util.SortModeCustom,
MaxListCount: 512,
MaxOpenTabCount: 8,
AllowCreateDeeper: false,
CloseTabsOnStart: false,
UseSingleLineSave: util.UseSingleLineSave,
}
}