mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 13:28:48 +01:00
🎨 Database .json follows the doc tree single line save setting https://github.com/siyuan-note/siyuan/issues/10571
This commit is contained in:
parent
8675b49daa
commit
7f82fc21af
7 changed files with 12 additions and 7 deletions
|
|
@ -468,7 +468,12 @@ func SaveAttributeView(av *AttributeView) (err error) {
|
|||
}
|
||||
}
|
||||
|
||||
data, err := gulu.JSON.MarshalJSON(av)
|
||||
var data []byte
|
||||
if util.UseSingleLineSave {
|
||||
data, err = gulu.JSON.MarshalJSON(av)
|
||||
} else {
|
||||
data, err = gulu.JSON.MarshalIndentJSON(av, "", "\t")
|
||||
}
|
||||
if nil != err {
|
||||
logging.LogErrorf("marshal attribute view [%s] failed: %s", av.ID, err)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ type FileTree struct {
|
|||
AllowCreateDeeper bool `json:"allowCreateDeeper"` // 允许创建超过 7 层深度的子文档
|
||||
RemoveDocWithoutConfirm bool `json:"removeDocWithoutConfirm"` // 删除文档时是否不需要确认
|
||||
CloseTabsOnStart bool `json:"closeTabsOnStart"` // 启动时关闭所有页签
|
||||
UseSingleLineSave bool `json:"useSingleLineSave"` // 使用单行保存 .sy 文件
|
||||
UseSingleLineSave bool `json:"useSingleLineSave"` // 使用单行保存文档 .sy 和属性视图 .json
|
||||
|
||||
Sort int `json:"sort"` // 排序方式
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue