🎨 Supports specifying the notebook to save new docs https://github.com/siyuan-note/siyuan/issues/10671
This commit is contained in:
parent
37b888f24d
commit
62697aa940
1 changed files with 16 additions and 4 deletions
|
@ -707,12 +707,18 @@ func getDocCreateSavePath(c *gin.Context) {
|
|||
var docCreateSaveBox string
|
||||
docCreateSavePathTpl := model.Conf.FileTree.DocCreateSavePath
|
||||
if nil != box {
|
||||
docCreateSaveBox = box.GetConf().DocCreateSaveBox
|
||||
docCreateSavePathTpl = box.GetConf().DocCreateSavePath
|
||||
boxConf := box.GetConf()
|
||||
docCreateSaveBox = boxConf.DocCreateSaveBox
|
||||
docCreateSavePathTpl = boxConf.DocCreateSavePath
|
||||
}
|
||||
if "" == docCreateSaveBox {
|
||||
docCreateSaveBox = model.Conf.FileTree.DocCreateSaveBox
|
||||
}
|
||||
if "" != docCreateSaveBox {
|
||||
if nil == model.Conf.Box(docCreateSaveBox) {
|
||||
docCreateSaveBox = notebook
|
||||
}
|
||||
}
|
||||
if "" == docCreateSaveBox {
|
||||
docCreateSaveBox = notebook
|
||||
}
|
||||
|
@ -754,12 +760,18 @@ func getRefCreateSavePath(c *gin.Context) {
|
|||
var refCreateSaveBox string
|
||||
refCreateSavePathTpl := model.Conf.FileTree.RefCreateSavePath
|
||||
if nil != box {
|
||||
refCreateSaveBox = box.GetConf().RefCreateSaveBox
|
||||
refCreateSavePathTpl = box.GetConf().RefCreateSavePath
|
||||
boxConf := box.GetConf()
|
||||
refCreateSaveBox = boxConf.RefCreateSaveBox
|
||||
refCreateSavePathTpl = boxConf.RefCreateSavePath
|
||||
}
|
||||
if "" == refCreateSaveBox {
|
||||
refCreateSaveBox = model.Conf.FileTree.RefCreateSaveBox
|
||||
}
|
||||
if "" != refCreateSaveBox {
|
||||
if nil == model.Conf.Box(refCreateSaveBox) {
|
||||
refCreateSaveBox = notebook
|
||||
}
|
||||
}
|
||||
if "" == refCreateSaveBox {
|
||||
refCreateSaveBox = notebook
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue