From 812d588d9fa5d2bfce758609fa139a15bd222264 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 18 Jun 2022 20:53:55 +0800 Subject: [PATCH 1/3] =?UTF-8?q?:recycle:=20=E6=95=B0=E6=8D=AE=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E7=B4=A2=E5=BC=95=20`Index`=20=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E5=8A=A0=E5=AF=86=20Fix=20https://github.com/siyuan-note/siyua?= =?UTF-8?q?n/issues/5229?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/go.mod | 2 +- kernel/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/go.mod b/kernel/go.mod index e2dd5dfed..1007c9422 100644 --- a/kernel/go.mod +++ b/kernel/go.mod @@ -40,7 +40,7 @@ require ( github.com/patrickmn/go-cache v2.1.0+incompatible github.com/qiniu/go-sdk/v7 v7.13.0 github.com/radovskyb/watcher v1.0.7 - github.com/siyuan-note/dejavu v0.0.0-20220616063348-51925ac64e13 + github.com/siyuan-note/dejavu v0.0.0-20220618124953-c714755a1685 github.com/siyuan-note/encryption v0.0.0-20220612074546-f1dd94fe8676 github.com/siyuan-note/filelock v0.0.0-20220616063212-74cfba0754ee github.com/vmihailenco/msgpack/v5 v5.3.5 diff --git a/kernel/go.sum b/kernel/go.sum index 3d13000ac..dd1dc82d9 100644 --- a/kernel/go.sum +++ b/kernel/go.sum @@ -419,8 +419,8 @@ github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/siyuan-note/dejavu v0.0.0-20220616063348-51925ac64e13 h1:bmiOyGZR4w6dvIU13oYqwMFrrnFuiG38Mc3UWpVrVu0= -github.com/siyuan-note/dejavu v0.0.0-20220616063348-51925ac64e13/go.mod h1:nCckhUVoaofwwlBOglCui+Mr7Hhyd059vMXzs7jdne0= +github.com/siyuan-note/dejavu v0.0.0-20220618124953-c714755a1685 h1:8DgrXnXk1HPAj2G4DNI1wcDLdCnmddYAUfW/j3dkFVg= +github.com/siyuan-note/dejavu v0.0.0-20220618124953-c714755a1685/go.mod h1:nCckhUVoaofwwlBOglCui+Mr7Hhyd059vMXzs7jdne0= github.com/siyuan-note/encryption v0.0.0-20220612074546-f1dd94fe8676 h1:QB9TjJQFhXhZ6dAtPpY02DlzHAQm1C+WqZq6OadG8mI= github.com/siyuan-note/encryption v0.0.0-20220612074546-f1dd94fe8676/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw= github.com/siyuan-note/filelock v0.0.0-20220616063212-74cfba0754ee h1:8nBBJKHbXuMF2dWKUKsrnnFblgeNBfPjLgVm0aDas/s= From cfde8e3ea8d87452ae464866a8a1cf60b0f59c37 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 18 Jun 2022 22:20:37 +0800 Subject: [PATCH 2/3] =?UTF-8?q?:art:=20=E6=B7=BB=E5=8A=A0=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E6=A0=91=20`=E5=88=A0=E9=99=A4=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4`=20=E9=80=89=E9=A1=B9=20https://github.com/s?= =?UTF-8?q?iyuan-note/siyuan/issues/5225?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/conf/filetree.go | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/conf/filetree.go b/kernel/conf/filetree.go index 5a9bb0b85..355ac8773 100644 --- a/kernel/conf/filetree.go +++ b/kernel/conf/filetree.go @@ -27,6 +27,7 @@ type FileTree struct { CreateDocNameTemplate string `json:"createDocNameTemplate"` // 新建文档名模板 MaxListCount int `json:"maxListCount"` // 最大列出数量 AllowCreateDeeper bool `json:"allowCreateDeeper"` // 允许创建超过 7 层深度的子文档 + RemoveDocConfirm int `json:"removeDocConfirm"` // 删除文档时是否需要确认,0:需要确认,1:不需要确认 Sort int `json:"sort"` // 排序方式 } From dda2ca8aed86fc396165a682d85969130744e4ff Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 18 Jun 2022 22:44:38 +0800 Subject: [PATCH 3/3] =?UTF-8?q?:art:=20=E5=85=A8=E5=B1=80=E5=85=B3?= =?UTF-8?q?=E7=B3=BB=E5=9B=BE=E4=B8=AD=E5=B0=86=E6=A0=87=E7=AD=BE=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E5=88=B0=E6=96=87=E6=A1=A3=E5=9D=97=E4=B8=8A=20Fix=20?= =?UTF-8?q?https://github.com/siyuan-note/siyuan/issues/5218?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/graph.go | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/kernel/model/graph.go b/kernel/model/graph.go index ba4339cfd..7ecfe2c1a 100644 --- a/kernel/model/graph.go +++ b/kernel/model/graph.go @@ -191,9 +191,10 @@ func linkTagBlocks(blocks *[]*Block, nodes *[]*GraphNode, links *[]*GraphLink, p return } - nodeSize := Conf.Graph.Local.NodeSize - if "" != p { - nodeSize = Conf.Graph.Global.NodeSize + isGlobal := "" == p + nodeSize := Conf.Graph.Global.NodeSize + if !isGlobal { + nodeSize = Conf.Graph.Local.NodeSize } // 构造标签节点 @@ -215,12 +216,22 @@ func linkTagBlocks(blocks *[]*Block, nodes *[]*GraphNode, links *[]*GraphLink, p // 连接标签和块 for _, block := range *blocks { for _, tagSpan := range tagSpans { - if block.ID == tagSpan.BlockID { - *links = append(*links, &GraphLink{ - From: tagSpan.Content, - To: block.ID, - Color: &GraphLinkColor{Color: style["--b3-graph-tag-line"]}, - }) + if isGlobal { // 全局关系图将标签链接到文档块上 + if block.RootID == tagSpan.RootID { // 局部关系图将标签链接到子块上 + *links = append(*links, &GraphLink{ + From: tagSpan.Content, + To: block.RootID, + Color: &GraphLinkColor{Color: style["--b3-graph-tag-line"]}, + }) + } + } else { + if block.ID == tagSpan.BlockID { // 局部关系图将标签链接到子块上 + *links = append(*links, &GraphLink{ + From: tagSpan.Content, + To: block.ID, + Color: &GraphLinkColor{Color: style["--b3-graph-tag-line"]}, + }) + } } } }