Explorar el Código

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

Vanessa hace 1 año
padre
commit
f84e2d68f0

+ 4 - 4
.github/CONTRIBUTING.md

@@ -16,10 +16,10 @@ Install pnpm: `npm install -g pnpm`
 
 Set the Electron mirror environment variable and install Electron:
 
-* macOS/Linux: `ELECTRON_MIRROR=https://registry.npmmirror.com/mirrors/electron/ pnpm install electron@28.2.0 -D`
+* macOS/Linux: `ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@28.2.1 -D`
 * Windows:
-    * `SET ELECTRON_MIRROR=https://registry.npmmirror.com/mirrors/electron/`
-    * `pnpm install electron@28.2.0 -D`
+    * `SET ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/`
+    * `pnpm install electron@28.2.1 -D`
 
 NPM mirror:
 
@@ -30,7 +30,7 @@ NPM mirror:
 
 On the desktop, go to the app folder to run:
 
-* `pnpm install electron@28.2.0 -D`
+* `pnpm install electron@28.2.1 -D`
 * `pnpm run dev`
 * `pnpm run start`
 

+ 4 - 4
.github/CONTRIBUTING_zh_CN.md

@@ -18,11 +18,11 @@
 
 * macOS/Linux: 
  ```
- ELECTRON_MIRROR=https://registry.npmmirror.com/mirrors/electron/ pnpm install electron@28.2.0 -D
+ ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@28.2.1 -D
  ```
 * Windows:
-    * `SET ELECTRON_MIRROR=https://registry.npmmirror.com/mirrors/electron/`
-    * `pnpm install electron@28.2.0 -D`
+    * `SET ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/`
+    * `pnpm install electron@28.2.1 -D`
 
 NPM 镜像:
 
@@ -32,7 +32,7 @@ NPM 镜像:
 
 桌面端进入 app 文件夹运行:
 
-* `pnpm install electron@28.2.0 -D`
+* `pnpm install electron@28.2.1 -D`
 * `pnpm run dev`
 * `pnpm run start`
 

+ 15 - 1
app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-l3qg72k/20240119211017-1vbbt95.sy

@@ -5,7 +5,7 @@
 	"Properties": {
 		"id": "20240119211017-1vbbt95",
 		"title": "Ignore indexing",
-		"updated": "20240119211442"
+		"updated": "20240202105426"
 	},
 	"Children": [
 		{
@@ -159,6 +159,20 @@
 					]
 				}
 			]
+		},
+		{
+			"ID": "20240202105425-d8fq0vu",
+			"Type": "NodeParagraph",
+			"Properties": {
+				"id": "20240202105425-d8fq0vu",
+				"updated": "20240202105426"
+			},
+			"Children": [
+				{
+					"Type": "NodeText",
+					"Data": "After the adjustment, you need to manually rebuild the index."
+				}
+			]
 		}
 	]
 }

+ 15 - 1
app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-l3qg72k/20240119212048-0huuevw.sy

@@ -5,7 +5,7 @@
 	"Properties": {
 		"id": "20240119212048-0huuevw",
 		"title": "Ignore search",
-		"updated": "20240119212145"
+		"updated": "20240202105500"
 	},
 	"Children": [
 		{
@@ -190,6 +190,20 @@
 					"Data": "```"
 				}
 			]
+		},
+		{
+			"ID": "20240202105459-q4d3ttn",
+			"Type": "NodeParagraph",
+			"Properties": {
+				"id": "20240202105459-q4d3ttn",
+				"updated": "20240202105500"
+			},
+			"Children": [
+				{
+					"Type": "NodeText",
+					"Data": "It will take 30 seconds to take effect after modifying the configuration file."
+				}
+			]
 		}
 	]
 }

+ 15 - 1
app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-gyngv2x/20240119205452-o8xp4ve.sy

@@ -5,7 +5,7 @@
 	"Properties": {
 		"id": "20240119205452-o8xp4ve",
 		"title": "忽略索引",
-		"updated": "20240119211220"
+		"updated": "20240202105353"
 	},
 	"Children": [
 		{
@@ -159,6 +159,20 @@
 					]
 				}
 			]
+		},
+		{
+			"ID": "20240202105353-qaj8ahd",
+			"Type": "NodeParagraph",
+			"Properties": {
+				"id": "20240202105353-qaj8ahd",
+				"updated": "20240202105353"
+			},
+			"Children": [
+				{
+					"Type": "NodeText",
+					"Data": "调整完以后需要手动重建索引。"
+				}
+			]
 		}
 	]
 }

