diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index fc428ef7e..c789a1886 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -33,4 +33,4 @@ jobs: - name: Build the Docker image run: | - docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7 -t b3log/siyuan:latest -t b3log/siyuan:v2.1.12 . \ No newline at end of file + docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7 -t b3log/siyuan:latest -t b3log/siyuan:v2.1.13 . \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f7d5ba77..4cd92a67f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,31 @@ +## v2.1.13 / 2022-09-05 + +### 改进功能 + +* [为每个分屏添加页签下拉菜单](https://github.com/siyuan-note/siyuan/issues/5772) +* [页签栏支持 `+` 创建](https://github.com/siyuan-note/siyuan/issues/5773) +* [列表项以公式等不可直接编辑的块结尾后无法回车创建新列表项](https://github.com/siyuan-note/siyuan/issues/5796) +* [改进集市已下载包的显示和更新](https://github.com/siyuan-note/siyuan/issues/5807) +* [改进 `Ctrl+K` 超链接粘贴识别](https://github.com/siyuan-note/siyuan/issues/5817) +* [公式导出时将宏定义使用 `\newcommand` 插入](https://github.com/siyuan-note/siyuan/issues/5818) +* [Linux 端不再支持 `粘贴为纯文本` 时处理文件绝对路径](https://github.com/siyuan-note/siyuan/issues/5825) + +### 文档相关 + +* [修改 Android 端隐私政策](https://github.com/siyuan-note/siyuan/issues/5810) +* [修复帮助文档快捷键相关的错误描述](https://github.com/siyuan-note/siyuan/issues/5811) + +### 修复缺陷 + +* [挂件移动或设置大小后属性丢失](https://github.com/siyuan-note/siyuan/issues/4885) +* [列表项第一个子块为空时导出渲染错误](https://github.com/siyuan-note/siyuan/issues/5806) +* [Windows 端打开本地文件所在位置失效](https://github.com/siyuan-note/siyuan/issues/5808) +* [PDF 阅读器内存泄漏](https://github.com/siyuan-note/siyuan/issues/5809) +* [标签名称存在包含关系时重命名标签会出现误修改](https://github.com/siyuan-note/siyuan/issues/5816) +* [搜索结果中文档图标使用自定义图标时大小异常](https://github.com/siyuan-note/siyuan/issues/5819) +* [行内公式导出被字母 a 和 b 包裹](https://github.com/siyuan-note/siyuan/issues/5820) +* [标题块下方块反向链接计算问题](https://github.com/siyuan-note/siyuan/issues/5822) + ## v2.1.12 / 2022-09-03 ### 改进功能 diff --git a/app/appx/AppxManifest.xml b/app/appx/AppxManifest.xml index 145133eec..d8e7b8b44 100644 --- a/app/appx/AppxManifest.xml +++ b/app/appx/AppxManifest.xml @@ -9,7 +9,7 @@ + Version="2.1.13.0"/> SiYuan 云南链滴科技有限公司 diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100744-br924ar.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100744-br924ar.sy index 60915c11c..847b6129a 100644 --- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100744-br924ar.sy +++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100744-br924ar.sy @@ -5,7 +5,7 @@ "id": "20200924100744-br924ar", "title": "Assets", "type": "doc", - "updated": "20220902220108" + "updated": "20220905215835" }, "Children": [ { @@ -81,12 +81,12 @@ "Type": "NodeParagraph", "Properties": { "id": "20220824172815-s8znsau", - "updated": "20220824172918" + "updated": "20220905215835" }, "Children": [ { "Type": "NodeText", - "Data": "In the editor, you can directly paste the copied picture or file in the system clipboard, or insert it by dragging and dropping the picture or file into the editor. There are two options when inserting:" + "Data": "In the editor, you can directly paste the copied picture or file in the system clipboard (not supported on Linux), or insert it by dragging and dropping the picture or file into the editor. There are two options when inserting:" } ] }, diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200915214115-42b8zma.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200915214115-42b8zma.sy index b8fd38ca6..8a5754c8c 100644 --- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200915214115-42b8zma.sy +++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200915214115-42b8zma.sy @@ -5,7 +5,7 @@ "id": "20200915214115-42b8zma", "title": "资源文件", "type": "doc", - "updated": "20220902215702" + "updated": "20220905215650" }, "Children": [ { @@ -81,12 +81,12 @@ "Type": "NodeParagraph", "Properties": { "id": "20210104091255-8s7avcx", - "updated": "20220824172231" + "updated": "20220905215650" }, "Children": [ { "Type": "NodeText", - "Data": "在编辑器中可以直接粘贴系统剪切板中复制好的图片或文件,或者通过拖拽图片或文件到编辑器中也可以实现插入。插入时有两个选择:" + "Data": "在编辑器中可以直接粘贴系统剪切板中复制好的图片或文件(Linux 端不支持),或者通过拖拽图片或文件到编辑器中也可以实现插入。插入时有两个选择:" } ] }, diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226123038-4umgpxy.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226123038-4umgpxy.sy index 6f2001b49..fdb24a6f5 100644 --- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226123038-4umgpxy.sy +++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226123038-4umgpxy.sy @@ -4,7 +4,7 @@ "Properties": { "id": "20211226123038-4umgpxy", "title": "資料文件", - "updated": "20220902220120" + "updated": "20220905215759" }, "Children": [ { @@ -76,12 +76,12 @@ "Type": "NodeParagraph", "Properties": { "id": "20211226123051-zdhnfws", - "updated": "20220824172714" + "updated": "20220905215759" }, "Children": [ { "Type": "NodeText", - "Data": "在編輯器中可以直接粘貼系統剪切板中復制好的圖片或文件,或者通過拖拽圖片或文件到編輯器中也可以實現插入。插入時有兩個選擇:" + "Data": "在編輯器中可以直接粘貼系統剪切板中復制好的圖片或文件(Linux 端不支持),或者通過拖拽圖片或文件到編輯器中也可以實現插入。插入時有兩個選擇:" } ] }, diff --git a/app/package.json b/app/package.json index 8561d7840..37fcda281 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "SiYuan", - "version": "2.1.12", + "version": "2.1.13", "description": "Build Your Eternal Digital Garden", "homepage": "https://b3log.org/siyuan", "main": "./electron/main.js", diff --git a/app/src/editor/util.ts b/app/src/editor/util.ts index 843b55849..5c3166c33 100644 --- a/app/src/editor/util.ts +++ b/app/src/editor/util.ts @@ -481,6 +481,10 @@ export const openBy = (url: string, type: "folder" | "app") => { if (type === "app") { shell.openPath(address); } else if (type === "folder") { + if ("windows" === window.siyuan.config.system.os) { + // Windows 端打开本地文件所在位置失效 https://github.com/siyuan-note/siyuan/issues/5808 + address = address.replace(/\\\\/g, "\\"); + } shell.showItemInFolder(address); } /// #endif diff --git a/kernel/api/bazaar.go b/kernel/api/bazaar.go index 1ee5011ae..1bfc36e25 100644 --- a/kernel/api/bazaar.go +++ b/kernel/api/bazaar.go @@ -21,7 +21,6 @@ import ( "github.com/88250/gulu" "github.com/gin-gonic/gin" - "github.com/siyuan-note/siyuan/kernel/bazaar" "github.com/siyuan-note/siyuan/kernel/model" "github.com/siyuan-note/siyuan/kernel/util" ) @@ -56,7 +55,7 @@ func getInstalledWidget(c *gin.Context) { defer c.JSON(http.StatusOK, ret) ret.Data = map[string]interface{}{ - "packages": bazaar.InstalledWidgets(), + "packages": model.InstalledWidgets(), } } @@ -121,7 +120,7 @@ func getInstalledIcon(c *gin.Context) { defer c.JSON(http.StatusOK, ret) ret.Data = map[string]interface{}{ - "packages": bazaar.InstalledIcons(), + "packages": model.InstalledIcons(), } } @@ -188,7 +187,7 @@ func getInstalledTemplate(c *gin.Context) { defer c.JSON(http.StatusOK, ret) ret.Data = map[string]interface{}{ - "packages": bazaar.InstalledTemplates(), + "packages": model.InstalledTemplates(), } } @@ -254,7 +253,7 @@ func getInstalledTheme(c *gin.Context) { defer c.JSON(http.StatusOK, ret) ret.Data = map[string]interface{}{ - "packages": bazaar.InstalledThemes(), + "packages": model.InstalledThemes(), } } diff --git a/kernel/api/clipboard.go b/kernel/api/clipboard.go index 62d6711e5..f1848a81e 100644 --- a/kernel/api/clipboard.go +++ b/kernel/api/clipboard.go @@ -26,6 +26,12 @@ func readFilePaths(c *gin.Context) { ret := gulu.Ret.NewResult() defer c.JSON(200, ret) - paths, _ := clipboard.ReadFilePaths() + var paths []string + if !gulu.OS.IsLinux() { // Linux 端不再支持 `粘贴为纯文本` 时处理文件绝对路径 https://github.com/siyuan-note/siyuan/issues/5825 + paths, _ = clipboard.ReadFilePaths() + } + if 1 > len(paths) { + paths = []string{} + } ret.Data = paths } diff --git a/kernel/model/backlink.go b/kernel/model/backlink.go index 564c056bd..259cc9497 100644 --- a/kernel/model/backlink.go +++ b/kernel/model/backlink.go @@ -238,7 +238,7 @@ func BuildTreeBacklink(id, keyword, mentionKeyword string, beforeLen int) (boxID } paragraphParents := sql.GetBlocks(paragraphParentIDs) for _, p := range paragraphParents { - if "i" == p.Type { + if "i" == p.Type || "h" == p.Type { linkRefs = append(linkRefs, fromSQLBlock(p, keyword, beforeLen)) processedParagraphs.Add(p.ID) } diff --git a/kernel/model/bazzar.go b/kernel/model/bazzar.go index 0cd39280d..c379c4dc7 100644 --- a/kernel/model/bazzar.go +++ b/kernel/model/bazzar.go @@ -49,6 +49,11 @@ func BazaarWidgets() (widgets []*bazaar.Widget) { return } +func InstalledWidgets() (widgets []*bazaar.Widget) { + widgets = bazaar.InstalledWidgets() + return +} + func InstallBazaarWidget(repoURL, repoHash, widgetName string) error { writingDataLock.Lock() defer writingDataLock.Unlock() @@ -91,6 +96,14 @@ func BazaarIcons() (icons []*bazaar.Icon) { return } +func InstalledIcons() (icons []*bazaar.Icon) { + icons = bazaar.InstalledIcons() + for _, icon := range icons { + icon.Current = icon.Name == Conf.Appearance.Icon + } + return +} + func InstallBazaarIcon(repoURL, repoHash, iconName string) error { writingDataLock.Lock() defer writingDataLock.Unlock() @@ -138,6 +151,14 @@ func BazaarThemes() (ret []*bazaar.Theme) { return } +func InstalledThemes() (ret []*bazaar.Theme) { + ret = bazaar.InstalledThemes() + for _, theme := range ret { + theme.Current = theme.Name == Conf.Appearance.ThemeDark || theme.Name == Conf.Appearance.ThemeLight + } + return +} + func InstallBazaarTheme(repoURL, repoHash, themeName string, mode int, update bool) error { writingDataLock.Lock() defer writingDataLock.Unlock() @@ -197,6 +218,11 @@ func BazaarTemplates() (templates []*bazaar.Template) { return } +func InstalledTemplates() (templates []*bazaar.Template) { + templates = bazaar.InstalledTemplates() + return +} + func InstallBazaarTemplate(repoURL, repoHash, templateName string) error { writingDataLock.Lock() defer writingDataLock.Unlock() diff --git a/kernel/util/working.go b/kernel/util/working.go index 9d632a93a..0e4264008 100644 --- a/kernel/util/working.go +++ b/kernel/util/working.go @@ -40,7 +40,7 @@ import ( var Mode = "prod" const ( - Ver = "2.1.12" + Ver = "2.1.13" IsInsider = false )