Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
c27b285647
5 changed files with 26 additions and 2 deletions
|
@ -612,6 +612,9 @@ func getDocCreateSavePath(c *gin.Context) {
|
|||
if "../" == docCreateSavePathTpl {
|
||||
docCreateSavePathTpl = "../Untitled"
|
||||
}
|
||||
if "/" == docCreateSavePathTpl {
|
||||
docCreateSavePathTpl = "/Untitled"
|
||||
}
|
||||
|
||||
p, err := model.RenderGoTemplate(docCreateSavePathTpl)
|
||||
if nil != err {
|
||||
|
|
|
@ -329,6 +329,9 @@ func setNotebookConf(c *gin.Context) {
|
|||
if "../" == boxConf.DocCreateSavePath {
|
||||
boxConf.DocCreateSavePath = "../Untitled"
|
||||
}
|
||||
if "/" == boxConf.DocCreateSavePath {
|
||||
boxConf.DocCreateSavePath = "/Untitled"
|
||||
}
|
||||
|
||||
box.SaveConf(boxConf)
|
||||
ret.Data = boxConf
|
||||
|
|
|
@ -398,6 +398,9 @@ func setFiletree(c *gin.Context) {
|
|||
if "../" == fileTree.DocCreateSavePath {
|
||||
fileTree.DocCreateSavePath = "../Untitled"
|
||||
}
|
||||
if "/" == fileTree.DocCreateSavePath {
|
||||
fileTree.DocCreateSavePath = "/Untitled"
|
||||
}
|
||||
|
||||
if 1 > fileTree.MaxOpenTabCount {
|
||||
fileTree.MaxOpenTabCount = 8
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package av
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"math"
|
||||
"sort"
|
||||
"strconv"
|
||||
|
@ -210,8 +211,19 @@ func (value *Value) Compare(other *Value) int {
|
|||
}
|
||||
case KeyTypeRollup:
|
||||
if nil != value.Rollup && nil != other.Rollup {
|
||||
vContent := strings.TrimSpace(strings.Join(value.Relation.Contents, " "))
|
||||
oContent := strings.TrimSpace(strings.Join(other.Relation.Contents, " "))
|
||||
vContentBuf := bytes.Buffer{}
|
||||
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) {
|
||||
v1, _ := strconv.ParseFloat(vContent, 64)
|
||||
v2, _ := strconv.ParseFloat(oContent, 64)
|
||||
|
|
|
@ -208,6 +208,9 @@ func InitConf() {
|
|||
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