浏览代码

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

Vanessa 1 年之前
父节点
当前提交
58d1978eb8

+ 37 - 0
app/changelogs/v2.10.6/v2.10.6.md

@@ -10,3 +10,40 @@ Note: The annual `Subscription` includes `Pro features`. If you are an annual su
 
 Below are the detailed changes in this version.
 
+### Enhancement
+
+* [Add an exit button in the upper right corner of the Pad](https://github.com/siyuan-note/siyuan/issues/9163)
+* [Clicking on the emoji in the slash menu should position the cursor in the editor](https://github.com/siyuan-note/siyuan/issues/9165)
+* [Improve search on the mobile](https://github.com/siyuan-note/siyuan/issues/9168)
+* [Clear option disappears after search code language](https://github.com/siyuan-note/siyuan/issues/9169)
+* [Link tip is too long](https://github.com/siyuan-note/siyuan/issues/9170)
+* [Support for symlinked theme folder when exporting HTML](https://github.com/siyuan-note/siyuan/issues/9173)
+* [Only copying is supported when selecting multiple block text](https://github.com/siyuan-note/siyuan/issues/9175)
+* [Unable to open file in search list on the Pad](https://github.com/siyuan-note/siyuan/issues/9177)
+* [After typing quickly in a code block, the cursor no longer reset to the beginning](https://github.com/siyuan-note/siyuan/issues/9179)
+* [Authenticate requests with the Origin header other than 127.0.0.1](https://github.com/siyuan-note/siyuan/issues/9180)
+* [Improve resizing of some UI elements](https://github.com/siyuan-note/siyuan/issues/9182)
+* [Improve local IP display](https://github.com/siyuan-note/siyuan/pull/9186)
+* [There is no scroll bar, and the prompt is hidden when the mouse is moved away](https://github.com/siyuan-note/siyuan/issues/9194)
+* [Improve doc menu](https://github.com/siyuan-note/siyuan/issues/9195)
+* [Improve prompts for deleting bookmarks](https://github.com/siyuan-note/siyuan/issues/9196)
+* [Improve the stability of creating data snapshots and data sync](https://github.com/siyuan-note/siyuan/issues/9197)
+* [Automatically move corrupted notebook folders to the corrupted folder](https://github.com/siyuan-note/siyuan/issues/9202)
+
+### Bugfix
+
+* [Continuous rapid input and carriage return trigger abnormal status](https://github.com/siyuan-note/siyuan/issues/9152)
+* [No response when clicking on the data history interface](https://github.com/siyuan-note/siyuan/issues/9167)
+* [Undo and then redo trigger status exception](https://github.com/siyuan-note/siyuan/issues/9178)
+* [Alt+Y and other shortcut keys do not work in the following editors](https://github.com/siyuan-note/siyuan/issues/9184)
+* [Entering "Tab" on the last line of the code block will not align](https://github.com/siyuan-note/siyuan/issues/9189)
+* [PDF tab `⋮` menu cannot be clicked](https://github.com/siyuan-note/siyuan/issues/9192)
+* [Unable to specify file name when exporting template](https://github.com/siyuan-note/siyuan/issues/9201)
+* [Kernel crash when copy-pasting from some browsers](https://github.com/siyuan-note/siyuan/issues/9203)
+
+### Development
+
+* [Add a callback for closing the window](https://github.com/siyuan-note/siyuan/issues/9128)
+* [Add plugin function `transaction`](https://github.com/siyuan-note/siyuan/issues/9172)
+* [Add some detailed logs when synchronizing data](https://github.com/siyuan-note/siyuan/issues/9191)
+* [Upgrade Electron](https://github.com/siyuan-note/siyuan/issues/9199)

+ 39 - 1
app/changelogs/v2.10.6/v2.10.6_zh_CHT.md

@@ -8,4 +8,42 @@
 
 ## 變更記錄
 
-以下是此版本中的詳細變更。
+以下是此版本中的詳細變更。
+
+### 改進功能
+
+* [在 Pad 端右上角添加退出按鈕](https://github.com/siyuan-note/siyuan/issues/9163)
+* [在 / 菜單中點擊 Emoji 後光標在編輯器中保留位置](https://github.com/siyuan-note/siyuan/issues/9165)
+* [改進移動端搜索](https://github.com/siyuan-note/siyuan/issues/9168)
+* [搜索代碼塊語言後清除選項消失](https://github.com/siyuan-note/siyuan/issues/9169)
+* [超鏈接懸浮提示過長](https://github.com/siyuan-note/siyuan/issues/9170)
+* [導出 HTML 時支持符號鏈接主題文件夾](https://github.com/siyuan-note/siyuan/issues/9173)
+* [跨塊選擇文本後僅支持複製](https://github.com/siyuan-note/siyuan/issues/9175)
+* [在 Pad 端無法在搜索列表中打開文檔](https://github.com/siyuan-note/siyuan/issues/9177)
+* [代碼塊中快速輸入光標不再重置到開頭](https://github.com/siyuan-note/siyuan/issues/9179)
+* [請求 Origin 標頭為非 127.0.0.1 時進行鑑權](https://github.com/siyuan-note/siyuan/issues/9180)
+* [改進一些 UI 元素的大小重置](https://github.com/siyuan-note/siyuan/issues/9182)
+* [改進設置關於中的本地 IP 顯示](https://github.com/siyuan-note/siyuan/pull/9186)
+* [當不存在滾動條時提示浮層隨鼠標移開隱藏](https://github.com/siyuan-note/siyuan/issues/9194)
+* [改進文檔菜單](https://github.com/siyuan-note/siyuan/issues/9195)
+* [改進刪除書籤提示](https://github.com/siyuan-note/siyuan/issues/9196)
+* [改進創建快照和數據同步的穩定性](https://github.com/siyuan-note/siyuan/issues/9197)
+* [自動將損壞的筆記本文件夾移動到 corrupted 文件夾下](https://github.com/siyuan-note/siyuan/issues/9202)
+
+### 修復缺陷
+
+* [持續快速輸入並回車觸發狀態異常](https://github.com/siyuan-note/siyuan/issues/9152)
+* [數據歷史界麵點擊無響應](https://github.com/siyuan-note/siyuan/issues/9167)
+* [撤銷和重做觸發狀態異常](https://github.com/siyuan-note/siyuan/issues/9178)
+* [全屏 Alt+Y 和一些快捷鍵在編輯器中失效](https://github.com/siyuan-note/siyuan/issues/9184)
+* [在代碼塊最後一行輸入 Tab 未對齊](https://github.com/siyuan-note/siyuan/issues/9189)
+* [PDF 頁簽 `⋮` 菜單項無法點擊](https://github.com/siyuan-note/siyuan/issues/9192)
+* [導出模板時無法指定文件名](https://github.com/siyuan-note/siyuan/issues/9201)
+* [從某些瀏覽器複製粘貼時內核崩潰](https://github.com/siyuan-note/siyuan/issues/9203)
+
+### 開發者
+
+* [為關閉窗口添加回調](https://github.com/siyuan-note/siyuan/issues/9128)
+* [添加插件函數 `transaction`](https://github.com/siyuan-note/siyuan/issues/9172)
+* [為數據同步增加細節日誌](https://github.com/siyuan-note/siyuan/issues/9191)
+* [升級 Electron](https://github.com/siyuan-note/siyuan/issues/9199)

+ 36 - 0
app/changelogs/v2.10.6/v2.10.6_zh_CN.md

@@ -10,4 +10,40 @@
 
 以下是此版本中的详细变更。
 
+### 改进功能
 
+* [在 Pad 端右上角添加退出按钮](https://github.com/siyuan-note/siyuan/issues/9163)
+* [在 / 菜单中点击 Emoji 后光标在编辑器中保留位置](https://github.com/siyuan-note/siyuan/issues/9165)
+* [改进移动端搜索](https://github.com/siyuan-note/siyuan/issues/9168)
+* [搜索代码块语言后清除选项消失](https://github.com/siyuan-note/siyuan/issues/9169)
+* [超链接悬浮提示过长](https://github.com/siyuan-note/siyuan/issues/9170)
+* [导出 HTML 时支持符号链接主题文件夹](https://github.com/siyuan-note/siyuan/issues/9173)
+* [跨块选择文本后仅支持复制](https://github.com/siyuan-note/siyuan/issues/9175)
+* [在 Pad 端无法在搜索列表中打开文档](https://github.com/siyuan-note/siyuan/issues/9177)
+* [代码块中快速输入光标不再重置到开头](https://github.com/siyuan-note/siyuan/issues/9179)
+* [请求 Origin 标头为非 127.0.0.1 时进行鉴权](https://github.com/siyuan-note/siyuan/issues/9180)
+* [改进一些 UI 元素的大小重置](https://github.com/siyuan-note/siyuan/issues/9182)
+* [改进设置关于中的本地 IP 显示](https://github.com/siyuan-note/siyuan/pull/9186)
+* [当不存在滚动条时提示浮层随鼠标移开隐藏](https://github.com/siyuan-note/siyuan/issues/9194)
+* [改进文档菜单](https://github.com/siyuan-note/siyuan/issues/9195)
+* [改进删除书签提示](https://github.com/siyuan-note/siyuan/issues/9196)
+* [改进创建快照和数据同步的稳定性](https://github.com/siyuan-note/siyuan/issues/9197)
+* [自动将损坏的笔记本文件夹移动到 corrupted 文件夹下](https://github.com/siyuan-note/siyuan/issues/9202)
+
+### 修复缺陷
+
+* [持续快速输入并回车触发状态异常](https://github.com/siyuan-note/siyuan/issues/9152)
+* [数据历史界面点击无响应](https://github.com/siyuan-note/siyuan/issues/9167)
+* [撤销和重做触发状态异常](https://github.com/siyuan-note/siyuan/issues/9178)
+* [全屏 Alt+Y 和一些快捷键在编辑器中失效](https://github.com/siyuan-note/siyuan/issues/9184)
+* [在代码块最后一行输入 Tab 未对齐](https://github.com/siyuan-note/siyuan/issues/9189)
+* [PDF 页签 `⋮` 菜单项无法点击](https://github.com/siyuan-note/siyuan/issues/9192)
+* [导出模板时无法指定文件名](https://github.com/siyuan-note/siyuan/issues/9201)
+* [从某些浏览器复制粘贴时内核崩溃](https://github.com/siyuan-note/siyuan/issues/9203)
+
+### 开发者
+
+* [为关闭窗口添加回调](https://github.com/siyuan-note/siyuan/issues/9128)
+* [添加插件函数 `transaction`](https://github.com/siyuan-note/siyuan/issues/9172)
+* [为数据同步增加细节日志](https://github.com/siyuan-note/siyuan/issues/9191)
+* [升级 Electron](https://github.com/siyuan-note/siyuan/issues/9199)

+ 5 - 0
kernel/api/lute.go

@@ -104,6 +104,11 @@ func html2BlockDOM(c *gin.Context) {
 			if gulu.OS.IsWindows() {
 				localPath = strings.TrimPrefix(localPath, "/")
 			}
+
+			if !filepath.IsAbs(localPath) {
+				// Kernel crash when copy-pasting from some browsers https://github.com/siyuan-note/siyuan/issues/9203
+				return ast.WalkContinue
+			}
 			if !gulu.File.IsExist(localPath) {
 				return ast.WalkContinue
 			}

+ 11 - 0
kernel/model/box.go

@@ -112,7 +112,18 @@ func ListNotebooks() (ret []*Box, err error) {
 		boxDirPath := filepath.Join(util.DataDir, dir.Name())
 		boxConfPath := filepath.Join(boxDirPath, ".siyuan", "conf.json")
 		if !gulu.File.IsExist(boxConfPath) {
+			// Automatically move corrupted notebook folders to the corrupted folder https://github.com/siyuan-note/siyuan/issues/9202
 			logging.LogWarnf("found a corrupted box [%s]", boxDirPath)
+			to := filepath.Join(util.WorkspaceDir, "corrupted", time.Now().Format("2006-01-02-150405"), dir.Name())
+			if copyErr := filelock.Copy(boxDirPath, to); nil != copyErr {
+				logging.LogErrorf("copy corrupted notebook dir [%s] failed: %s", boxDirPath, copyErr)
+				continue
+			}
+			if removeErr := filelock.Remove(boxDirPath); nil != removeErr {
+				logging.LogErrorf("remove corrupted data file [%s] failed: %s", boxDirPath, removeErr)
+				continue
+			}
+			util.ReloadUI()
 			continue
 		}