+ 15 - 1
app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-gyngv2x/20240119205543-hknwwrl.sy

@@ -5,7 +5,7 @@
 	"Properties": {
 		"id": "20240119205543-hknwwrl",
 		"title": "忽略搜索",
-		"updated": "20240119211934"
+		"updated": "20240202105344"
 	},
 	"Children": [
 		{
@@ -190,6 +190,20 @@
 					"Data": "```"
 				}
 			]
+		},
+		{
+			"ID": "20240202105344-67d8k4w",
+			"Type": "NodeParagraph",
+			"Properties": {
+				"id": "20240202105344-67d8k4w",
+				"updated": "20240202105344"
+			},
+			"Children": [
+				{
+					"Type": "NodeText",
+					"Data": "配置文件修改保存后需要等待 30 秒才会生效。"
+				}
+			]
 		}
 	]
 }

+ 15 - 1
app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120933-vnjgwwh/20240119210914-a2tm8c4.sy

@@ -5,7 +5,7 @@
 	"Properties": {
 		"id": "20240119210914-a2tm8c4",
 		"title": "忽略索引",
-		"updated": "20240119211344"
+		"updated": "20240202105413"
 	},
 	"Children": [
 		{
@@ -159,6 +159,20 @@
 					]
 				}
 			]
+		},
+		{
+			"ID": "20240202105413-xsnd9kd",
+			"Type": "NodeParagraph",
+			"Properties": {
+				"id": "20240202105413-xsnd9kd",
+				"updated": "20240202105413"
+			},
+			"Children": [
+				{
+					"Type": "NodeText",
+					"Data": "調整完以後需要手動重建索引。"
+				}
+			]
 		}
 	]
 }

+ 15 - 1
app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120933-vnjgwwh/20240119212000-qkldbjm.sy

@@ -5,7 +5,7 @@
 	"Properties": {
 		"id": "20240119212000-qkldbjm",
 		"title": "忽略搜尋",
-		"updated": "20240119212033"
+		"updated": "20240202105512"
 	},
 	"Children": [
 		{
@@ -190,6 +190,20 @@
 					"Data": "```"
 				}
 			]
+		},
+		{
+			"ID": "20240202105512-12u06gl",
+			"Type": "NodeParagraph",
+			"Properties": {
+				"id": "20240202105512-12u06gl",
+				"updated": "20240202105512"
+			},
+			"Children": [
+				{
+					"Type": "NodeText",
+					"Data": "設定檔修改儲存後需要等待 30 秒才會生效。"
+				}
+			]
 		}
 	]
 }

+ 1 - 1
app/package.json

@@ -53,7 +53,7 @@
     "clean-webpack-plugin": "^4.0.0",
     "css-loader": "^6.7.1",
     "dayjs": "^1.11.5",
-    "electron": "28.2.0",
+    "electron": "28.2.1",
     "electron-builder": "^24.9.1",
     "encoding": "^0.1.13",
     "esbuild-loader": "^3.0.1",

+ 7 - 7
app/pnpm-lock.yaml

@@ -7,7 +7,7 @@ settings:
 dependencies:
   '@electron/remote':
     specifier: ^2.1.2
-    version: 2.1.2(electron@28.2.0)
+    version: 2.1.2(electron@28.2.1)
 
 devDependencies:
   '@types/node':
@@ -32,8 +32,8 @@ devDependencies:
     specifier: ^1.11.5
     version: 1.11.5
   electron:
-    specifier: 28.2.0
-    version: 28.2.0
+    specifier: 28.2.1
+    version: 28.2.1
   electron-builder:
     specifier: ^24.9.1
     version: 24.9.1
@@ -161,12 +161,12 @@ packages:
       - supports-color
     dev: true
 
-  /@electron/remote@2.1.2(electron@28.2.0):
+  /@electron/remote@2.1.2(electron@28.2.1):
     resolution: {integrity: sha512-EPwNx+nhdrTBxyCqXt/pftoQg/ybtWDW3DUWHafejvnB1ZGGfMpv6e15D8KeempocjXe78T7WreyGGb3mlZxdA==}
     peerDependencies:
       electron: '>= 13.0.0'
     dependencies:
