Pārlūkot izejas kodu

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

Vanessa 1 gadu atpakaļ
vecāks
revīzija
a81e92d55c

+ 52 - 0
app/changelogs/v2.10.0/v2.10.0.md

@@ -0,0 +1,52 @@
+## Overview
+
+This version introduces the feature of searching the content of asset files, and has initially supported searching the content of assets in the following formats:
+
+* .txt
+* .md
+* .docx
+* .xlsx
+* .pptx
+
+This feature requires a paid membership to use, and is currently in the early bird price stage, welcome to [buy](https://b3log.org/siyuan/en/pricing.html).
+
+## Changelogs
+
+Below are the detailed changes in this version.
+
+### Feature
+
+* [Support for searching asset content](https://github.com/siyuan-note/siyuan/issues/8874)
+
+### Enhancement
+
+* [List outline dots/numbers support click to zoom in](https://github.com/siyuan-note/siyuan/issues/3502)
+* [Keep the cursor consistent with the selected block](https://github.com/siyuan-note/siyuan/issues/8918)
+* [Stick search and open tag automatically recognize whether to open on the right according to the width of the application](https://github.com/siyuan-note/siyuan/issues/8928)
+* [Improve kernel boot checking on the desktop](https://github.com/siyuan-note/siyuan/issues/8929)
+* [↑/↓ selection blocks behave consistently when they encounter super block](https://github.com/siyuan-note/siyuan/issues/8930)
+* [Wrong cursor after Enter and Ctrl+Z](https://github.com/siyuan-note/siyuan/issues/8935)
+* [Improve database URL column action](https://github.com/siyuan-note/siyuan/pull/8937)
+* [Update Settings - About - Version download link](https://github.com/siyuan-note/siyuan/issues/8947)
+* [Support switch workspace on the Pad](https://github.com/siyuan-note/siyuan/issues/8948)
+* [Reduce the indentation of the doc tree on the mobile](https://github.com/siyuan-note/siyuan/issues/8949)
+* [Enable HTML-related features in KaTeX](https://github.com/siyuan-note/siyuan/pull/8951)
+* [Heading convert to doc does not use naming as doc name](https://github.com/siyuan-note/siyuan/issues/8959)
+* [Turn off math warnings in Chinese](https://github.com/siyuan-note/siyuan/pull/8963)
+
+### Bugfix
+
+* [Wrong count for hierarchical level tag count](https://github.com/siyuan-note/siyuan/issues/8915)
+* [The pasted code block cannot be automatically recognized](https://github.com/siyuan-note/siyuan/issues/8934)
+* [The table cannot adjust the centered layout](https://github.com/siyuan-note/siyuan/issues/8938)
+* [Plugin shortcut key setting list cannot fold](https://github.com/siyuan-note/siyuan/pull/8946)
+
+### Refactor
+
+* [Upgrade Electron](https://github.com/siyuan-note/siyuan/issues/8952)
+
+### Development
+
+* [Add plugin event bus `open-siyuan-url-plugin` and `open-siyuan-url-block`](https://github.com/siyuan-note/siyuan/pull/8927)
+* [In editor, `command.fileTreeCallback` cannot be triggered](https://github.com/siyuan-note/siyuan/issues/8931)
+* [Improve kernel API `/api/file/readDir` for returning file mod time](https://github.com/siyuan-note/siyuan/issues/8945)

+ 53 - 0
app/changelogs/v2.10.0/v2.10.0_zh_CHT.md

@@ -0,0 +1,53 @@
+## 概述
+
+該版本引入了搜索資源文件內容特性,已經初步支持搜索如下格式的資源文件內容:
+
+* .txt
+* .md
+* .docx
+* .xlsx
+* .pptx
+
+該特性需要付費會員才能使用,目前為早鳥價階段,歡迎[購買](https://b3log.org/siyuan/pricing.html)。
+
+## 變更記錄
+
+以下是此版本中的詳細變更。
+
+### 引入特性
+
+* [支持搜索資源文件內容](https://github.com/siyuan-note/siyuan/issues/8874)
+
+### 改進功能
+
+* [列表大綱圓點和數字支持點擊聚焦](https://github.com/siyuan-note/siyuan/issues/3502)
+* [選擇塊以後光標保持一致](https://github.com/siyuan-note/siyuan/issues/8918)
+* [根據窗口大小優化固定搜索頁簽打開位置](https://github.com/siyuan-note/siyuan/issues/8928)
+* [改進桌面端內核啟動檢查](https://github.com/siyuan-note/siyuan/issues/8929)
+* [改進超級塊中 ↑/↓ 選擇塊](https://github.com/siyuan-note/siyuan/issues/8930)
+* [改進列表中 Enter 和 Ctrl+Z 光標位置](https://github.com/siyuan-note/siyuan/issues/8935)
+* [改進數據庫 URL 列操作](https://github.com/siyuan-note/siyuan/pull/8937)
+* [更新 設置 - 關於 - 版本 下載鏈接](https://github.com/siyuan-note/siyuan/issues/8947)
+* [支持在 Pad 上切換工作空間](https://github.com/siyuan-note/siyuan/issues/8948)
+* [優化移動端文檔樹縮進空間](https://github.com/siyuan-note/siyuan/issues/8949)
+* [啟用 KaTex 的 HTML 相關特性](https://github.com/siyuan-note/siyuan/pull/8951)
+* [標題轉換文檔不再使用命名作為文檔名](https://github.com/siyuan-note/siyuan/issues/8959)
+* [關閉公式中文警告](https://github.com/siyuan-note/siyuan/pull/8963)
+
+
+### 修復缺陷
+
+* [修復層級標籤計數問題](https://github.com/siyuan-note/siyuan/issues/8915)
+* [修復粘貼代碼塊識別問題](https://github.com/siyuan-note/siyuan/issues/8934)
+* [修復表格塊無法居中](https://github.com/siyuan-note/siyuan/issues/8938)
+* [修復插件快捷鍵設置無法折疊](https://github.com/siyuan-note/siyuan/pull/8946)
+
+### 開發重構
+
+* [升級 Electron](https://github.com/siyuan-note/siyuan/issues/8952)
+
+### 開發者
+
+* [添加插件事件總線 `open-siyuan-url-plugin` 和 `open-siyuan-url-block`](https://github.com/siyuan-note/siyuan/pull/8927)
+* [`command.fileTreeCallback` 無法在編輯器中觸發](https://github.com/siyuan-note/siyuan/issues/8931)
+* [改進內核 API `/api/file/readDir` 返回文件更新時間](https://github.com/siyuan-note/siyuan/issues/8945)

+ 53 - 0
app/changelogs/v2.10.0/v2.10.0_zh_CN.md

@@ -0,0 +1,53 @@
+## 概述
+
+该版本引入了搜索资源文件内容特性,已经初步支持搜索如下格式的资源文件内容:
+
+* .txt
+* .md
+* .docx
+* .xlsx
+* .pptx
+
+该特性需要付费会员才能使用,目前为早鸟价阶段,欢迎[购买](https://b3log.org/siyuan/pricing.html)。
+
+## 变更记录
+
+以下是此版本中的详细变更。
+
+### 引入特性
+
+* [支持搜索资源文件内容](https://github.com/siyuan-note/siyuan/issues/8874)
+
+### 改进功能
+
+* [列表大纲圆点和数字支持点击聚焦](https://github.com/siyuan-note/siyuan/issues/3502)
+* [选择块以后光标保持一致](https://github.com/siyuan-note/siyuan/issues/8918)
+* [根据窗口大小优化固定搜索页签打开位置](https://github.com/siyuan-note/siyuan/issues/8928)
+* [改进桌面端内核启动检查](https://github.com/siyuan-note/siyuan/issues/8929)
+* [改进超级块中 ↑/↓ 选择块](https://github.com/siyuan-note/siyuan/issues/8930)
+* [改进列表中 Enter 和 Ctrl+Z 光标位置](https://github.com/siyuan-note/siyuan/issues/8935)
+* [改进数据库 URL 列操作](https://github.com/siyuan-note/siyuan/pull/8937)
+* [更新 设置 - 关于 - 版本 下载链接](https://github.com/siyuan-note/siyuan/issues/8947)
+* [支持在 Pad 上切换工作空间](https://github.com/siyuan-note/siyuan/issues/8948)
+* [优化移动端文档树缩进空间](https://github.com/siyuan-note/siyuan/issues/8949)
+* [启用 KaTex 的 HTML 相关特性](https://github.com/siyuan-note/siyuan/pull/8951)
+* [标题转换文档不再使用命名作为文档名](https://github.com/siyuan-note/siyuan/issues/8959)
+* [关闭公式中文警告](https://github.com/siyuan-note/siyuan/pull/8963)
+
+
+### 修复缺陷
+
+* [修复层级标签计数问题](https://github.com/siyuan-note/siyuan/issues/8915)
+* [修复粘贴代码块识别问题](https://github.com/siyuan-note/siyuan/issues/8934)
+* [修复表格块无法居中](https://github.com/siyuan-note/siyuan/issues/8938)
+* [修复插件快捷键设置无法折叠](https://github.com/siyuan-note/siyuan/pull/8946)
+
+### 开发重构
+
+* [升级 Electron](https://github.com/siyuan-note/siyuan/issues/8952)
+
+### 开发者
+
+* [添加插件事件总线 `open-siyuan-url-plugin` 和 `open-siyuan-url-block`](https://github.com/siyuan-note/siyuan/pull/8927)
+* [`command.fileTreeCallback` 无法在编辑器中触发](https://github.com/siyuan-note/siyuan/issues/8931)
+* [改进内核 API `/api/file/readDir` 返回文件更新时间](https://github.com/siyuan-note/siyuan/issues/8945)

+ 3 - 3
kernel/model/conf.go

@@ -432,9 +432,9 @@ func initLang() {
 		label := langMap["_label"].(string)
 		kernelLangs := langMap["_kernel"].(map[string]interface{})
 		for k, v := range kernelLangs {
-			num, err := strconv.Atoi(k)
-			if nil != err {
-				logging.LogErrorf("parse language configuration [%s] item [%d] failed [%s] failed: %s", p, num, err)
+			num, convErr := strconv.Atoi(k)
+			if nil != convErr {
+				logging.LogErrorf("parse language configuration [%s] item [%d] failed: %s", p, num, convErr)
 				continue
 			}
 			kernelMap[num] = v.(string)

+ 1 - 1
kernel/model/file.go

@@ -1610,7 +1610,7 @@ func ChangeFileTreeSort(boxID string, paths []string) {
 	absParentPath := filepath.Join(util.DataDir, boxID, parentPath)
 	files, err := os.ReadDir(absParentPath)
 	if nil != err {
-		logging.LogErrorf("read dir [%s] failed: %s", err)
+		logging.LogErrorf("read dir [%s] failed: %s", absParentPath, err)
 	}
 
 	sortFolderIDs := map[string]int{}