mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Improve New document save location https://github.com/siyuan-note/siyuan/issues/10094
This commit is contained in:
parent
69f2eeb625
commit
e4cee23592
4 changed files with 0 additions and 16 deletions
|
|
@ -612,10 +612,6 @@ func getDocCreateSavePath(c *gin.Context) {
|
||||||
if "../" == docCreateSavePathTpl {
|
if "../" == docCreateSavePathTpl {
|
||||||
docCreateSavePathTpl = "../Untitled"
|
docCreateSavePathTpl = "../Untitled"
|
||||||
}
|
}
|
||||||
for strings.HasSuffix(docCreateSavePathTpl, "/") {
|
|
||||||
docCreateSavePathTpl = strings.TrimSuffix(docCreateSavePathTpl, "/")
|
|
||||||
docCreateSavePathTpl = strings.TrimSpace(docCreateSavePathTpl)
|
|
||||||
}
|
|
||||||
|
|
||||||
p, err := model.RenderGoTemplate(docCreateSavePathTpl)
|
p, err := model.RenderGoTemplate(docCreateSavePathTpl)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
|
|
|
||||||
|
|
@ -329,10 +329,6 @@ func setNotebookConf(c *gin.Context) {
|
||||||
if "../" == boxConf.DocCreateSavePath {
|
if "../" == boxConf.DocCreateSavePath {
|
||||||
boxConf.DocCreateSavePath = "../Untitled"
|
boxConf.DocCreateSavePath = "../Untitled"
|
||||||
}
|
}
|
||||||
for strings.HasSuffix(boxConf.DocCreateSavePath, "/") {
|
|
||||||
boxConf.DocCreateSavePath = strings.TrimSuffix(boxConf.DocCreateSavePath, "/")
|
|
||||||
boxConf.DocCreateSavePath = strings.TrimSpace(boxConf.DocCreateSavePath)
|
|
||||||
}
|
|
||||||
|
|
||||||
box.SaveConf(boxConf)
|
box.SaveConf(boxConf)
|
||||||
ret.Data = boxConf
|
ret.Data = boxConf
|
||||||
|
|
|
||||||
|
|
@ -377,10 +377,6 @@ func setFiletree(c *gin.Context) {
|
||||||
if "../" == fileTree.DocCreateSavePath {
|
if "../" == fileTree.DocCreateSavePath {
|
||||||
fileTree.DocCreateSavePath = "../Untitled"
|
fileTree.DocCreateSavePath = "../Untitled"
|
||||||
}
|
}
|
||||||
for strings.HasSuffix(fileTree.DocCreateSavePath, "/") {
|
|
||||||
fileTree.DocCreateSavePath = strings.TrimSuffix(fileTree.DocCreateSavePath, "/")
|
|
||||||
fileTree.DocCreateSavePath = strings.TrimSpace(fileTree.DocCreateSavePath)
|
|
||||||
}
|
|
||||||
|
|
||||||
if 1 > fileTree.MaxOpenTabCount {
|
if 1 > fileTree.MaxOpenTabCount {
|
||||||
fileTree.MaxOpenTabCount = 8
|
fileTree.MaxOpenTabCount = 8
|
||||||
|
|
|
||||||
|
|
@ -208,10 +208,6 @@ func InitConf() {
|
||||||
if "../" == Conf.FileTree.DocCreateSavePath {
|
if "../" == Conf.FileTree.DocCreateSavePath {
|
||||||
Conf.FileTree.DocCreateSavePath = "../Untitled"
|
Conf.FileTree.DocCreateSavePath = "../Untitled"
|
||||||
}
|
}
|
||||||
for strings.HasSuffix(Conf.FileTree.DocCreateSavePath, "/") {
|
|
||||||
Conf.FileTree.DocCreateSavePath = strings.TrimSuffix(Conf.FileTree.DocCreateSavePath, "/")
|
|
||||||
Conf.FileTree.DocCreateSavePath = strings.TrimSpace(Conf.FileTree.DocCreateSavePath)
|
|
||||||
}
|
|
||||||
util.UseSingleLineSave = Conf.FileTree.UseSingleLineSave
|
util.UseSingleLineSave = Conf.FileTree.UseSingleLineSave
|
||||||
|
|
||||||
util.CurrentCloudRegion = Conf.CloudRegion
|
util.CurrentCloudRegion = Conf.CloudRegion
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue