mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 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
|
var docCreateSaveBox string
|
||||||
docCreateSavePathTpl := model.Conf.FileTree.DocCreateSavePath
|
docCreateSavePathTpl := model.Conf.FileTree.DocCreateSavePath
|
||||||
if nil != box {
|
if nil != box {
|
||||||
docCreateSaveBox = box.GetConf().DocCreateSaveBox
|
boxConf := box.GetConf()
|
||||||
docCreateSavePathTpl = box.GetConf().DocCreateSavePath
|
docCreateSaveBox = boxConf.DocCreateSaveBox
|
||||||
|
docCreateSavePathTpl = boxConf.DocCreateSavePath
|
||||||
}
|
}
|
||||||
if "" == docCreateSaveBox {
|
if "" == docCreateSaveBox {
|
||||||
docCreateSaveBox = model.Conf.FileTree.DocCreateSaveBox
|
docCreateSaveBox = model.Conf.FileTree.DocCreateSaveBox
|
||||||
}
|
}
|
||||||
|
if "" != docCreateSaveBox {
|
||||||
|
if nil == model.Conf.Box(docCreateSaveBox) {
|
||||||
|
docCreateSaveBox = notebook
|
||||||
|
}
|
||||||
|
}
|
||||||
if "" == docCreateSaveBox {
|
if "" == docCreateSaveBox {
|
||||||
docCreateSaveBox = notebook
|
docCreateSaveBox = notebook
|
||||||
}
|
}
|
||||||
|
|
@ -754,12 +760,18 @@ func getRefCreateSavePath(c *gin.Context) {
|
||||||
var refCreateSaveBox string
|
var refCreateSaveBox string
|
||||||
refCreateSavePathTpl := model.Conf.FileTree.RefCreateSavePath
|
refCreateSavePathTpl := model.Conf.FileTree.RefCreateSavePath
|
||||||
if nil != box {
|
if nil != box {
|
||||||
refCreateSaveBox = box.GetConf().RefCreateSaveBox
|
boxConf := box.GetConf()
|
||||||
refCreateSavePathTpl = box.GetConf().RefCreateSavePath
|
refCreateSaveBox = boxConf.RefCreateSaveBox
|
||||||
|
refCreateSavePathTpl = boxConf.RefCreateSavePath
|
||||||
}
|
}
|
||||||
if "" == refCreateSaveBox {
|
if "" == refCreateSaveBox {
|
||||||
refCreateSaveBox = model.Conf.FileTree.RefCreateSaveBox
|
refCreateSaveBox = model.Conf.FileTree.RefCreateSaveBox
|
||||||
}
|
}
|
||||||
|
if "" != refCreateSaveBox {
|
||||||
|
if nil == model.Conf.Box(refCreateSaveBox) {
|
||||||
|
refCreateSaveBox = notebook
|
||||||
|
}
|
||||||
|
}
|
||||||
if "" == refCreateSaveBox {
|
if "" == refCreateSaveBox {
|
||||||
refCreateSaveBox = notebook
|
refCreateSaveBox = notebook
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue