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

This commit is contained in:
Vanessa 2022-09-05 22:02:10 +08:00
commit 009f59a8d1
13 changed files with 83 additions and 20 deletions

View file

@ -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 .
docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7 -t b3log/siyuan:latest -t b3log/siyuan:v2.1.13 .

View file

@ -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
### 改进功能

View file

@ -9,7 +9,7 @@
<Identity Name="89C2A984.SiYuan"
ProcessorArchitecture="x64"
Publisher='CN=087C656E-C1D9-42D8-8807-CED45A74FC0F'
Version="2.1.12.0"/>
Version="2.1.13.0"/>
<Properties>
<DisplayName>SiYuan</DisplayName>
<PublisherDisplayName>云南链滴科技有限公司</PublisherDisplayName>

View file

@ -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:"
}
]
},

View file

@ -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 端不支持),或者通过拖拽图片或文件到编辑器中也可以实现插入。插入时有两个选择:"
}
]
},

View file

@ -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 端不支持),或者通過拖拽圖片或文件到編輯器中也可以實現插入。插入時有兩個選擇:"
}
]
},

View file

@ -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",

View file

@ -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

View file

@ -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(),
}
}

View file

@ -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
}

View file

@ -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)
}

View file

@ -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()

View file

@ -40,7 +40,7 @@ import (
var Mode = "prod"
const (
Ver = "2.1.12"
Ver = "2.1.13"
IsInsider = false
)