mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-20 11:00:52 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
c27b285647
@ -612,6 +612,9 @@ func getDocCreateSavePath(c *gin.Context) {
|
|||||||
if "../" == docCreateSavePathTpl {
|
if "../" == docCreateSavePathTpl {
|
||||||
docCreateSavePathTpl = "../Untitled"
|
docCreateSavePathTpl = "../Untitled"
|
||||||
}
|
}
|
||||||
|
if "/" == docCreateSavePathTpl {
|
||||||
|
docCreateSavePathTpl = "/Untitled"
|
||||||
|
}
|
||||||
|
|
||||||
p, err := model.RenderGoTemplate(docCreateSavePathTpl)
|
p, err := model.RenderGoTemplate(docCreateSavePathTpl)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
|
@ -329,6 +329,9 @@ func setNotebookConf(c *gin.Context) {
|
|||||||
if "../" == boxConf.DocCreateSavePath {
|
if "../" == boxConf.DocCreateSavePath {
|
||||||
boxConf.DocCreateSavePath = "../Untitled"
|
boxConf.DocCreateSavePath = "../Untitled"
|
||||||
}
|
}
|
||||||
|
if "/" == boxConf.DocCreateSavePath {
|
||||||
|
boxConf.DocCreateSavePath = "/Untitled"
|
||||||
|
}
|
||||||
|
|
||||||
box.SaveConf(boxConf)
|
box.SaveConf(boxConf)
|
||||||
ret.Data = boxConf
|
ret.Data = boxConf
|
||||||
|
@ -398,6 +398,9 @@ func setFiletree(c *gin.Context) {
|
|||||||
if "../" == fileTree.DocCreateSavePath {
|
if "../" == fileTree.DocCreateSavePath {
|
||||||
fileTree.DocCreateSavePath = "../Untitled"
|
fileTree.DocCreateSavePath = "../Untitled"
|
||||||
}
|
}
|
||||||
|
if "/" == fileTree.DocCreateSavePath {
|
||||||
|
fileTree.DocCreateSavePath = "/Untitled"
|
||||||
|
}
|
||||||
|
|
||||||
if 1 > fileTree.MaxOpenTabCount {
|
if 1 > fileTree.MaxOpenTabCount {
|
||||||
fileTree.MaxOpenTabCount = 8
|
fileTree.MaxOpenTabCount = 8
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package av
|
package av
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"math"
|
"math"
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -210,8 +211,19 @@ func (value *Value) Compare(other *Value) int {
|
|||||||
}
|
}
|
||||||
case KeyTypeRollup:
|
case KeyTypeRollup:
|
||||||
if nil != value.Rollup && nil != other.Rollup {
|
if nil != value.Rollup && nil != other.Rollup {
|
||||||
vContent := strings.TrimSpace(strings.Join(value.Relation.Contents, " "))
|
vContentBuf := bytes.Buffer{}
|
||||||
oContent := strings.TrimSpace(strings.Join(other.Relation.Contents, " "))
|
for _, c := range value.Rollup.Contents {
|
||||||
|
vContentBuf.WriteString(c.String())
|
||||||
|
vContentBuf.WriteByte(' ')
|
||||||
|
}
|
||||||
|
vContent := strings.TrimSpace(vContentBuf.String())
|
||||||
|
oContentBuf := bytes.Buffer{}
|
||||||
|
for _, c := range other.Rollup.Contents {
|
||||||
|
oContentBuf.WriteString(c.String())
|
||||||
|
oContentBuf.WriteByte(' ')
|
||||||
|
}
|
||||||
|
oContent := strings.TrimSpace(oContentBuf.String())
|
||||||
|
|
||||||
if util.IsNumeric(vContent) && util.IsNumeric(oContent) {
|
if util.IsNumeric(vContent) && util.IsNumeric(oContent) {
|
||||||
v1, _ := strconv.ParseFloat(vContent, 64)
|
v1, _ := strconv.ParseFloat(vContent, 64)
|
||||||
v2, _ := strconv.ParseFloat(oContent, 64)
|
v2, _ := strconv.ParseFloat(oContent, 64)
|
||||||
|
@ -208,6 +208,9 @@ func InitConf() {
|
|||||||
if "../" == Conf.FileTree.DocCreateSavePath {
|
if "../" == Conf.FileTree.DocCreateSavePath {
|
||||||
Conf.FileTree.DocCreateSavePath = "../Untitled"
|
Conf.FileTree.DocCreateSavePath = "../Untitled"
|
||||||
}
|
}
|
||||||
|
if "/" == Conf.FileTree.DocCreateSavePath {
|
||||||
|
Conf.FileTree.DocCreateSavePath = "/Untitled"
|
||||||
|
}
|
||||||
util.UseSingleLineSave = Conf.FileTree.UseSingleLineSave
|
util.UseSingleLineSave = Conf.FileTree.UseSingleLineSave
|
||||||
|
|
||||||
util.CurrentCloudRegion = Conf.CloudRegion
|
util.CurrentCloudRegion = Conf.CloudRegion
|
||||||
|
Loading…
Reference in New Issue
Block a user