From 33962b069485e1fcd74d522fe6892d0182365f8e Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 7 Jan 2023 21:28:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?:art:=20=E6=A1=8C=E9=9D=A2=E7=AB=AF?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=90=8C=E6=97=B6=E6=89=93=E5=BC=80=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E5=B7=A5=E4=BD=9C=E7=A9=BA=E9=97=B4=20https://github.?= =?UTF-8?q?com/siyuan-note/siyuan/issues/4567?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20230106104821-9nfphwm.sy | 40 ++++++++++++++++-- .../20230106101434-e6g4av3.sy | 40 ++++++++++++++++-- .../20230106104645-o838uew.sy | 41 +++++++++++++++++-- 3 files changed, 109 insertions(+), 12 deletions(-) diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20230106104821-9nfphwm.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20230106104821-9nfphwm.sy index a77940809..fd60cf3ce 100644 --- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20230106104821-9nfphwm.sy +++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20230106104821-9nfphwm.sy @@ -5,7 +5,7 @@ "Properties": { "id": "20230106104821-9nfphwm", "title": "Workspace", - "updated": "20230106105328" + "updated": "20230107212528" }, "Children": [ { @@ -123,7 +123,7 @@ }, { "Type": "NodeText", - "Data": "​ - " + "Data": "​​ - " }, { "Type": "NodeTextMark", @@ -132,7 +132,7 @@ }, { "Type": "NodeText", - "Data": "​ - " + "Data": "​​ - " }, { "Type": "NodeTextMark", @@ -141,7 +141,39 @@ }, { "Type": "NodeText", - "Data": "​. The desktop side supports opening multiple workspaces at the same time, but the mobile side can only switch different workspaces." + "Data": "​​. The desktop side supports opening multiple workspaces at the same time, but the mobile side can only switch different workspaces." + } + ] + }, + { + "ID": "20230107212451-h2phr5b", + "Type": "NodeParagraph", + "Properties": { + "id": "20230107212451-h2phr5b", + "updated": "20230107212528" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "If your multiple workspaces need to be started frequently, you can consider creating a different startup entry for each workspace and specify the startup parameter " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "--workspace absolute path of the workspace" + }, + { + "Type": "NodeText", + "Data": "​. For example, multiple shortcuts can be copied on a Windows system, and each Shortcut - Property - Target is followed by a workspace path parameter, such as " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "--workspace F:\\SiYuan" + }, + { + "Type": "NodeText", + "Data": "​." } ] }, diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20230106101434-e6g4av3.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20230106101434-e6g4av3.sy index f504c368f..b5ebda5bd 100644 --- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20230106101434-e6g4av3.sy +++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20230106101434-e6g4av3.sy @@ -5,7 +5,7 @@ "Properties": { "id": "20230106101434-e6g4av3", "title": "工作空间", - "updated": "20230106104112" + "updated": "20230107212338" }, "Children": [ { @@ -122,7 +122,7 @@ }, { "Type": "NodeText", - "Data": "​ - " + "Data": "​​ - " }, { "Type": "NodeTextMark", @@ -131,7 +131,7 @@ }, { "Type": "NodeText", - "Data": "​ - " + "Data": "​​ - " }, { "Type": "NodeTextMark", @@ -140,7 +140,39 @@ }, { "Type": "NodeText", - "Data": "​ 中切换工作空间,桌面端支持同时打开多个工作空间,移动端只能切换不同的工作空间。" + "Data": "​​ 中切换工作空间,桌面端支持同时打开多个工作空间,移动端只能切换不同的工作空间。" + } + ] + }, + { + "ID": "20230107211904-ucohfsb", + "Type": "NodeParagraph", + "Properties": { + "id": "20230107211904-ucohfsb", + "updated": "20230107212338" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "如果你的多个工作空间需要经常启动,可以考虑为每个工作空间创建不同的启动入口并指定启动参数 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "--workspace 工作空间绝对路径" + }, + { + "Type": "NodeText", + "Data": "​。比如 Windows 系统上可以复制多个快捷方式,并在每个快捷方式 - 属性 - 目标后跟随工作空间路径参数,例如 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "--workspace F:\\SiYuan" + }, + { + "Type": "NodeText", + "Data": "​。" } ] }, diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20230106104645-o838uew.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20230106104645-o838uew.sy index 701d36cce..abd5e7681 100644 --- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20230106104645-o838uew.sy +++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20230106104645-o838uew.sy @@ -4,8 +4,9 @@ "Type": "NodeDocument", "Properties": { "id": "20230106104645-o838uew", + "scroll": "{\u0026quot;startId\u0026quot;:\u0026quot;20230106104714-um1pzdl\u0026quot;,\u0026quot;endId\u0026quot;:\u0026quot;20230106104714-yyezfpg\u0026quot;,\u0026quot;scrollTop\u0026quot;:0,\u0026quot;focusId\u0026quot;:\u0026quot;20230107212432-mkgsqbz\u0026quot;,\u0026quot;focusStart\u0026quot;:150,\u0026quot;focusEnd\u0026quot;:150}", "title": "工作空間", - "updated": "20230106104750" + "updated": "20230107212432" }, "Children": [ { @@ -123,7 +124,7 @@ }, { "Type": "NodeText", - "Data": "​ - " + "Data": "​​ - " }, { "Type": "NodeTextMark", @@ -132,7 +133,7 @@ }, { "Type": "NodeText", - "Data": "​ - " + "Data": "​​ - " }, { "Type": "NodeTextMark", @@ -141,7 +142,39 @@ }, { "Type": "NodeText", - "Data": "​ 中切換工作空間,桌面端支持同時打開多個工作空間,移動端只能切換不同的工作空間。" + "Data": "​​ 中切換工作空間,桌面端支持同時打開多個工作空間,移動端只能切換不同的工作空間。" + } + ] + }, + { + "ID": "20230107212432-mkgsqbz", + "Type": "NodeParagraph", + "Properties": { + "id": "20230107212432-mkgsqbz", + "updated": "20230107212432" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "如果你的多個工作空間需要經常啟動,可以考慮為每個工作空間創建不同的啟動入口並指定啟動參數 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "--workspace 工作空間絕對路徑" + }, + { + "Type": "NodeText", + "Data": "​。比如 Windows 系統上可以復制多個快捷方式,並在每個快捷方式 - 屬性 - 目標後跟隨工作空間路徑參數,例如 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "--workspace F:\\SiYuan" + }, + { + "Type": "NodeText", + "Data": "​。" } ] }, From 8286c463654dda89278f0efb791576402587217e Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 7 Jan 2023 21:28:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?:art:=20=E4=B8=8D=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=8C=87=E5=8D=97=E6=BB=9A=E5=8A=A8=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/api/attr.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/api/attr.go b/kernel/api/attr.go index 09373b1ec..bc91a3e8c 100644 --- a/kernel/api/attr.go +++ b/kernel/api/attr.go @@ -57,10 +57,9 @@ func setBlockAttrs(c *gin.Context) { id := arg["id"].(string) attrs := arg["attrs"].(map[string]interface{}) - if 1 == len(attrs) && "" != attrs["scroll"] && "dev" == util.Mode { - // 开发环境不记录用户指南滚动位置 - b := treenode.GetBlockTree(id) - if nil != b && (model.IsUserGuide(b.BoxID)) { + if 1 == len(attrs) && "" != attrs["scroll"] { + // 不记录用户指南滚动位置 + if b := treenode.GetBlockTree(id); nil != b && (model.IsUserGuide(b.BoxID)) { attrs["scroll"] = "" } }