-      electron: 28.2.0
+      electron: 28.2.1
     dev: false
 
   /@electron/universal@1.4.1:
@@ -1670,8 +1670,8 @@ packages:
     resolution: {integrity: sha512-YoVeFrGd/7ROjz4R9uPoND1K/hSRC/xADy9639ZmIZeJSaBnKdYx3I6LMPsY7CXLpK7JFgKQVzeZ/dk2br6Eaw==}
     dev: true
 
-  /electron@28.2.0:
-    resolution: {integrity: sha512-22SylXQQ9IHtwLw4D+Z4Si7OUpeDtpHfJVTjy3yv53iLg5zJKKPOCWT4ZwgYGHQZ0eldyBrYBHF/P9FPd2CcVQ==}
+  /electron@28.2.1:
+    resolution: {integrity: sha512-wlzXf+OvOiVlBf9dcSeMMf7Q+N6DG+wtgFbMK0sA/JpIJcdosRbLMQwLg/LTwNVKIbmayqFLDp4FmmFkEMhbYA==}
     engines: {node: '>= 12.20.55'}
     hasBin: true
     requiresBuild: true

+ 5 - 1
kernel/api/filetree.go

@@ -730,7 +730,11 @@ func listDocsByPath(c *gin.Context) {
 		return
 	}
 	if maxListCount < totals {
-		util.PushMsg(fmt.Sprintf(model.Conf.Language(48), len(files)), 7000)
+		// API `listDocsByPath` add an optional parameter `ignoreMaxListHint` https://github.com/siyuan-note/siyuan/issues/10290
+		ignoreMaxListHintArg := arg["ignoreMaxListHint"]
+		if nil == ignoreMaxListHintArg || !ignoreMaxListHintArg.(bool) {
+			util.PushMsg(fmt.Sprintf(model.Conf.Language(48), len(files)), 7000)
+		}
 	}
 
 	ret.Data = map[string]interface{}{

+ 19 - 10
kernel/model/conf.go

@@ -513,10 +513,20 @@ var exitLock = sync.Mutex{}
 // Close 退出内核进程.
 //
 // force:是否不执行同步过程而直接退出
+//
 // execInstallPkg:是否执行新版本安装包
-// 0:默认按照设置项 System.DownloadInstallPkg 检查并推送提示
-// 1:不执行新版本安装
-// 2:执行新版本安装
+//
+//	0:默认按照设置项 System.DownloadInstallPkg 检查并推送提示
+//	1:不执行新版本安装
+//	2:执行新版本安装
+//
+// 返回值 exitCode:
+//
+//	0:正常退出
+//	1:同步执行失败
+//	2:提示新安装包
+//
+// 当 force 为 true(强制退出)并且 execInstallPkg 为 0(默认检查更新)并且同步失败并且新版本安装版已经准备就绪时,执行新版本安装 https://github.com/siyuan-note/siyuan/issues/10288
 func Close(force bool, execInstallPkg int) (exitCode int) {
 	exitLock.Lock()
 	defer exitLock.Unlock()
@@ -539,18 +549,17 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
 
 	waitSecondForExecInstallPkg := false
 	if !skipNewVerInstallPkg() {
-		newVerInstallPkgPath := getNewVerInstallPkgPath()
-		if "" != newVerInstallPkgPath {
-			if 0 == execInstallPkg { // 新版本安装包已经准备就绪
-				exitCode = 2
-				logging.LogInfof("the new version install pkg is ready [%s], waiting for the user's next instruction", newVerInstallPkgPath)
-				return
-			} else if 2 == execInstallPkg { // 执行新版本安装
+		if newVerInstallPkgPath := getNewVerInstallPkgPath(); "" != newVerInstallPkgPath {
+			if 2 == execInstallPkg || (force && 0 == execInstallPkg) { // 执行新版本安装
 				waitSecondForExecInstallPkg = true
 				if gulu.OS.IsWindows() {
 					util.PushMsg(Conf.Language(130), 1000*30)
 				}
 				go execNewVerInstallPkg(newVerInstallPkgPath)
+			} else if 0 == execInstallPkg { // 新版本安装包已经准备就绪
+				exitCode = 2
+				logging.LogInfof("the new version install pkg is ready [%s], waiting for the user's next instruction", newVerInstallPkgPath)
+				return
 			}
 		}
 	}