🎨 Supports specifying the notebook to save new docs https://github.com/siyuan-note/siyuan/issues/10671
This commit is contained in:
parent
e2c14eb11f
commit
43359e92ec
4 changed files with 0 additions and 24 deletions
|
@ -727,12 +727,6 @@ func getDocCreateSavePath(c *gin.Context) {
|
|||
docCreateSavePathTpl = model.Conf.FileTree.DocCreateSavePath
|
||||
}
|
||||
docCreateSavePathTpl = strings.TrimSpace(docCreateSavePathTpl)
|
||||
if "../" == docCreateSavePathTpl {
|
||||
docCreateSavePathTpl = "../Untitled"
|
||||
}
|
||||
if "/" == docCreateSavePathTpl {
|
||||
docCreateSavePathTpl = "/Untitled"
|
||||
}
|
||||
|
||||
if docCreateSaveBox != notebook {
|
||||
if "" != docCreateSavePathTpl && !strings.HasPrefix(docCreateSavePathTpl, "/") {
|
||||
|
|
|
@ -326,12 +326,6 @@ func setNotebookConf(c *gin.Context) {
|
|||
}
|
||||
|
||||
boxConf.DocCreateSavePath = strings.TrimSpace(boxConf.DocCreateSavePath)
|
||||
if "../" == boxConf.DocCreateSavePath {
|
||||
boxConf.DocCreateSavePath = "../Untitled"
|
||||
}
|
||||
if "/" == boxConf.DocCreateSavePath {
|
||||
boxConf.DocCreateSavePath = "/Untitled"
|
||||
}
|
||||
|
||||
box.SaveConf(boxConf)
|
||||
ret.Data = boxConf
|
||||
|
|
|
@ -405,12 +405,6 @@ func setFiletree(c *gin.Context) {
|
|||
}
|
||||
|
||||
fileTree.DocCreateSavePath = strings.TrimSpace(fileTree.DocCreateSavePath)
|
||||
if "../" == fileTree.DocCreateSavePath {
|
||||
fileTree.DocCreateSavePath = "../Untitled"
|
||||
}
|
||||
if "/" == fileTree.DocCreateSavePath {
|
||||
fileTree.DocCreateSavePath = "/Untitled"
|
||||
}
|
||||
|
||||
if 1 > fileTree.MaxOpenTabCount {
|
||||
fileTree.MaxOpenTabCount = 8
|
||||
|
|
|
@ -217,12 +217,6 @@ func InitConf() {
|
|||
Conf.FileTree.MaxOpenTabCount = 32
|
||||
}
|
||||
Conf.FileTree.DocCreateSavePath = strings.TrimSpace(Conf.FileTree.DocCreateSavePath)
|
||||
if "../" == Conf.FileTree.DocCreateSavePath {
|
||||
Conf.FileTree.DocCreateSavePath = "../Untitled"
|
||||
}
|
||||
if "/" == Conf.FileTree.DocCreateSavePath {
|
||||
Conf.FileTree.DocCreateSavePath = "/Untitled"
|
||||
}
|
||||
util.UseSingleLineSave = Conf.FileTree.UseSingleLineSave
|
||||
|
||||
util.CurrentCloudRegion = Conf.CloudRegion
|
||||
|
|
Loading…
Add table
Reference in a new issue