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

This commit is contained in:
Vanessa 2025-12-14 12:06:07 +08:00
commit 07046cae57
5 changed files with 123 additions and 8 deletions

View file

@ -13,14 +13,43 @@ Below are the detailed changes in this version.
### Feature
* [Callout block](https://github.com/siyuan-note/siyuan/issues/16051)
### Enhancement
* [Improve memo tooltip](https://github.com/siyuan-note/siyuan/issues/14796)
* [Improve open block positioning](https://github.com/siyuan-note/siyuan/issues/16477)
* [Improve cursor positioning for opening diaries using hotkey](https://github.com/siyuan-note/siyuan/issues/16479)
* [Improve dragging block](https://github.com/siyuan-note/siyuan/issues/16489)
* [Improve mobile outline positioning](https://github.com/siyuan-note/siyuan/issues/16494)
* [Improve file history generation](https://github.com/siyuan-note/siyuan/issues/16501)
* [The old version of the application no longer supports opening the new version of the document](https://github.com/siyuan-note/siyuan/issues/16505)
* [Improve the sorting rules after moving the sorted list up and down](https://github.com/siyuan-note/siyuan/issues/16510)
* [Support highlighting for MoonBit programming language](https://github.com/siyuan-note/siyuan/pull/16515)
* [Improve the behavior of `Jump to parent block` in lists](https://github.com/siyuan-note/siyuan/issues/16516)
* [Supports setting the spell check language on desktop](https://github.com/siyuan-note/siyuan/issues/16524)
* [Add Korean support](https://github.com/siyuan-note/siyuan/pull/16526)
* [Improve input method compatibility on macOS](https://github.com/siyuan-note/siyuan/issues/16532)
* [Improve AI tooltip](https://github.com/siyuan-note/siyuan/issues/16534)
* [Improve inline code editing](https://github.com/siyuan-note/siyuan/issues/16556)
* [Improve data indexing performance](https://github.com/siyuan-note/siyuan/issues/16557)
* [Add Turkish support](https://github.com/siyuan-note/siyuan/pull/16575)
* [Improve deduplication of inserted assets](https://github.com/siyuan-note/siyuan/issues/16576)
### Bugfix
### Refactor
* [Database kanban view grouping modification issues](https://github.com/siyuan-note/siyuan/issues/16511)
* [An error occurs when entering backticks after a soft line break](https://github.com/siyuan-note/siyuan/issues/16519)
* [Fix executing the uninstall method when closing the plugin](https://github.com/siyuan-note/siyuan/pull/16522)
* [Zip decompression security vulnerability](https://github.com/siyuan-note/siyuan/issues/16541)
* [Can't switch workspaces on mobile](https://github.com/siyuan-note/siyuan/issues/16544)
* [Embed blocks are exported incorrectly](https://github.com/siyuan-note/siyuan/issues/16547)
### Development
* [Plugin updates caused the dock, toolbar, and tabs to fail to load](https://github.com/siyuan-note/siyuan/issues/16485)
* [Improve marketplace package indexing](https://github.com/siyuan-note/siyuan/issues/16540)
## Download
* [B3log](https://b3log.org/siyuan/en/download.html)

View file

@ -1,6 +1,6 @@
## 概述
資料庫看板視圖現已發布!
提示區塊現已發布!
請注意:
@ -13,14 +13,43 @@
### 引入特性
* [提示區塊](https://github.com/siyuan-note/siyuan/issues/16051)
### 改進功能
* [改進備註提示](https://github.com/siyuan-note/siyuan/issues/14796)
* [改進打開區塊的位置定位](https://github.com/siyuan-note/siyuan/issues/16477)
* [改進透過快捷鍵開啟日記時的遊標定位](https://github.com/siyuan-note/siyuan/issues/16479)
* [改良塊拖曳](https://github.com/siyuan-note/siyuan/issues/16489)
* [改進行動端大綱定位](https://github.com/siyuan-note/siyuan/issues/16494)
* [改進文件歷史產生](https://github.com/siyuan-note/siyuan/issues/16501)
* [舊版應用程式不再支援開啟新版本文件](https://github.com/siyuan-note/siyuan/issues/16505)
* [改進上下移動排序清單後的排序規則](https://github.com/siyuan-note/siyuan/issues/16510)
* [支援 MoonBit 程式語言的語法高亮](https://github.com/siyuan-note/siyuan/pull/16515)
* [改進清單中 `跳到父區塊` 的行為](https://github.com/siyuan-note/siyuan/issues/16516)
* [支援在桌面端設定拼字檢查語言](https://github.com/siyuan-note/siyuan/issues/16524)
* [新增韓文支援](https://github.com/siyuan-note/siyuan/pull/16526)
* [改進 macOS 上輸入法相容性](https://github.com/siyuan-note/siyuan/issues/16532)
* [改進 AI 工具提示](https://github.com/siyuan-note/siyuan/issues/16534)
* [改進行級程式碼編輯](https://github.com/siyuan-note/siyuan/issues/16556)
* [改進資料索引效能](https://github.com/siyuan-note/siyuan/issues/16557)
* [新增土耳其語支援](https://github.com/siyuan-note/siyuan/pull/16575)
* [改進插入資源檔案去重](https://github.com/siyuan-note/siyuan/issues/16576)
### 修復缺陷
### 開發重構
* [修正資料庫看板檢視分組修改問題](https://github.com/siyuan-note/siyuan/issues/16511)
* [修正在軟換行後輸入反引號導致的錯誤](https://github.com/siyuan-note/siyuan/issues/16519)
* [修復關閉插件時執行卸載方法的問題](https://github.com/siyuan-note/siyuan/pull/16522)
* [修復 Zip 解壓縮的安全漏洞](https://github.com/siyuan-note/siyuan/issues/16541)
* [修復行動裝置無法切換工作空間](https://github.com/siyuan-note/siyuan/issues/16544)
* [修正嵌入區塊匯出錯誤](https://github.com/siyuan-note/siyuan/issues/16547)
### 開發者
* [插件更新導致停靠列、工具列和選項卡載入失敗](https://github.com/siyuan-note/siyuan/issues/16485)
* [改進市集包索引](https://github.com/siyuan-note/siyuan/issues/16540)
## 下載
* [B3log](https://b3log.org/siyuan/download.html)

View file

@ -13,14 +13,43 @@
### 引入特性
* [提示块](https://github.com/siyuan-note/siyuan/issues/16051)
### 改进功能
* [改进备注提示](https://github.com/siyuan-note/siyuan/issues/14796)
* [改进打开块的位置定位](https://github.com/siyuan-note/siyuan/issues/16477)
* [改进通过快捷键打开日记时的光标定位](https://github.com/siyuan-note/siyuan/issues/16479)
* [改进块拖拽](https://github.com/siyuan-note/siyuan/issues/16489)
* [改进移动端大纲定位](https://github.com/siyuan-note/siyuan/issues/16494)
* [改进文件历史生成](https://github.com/siyuan-note/siyuan/issues/16501)
* [旧版本应用不再支持打开新版本文档](https://github.com/siyuan-note/siyuan/issues/16505)
* [改进上下移动排序列表后的排序规则](https://github.com/siyuan-note/siyuan/issues/16510)
* [支持 MoonBit 编程语言的语法高亮](https://github.com/siyuan-note/siyuan/pull/16515)
* [改进列表中 `跳转到父块` 的行为](https://github.com/siyuan-note/siyuan/issues/16516)
* [支持在桌面端设置拼写检查语言](https://github.com/siyuan-note/siyuan/issues/16524)
* [添加韩语支持](https://github.com/siyuan-note/siyuan/pull/16526)
* [改进 macOS 上输入法兼容性](https://github.com/siyuan-note/siyuan/issues/16532)
* [改进 AI 工具提示](https://github.com/siyuan-note/siyuan/issues/16534)
* [改进行级代码编辑](https://github.com/siyuan-note/siyuan/issues/16556)
* [改进数据索引性能](https://github.com/siyuan-note/siyuan/issues/16557)
* [添加土耳其语支持](https://github.com/siyuan-note/siyuan/pull/16575)
* [改进插入资源文件去重](https://github.com/siyuan-note/siyuan/issues/16576)
### 修复缺陷
### 开发重构
* [修复数据库看板视图分组修改问题](https://github.com/siyuan-note/siyuan/issues/16511)
* [修复在软换行后输入反引号导致的错误](https://github.com/siyuan-note/siyuan/issues/16519)
* [修复关闭插件时执行卸载方法的问题](https://github.com/siyuan-note/siyuan/pull/16522)
* [修复 Zip 解压的安全漏洞](https://github.com/siyuan-note/siyuan/issues/16541)
* [修复移动端无法切换工作空间](https://github.com/siyuan-note/siyuan/issues/16544)
* [修复嵌入块导出错误](https://github.com/siyuan-note/siyuan/issues/16547)
### 开发者
* [插件更新导致停靠栏、工具栏和选项卡加载失败](https://github.com/siyuan-note/siyuan/issues/16485)
* [改进集市包索引](https://github.com/siyuan-note/siyuan/issues/16540)
## 下载
* [B3log](https://b3log.org/siyuan/download.html)

View file

@ -205,6 +205,11 @@ func GetBlockSiblingID(id string) (parent, previous, next string) {
if nil == current || !current.IsBlock() {
return
}
if nil != current.Parent && ast.NodeListItem == current.Parent.Type {
current = current.Parent
}
parentBlock := treenode.ParentBlock(current)
if nil == parentBlock {
return

View file

@ -84,14 +84,26 @@ func InsertLocalAssets(id string, assetAbsPaths []string, isUpload bool) (succMa
err = openErr
return
}
hash, hashErr := util.GetEtagByHandle(f, fi.Size())
if nil != hashErr {
f.Close()
return
}
if existAssetPath := GetAssetPathByHash(hash); "" != existAssetPath {
// 已经存在同样数据的资源文件的话不重复保存
if 1 > fi.Size() {
hash = "random_1_" + gulu.Rand.String(12)
}
existAssetPath := GetAssetPathByHash(hash)
if "" != existAssetPath {
originalName := util.RemoveID(filepath.Base(existAssetPath))
if fName != originalName {
hash = "random_2_" + gulu.Rand.String(12)
}
}
if "" != existAssetPath && !strings.HasPrefix(hash, "random_") {
succMap[baseName] = existAssetPath
} else {
fName = util.AssetName(fName, ast.NewNodeID())
@ -200,8 +212,19 @@ func Upload(c *gin.Context) {
break
}
if existAssetPath := GetAssetPathByHash(hash); "" != existAssetPath {
// 已经存在同样数据的资源文件的话不重复保存
if 1 > file.Size {
hash = "empty_" + gulu.Rand.String(12)
}
existAssetPath := GetAssetPathByHash(hash)
if "" != existAssetPath {
originalName := util.RemoveID(filepath.Base(existAssetPath))
if fName != originalName {
hash = "random_2_" + gulu.Rand.String(12)
}
}
if "" != existAssetPath && !strings.HasPrefix(hash, "random_") {
succMap[baseName] = existAssetPath
} else {
if skipIfDuplicated {