From 978ae3f55508434f352bf226dc289fa33ddbb97d Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 23 Jun 2022 11:38:35 +0800 Subject: [PATCH 1/3] =?UTF-8?q?:art:=20=E6=94=AF=E6=8C=81=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=A1=B5=E7=AD=BE=E6=89=93=E5=BC=80=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E6=95=B0=E9=87=8F=20https://github.com/siyuan-note/siyuan/issu?= =?UTF-8?q?es/2098?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/conf.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/model/conf.go b/kernel/model/conf.go index ce6a1f882..fc78fee7d 100644 --- a/kernel/model/conf.go +++ b/kernel/model/conf.go @@ -133,6 +133,9 @@ func InitConf() { if 1 > Conf.FileTree.MaxOpenTabCount { Conf.FileTree.MaxOpenTabCount = 12 } + if 32 < Conf.FileTree.MaxOpenTabCount { + Conf.FileTree.MaxOpenTabCount = 32 + } if nil == Conf.Tag { Conf.Tag = conf.NewTag() } From 97a2c1c8dbf49ebc2bce49786a025f8fca298d7d Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 23 Jun 2022 11:42:14 +0800 Subject: [PATCH 2/3] =?UTF-8?q?:art:=20=E6=94=AF=E6=8C=81=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=A1=B5=E7=AD=BE=E6=89=93=E5=BC=80=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E6=95=B0=E9=87=8F=20https://github.com/siyuan-note/siyuan/issu?= =?UTF-8?q?es/2098?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/api/setting.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/api/setting.go b/kernel/api/setting.go index de1a36a8d..17319fad1 100644 --- a/kernel/api/setting.go +++ b/kernel/api/setting.go @@ -152,7 +152,7 @@ func setFiletree(c *gin.Context) { return } - fileTree := &conf.FileTree{} + fileTree := conf.NewFileTree() if err = gulu.JSON.UnmarshalJSON(param, fileTree); nil != err { ret.Code = -1 ret.Msg = err.Error() From 6abc66dd2bea3e80bfed193c459ff34286a5c6df Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 23 Jun 2022 11:43:01 +0800 Subject: [PATCH 3/3] =?UTF-8?q?:art:=20=E6=94=AF=E6=8C=81=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=A1=B5=E7=AD=BE=E6=89=93=E5=BC=80=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E6=95=B0=E9=87=8F=20https://github.com/siyuan-note/siyuan/issu?= =?UTF-8?q?es/2098?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/api/setting.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/api/setting.go b/kernel/api/setting.go index 17319fad1..079c07969 100644 --- a/kernel/api/setting.go +++ b/kernel/api/setting.go @@ -166,6 +166,12 @@ func setFiletree(c *gin.Context) { } } + if 1 > fileTree.MaxOpenTabCount { + fileTree.MaxOpenTabCount = 12 + } + if 32 < fileTree.MaxOpenTabCount { + fileTree.MaxOpenTabCount = 32 + } model.Conf.FileTree = fileTree model.Conf.Save()