瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

Vanessa 1 年之前
父節點
當前提交
cbe09a1fd9

+ 1 - 1
app/src/protyle/render/av/rollup.ts

@@ -37,7 +37,7 @@ const genSearchList = (element: Element, keyword: string, avId: string, cb?: ()
         keyword
     }, (response) => {
         let html = "";
-        response.data.nonRelationKeys.forEach((item: IAVColumn, index: number) => {
+        response.data.keys.forEach((item: IAVColumn, index: number) => {
             html += `<div class="b3-list-item b3-list-item--narrow${index === 0 ? " b3-list-item--focus" : ""}" data-col-id="${item.id}">
         ${item.icon ? unicode2Emoji(item.icon, "b3-list-item__graphic", true) : `<svg class="b3-list-item__graphic"><use xlink:href="#${getColIconByType(item.type)}"></use></svg>`}
         ${genIconHTML()}

文件差異過大導致無法顯示
+ 0 - 0
app/stage/protyle/js/lute/lute.min.js


+ 2 - 2
kernel/api/av.go

@@ -40,7 +40,7 @@ func searchAttributeViewNonRelationKey(c *gin.Context) {
 
 	nonRelationKeys := model.SearchAttributeViewNonRelationKey(avID, keyword)
 	ret.Data = map[string]interface{}{
-		"nonRelationKeys": nonRelationKeys,
+		"keys": nonRelationKeys,
 	}
 }
 
@@ -58,7 +58,7 @@ func searchAttributeViewRelationKey(c *gin.Context) {
 
 	relationKeys := model.SearchAttributeViewRelationKey(avID, keyword)
 	ret.Data = map[string]interface{}{
-		"relationKeys": relationKeys,
+		"keys": relationKeys,
 	}
 }
 

+ 1 - 1
kernel/go.mod

@@ -9,7 +9,7 @@ require (
 	github.com/88250/clipboard v0.1.5
 	github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
 	github.com/88250/gulu v1.2.3-0.20231209020950-b7b6994e395c
-	github.com/88250/lute v1.7.6-0.20231228144126-d71866270181
+	github.com/88250/lute v1.7.6-0.20231229035326-cc7390fe9048
 	github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c
 	github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
 	github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4

+ 2 - 2
kernel/go.sum

@@ -10,8 +10,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceT
 github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
 github.com/88250/gulu v1.2.3-0.20231209020950-b7b6994e395c h1:Fas3hxqP33xA9KKDV50jUmppiiOukk5bdV00Hk5VSSk=
 github.com/88250/gulu v1.2.3-0.20231209020950-b7b6994e395c/go.mod h1:pTWnjt+6qUqNnP9xltswsJxgCBVu3C7eW09u48LWX0k=
-github.com/88250/lute v1.7.6-0.20231228144126-d71866270181 h1:ySAwXLhYdkZFHEP+gwWBTfyVdbBCRdURHLyh3lDKjKM=
-github.com/88250/lute v1.7.6-0.20231228144126-d71866270181/go.mod h1:+wUqx/1kdFDbWtxn9LYJlaCOAeol2pjSO6w+WJTVQsg=
+github.com/88250/lute v1.7.6-0.20231229035326-cc7390fe9048 h1:jz45mstBISNrv9qvej7laJ+QnMPoWJU99qw8+td4kn8=
+github.com/88250/lute v1.7.6-0.20231229035326-cc7390fe9048/go.mod h1:+wUqx/1kdFDbWtxn9LYJlaCOAeol2pjSO6w+WJTVQsg=
 github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c h1:Dl/8S9iLyPMTElnWIBxmjaLiWrkI5P4a21ivwAn5pU0=
 github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4=
 github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=

+ 5 - 1
kernel/model/attribute_view.go

@@ -786,7 +786,11 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *a
 				}
 
 				for _, blockID := range relVal.Relation.BlockIDs {
-					cell.Value.Rollup.Contents = append(cell.Value.Rollup.Contents, destAv.GetValue(rollupKey.Rollup.KeyID, blockID).String())
+					destVal := destAv.GetValue(rollupKey.Rollup.KeyID, blockID)
+					if nil == destVal {
+						continue
+					}
+					cell.Value.Rollup.Contents = append(cell.Value.Rollup.Contents, destVal.String())
 				}
 			case av.KeyTypeRelation: // 渲染关联列
 				relKey, _ := attrView.GetKey(cell.Value.KeyID)

+ 5 - 1
kernel/treenode/node.go

@@ -745,7 +745,11 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *a
 				}
 
 				for _, blockID := range relVal.Relation.BlockIDs {
-					cell.Value.Rollup.Contents = append(cell.Value.Rollup.Contents, destAv.GetValue(rollupKey.Rollup.KeyID, blockID).String())
+					destVal := destAv.GetValue(rollupKey.Rollup.KeyID, blockID)
+					if nil == destVal {
+						continue
+					}
+					cell.Value.Rollup.Contents = append(cell.Value.Rollup.Contents, destVal.String())
 				}
 			case av.KeyTypeRelation: // 渲染关联列
 				relKey, _ := attrView.GetKey(cell.Value.KeyID)

部分文件因文件數量過多而無法顯示