diff --git a/app/changelogs/v2.9.8/v2.9.8.md b/app/changelogs/v2.9.8/v2.9.8.md new file mode 100644 index 000000000..641e2e2eb --- /dev/null +++ b/app/changelogs/v2.9.8/v2.9.8.md @@ -0,0 +1,47 @@ +## Overview + +This version fixes some detail defects, it is recommended to upgrade. + +## Changelogs + +Below are the detailed changes in this version. + +### Enhancement + +* [Remove the target docx file when exporting](https://github.com/siyuan-note/siyuan/issues/8822) +* [Improve popover position](https://github.com/siyuan-note/siyuan/issues/8824) +* [Improve data sync lock](https://github.com/siyuan-note/siyuan/issues/8827) +* [Improve flashcard data reading and writing stability](https://github.com/siyuan-note/siyuan/issues/8834) +* [Upgrade flashcard algorithm to FSRSv4](https://github.com/siyuan-note/siyuan/issues/8843) +* [Upgrade mermaid to 10+](https://github.com/siyuan-note/siyuan/issues/8848) +* [Move the mouse into the config item, and the button will display the unified hover effect](https://github.com/siyuan-note/siyuan/pull/8850) +* [Improve robustness when local.json is corrupted](https://github.com/siyuan-note/siyuan/issues/8852) +* [Check local data chunk integrity before data synchronization](https://github.com/siyuan-note/siyuan/issues/8853) +* [Improve attribute panel](https://github.com/siyuan-note/siyuan/issues/8855) + +### Bugfix + +* [Breadcrumb bar in search panel not showing right values](https://github.com/siyuan-note/siyuan/issues/8807) +* [Outline jumps to embedded heading block instead of actual heading block](https://github.com/siyuan-note/siyuan/issues/8817) +* [Assets starting with `.` should not be considered missing assets](https://github.com/siyuan-note/siyuan/issues/8821) +* [Anchor text repeats after conversion of non-plain text inline-level elements to a block ref](https://github.com/siyuan-note/siyuan/issues/8825) +* [Assets search garbled characters](https://github.com/siyuan-note/siyuan/issues/8828) +* [Hovering doc tree count rendering exception](https://github.com/siyuan-note/siyuan/issues/8838) +* [Insert image link `Esc` can't save link address](https://github.com/siyuan-note/siyuan/issues/8839) +* [When dragging to the left, all blocks are selected](https://github.com/siyuan-note/siyuan/issues/8845) +* [When maxListCount limit is not reached, the wrong pop-up box prompts a maxListCount error](https://github.com/siyuan-note/siyuan/pull/8846) +* [Dragging list items after splitting the screen causes data loss](https://github.com/siyuan-note/siyuan/issues/8863) + +### Development + +* [Attribute View add by find or create new doc](https://github.com/siyuan-note/siyuan/issues/8665) +* [Attribute View date column filter](https://github.com/siyuan-note/siyuan/issues/8756) +* [Attribute View date column calculate](https://github.com/siyuan-note/siyuan/issues/8757) +* [Better display of attribute view fields in block attribute panel](https://github.com/siyuan-note/siyuan/issues/8765) +* [Push database index commit event](https://github.com/siyuan-note/siyuan/issues/8814) +* [Persist flashcard review log records](https://github.com/siyuan-note/siyuan/issues/8833) +* [Kernel API `/api/export/exportResources` to export files and folders](https://github.com/siyuan-note/siyuan/pull/8841) +* [API "Protyle" parameter render is incompatible](https://github.com/siyuan-note/siyuan/issues/8849) +* [Add parameter dialog to the "confirm" callback](https://github.com/siyuan-note/siyuan/issues/8851) +* [Add URL type column to Attribute View](https://github.com/siyuan-note/siyuan/issues/8854) +* [Drag doc from doc tree to attribute view](https://github.com/siyuan-note/siyuan/issues/8858) diff --git a/app/changelogs/v2.9.8/v2.9.8_zh_CHT.md b/app/changelogs/v2.9.8/v2.9.8_zh_CHT.md new file mode 100644 index 000000000..156304856 --- /dev/null +++ b/app/changelogs/v2.9.8/v2.9.8_zh_CHT.md @@ -0,0 +1,47 @@ +## 概述 + +該版本修復了一些細節缺陷,建議升級。 + +## 變更記錄 + +以下是此版本中的詳細變更。 + +### 改進功能 + +* [導出 Word 文檔時刪除目標位置文件](https://github.com/siyuan-note/siyuan/issues/8822) +* [改進彈出層位置](https://github.com/siyuan-note/siyuan/issues/8824) +* [改進數據同步鎖](https://github.com/siyuan-note/siyuan/issues/8827) +* [改進閃卡數據讀寫穩定性](https://github.com/siyuan-note/siyuan/issues/8834) +* [升級閃卡間隔重複算法 FSRSv4](https://github.com/siyuan-note/siyuan/issues/8843) +* [升級 Mermaid 10+](https://github.com/siyuan-note/siyuan/issues/8848) +* [鼠標移入配置項時統一按鈕顯示效果](https://github.com/siyuan-note/siyuan/pull/8850) +* [改進 local.json 損壞時的健壯性](https://github.com/siyuan-note/siyuan/issues/8852) +* [數據同步前檢查本地數據分塊完整性](https://github.com/siyuan-note/siyuan/issues/8853) +* [改進屬性面板](https://github.com/siyuan-note/siyuan/issues/8855) + +### 修復缺陷 + +* [搜索結果預覽時麵包屑不正確](https://github.com/siyuan-note/siyuan/issues/8807) +* [大綱跳轉到嵌入的標題塊而非實際塊](https://github.com/siyuan-note/siyuan/issues/8817) +* [以 `.` 開頭的資源文件不應該被識別為已丟失的資源文件](https://github.com/siyuan-note/siyuan/issues/8821) +* [將非純文本行級元素轉換塊引用時錨文本重複](https://github.com/siyuan-note/siyuan/issues/8825) +* [資源文件搜索亂碼](https://github.com/siyuan-note/siyuan/issues/8828) +* [懸停文檔樹計數渲染異常](https://github.com/siyuan-note/siyuan/issues/8838) +* [插入圖片鏈接後按 `Esc` 未保存鏈接地址](https://github.com/siyuan-note/siyuan/issues/8839) +* [拖拽靠左後會不應該選擇所有塊](https://github.com/siyuan-note/siyuan/issues/8845) +* [文檔樹最大列出數判斷問題](https://github.com/siyuan-note/siyuan/pull/8846) +* [分屏後拖拽列表項導致數據丟失](https://github.com/siyuan-note/siyuan/issues/8863) + +### 開發者 + +* [屬性視圖搜索或添加新文檔](https://github.com/siyuan-note/siyuan/issues/8665) +* [屬性視圖日期列過濾](https://github.com/siyuan-note/siyuan/issues/8756) +* [屬性視圖日期列計算](https://github.com/siyuan-note/siyuan/issues/8757) +* [塊屬性面板更好地顯示屬性視圖字段](https://github.com/siyuan-note/siyuan/issues/8765) +* [推送數據庫索引提交事件](https://github.com/siyuan-note/siyuan/issues/8814) +* [持久化閃卡複習日誌記錄](https://github.com/siyuan-note/siyuan/issues/8833) +* [內核 API `/api/export/exportResources` 導出文件和文件夾](https://github.com/siyuan-note/siyuan/pull/8841) +* [前端 API "Protyle" 渲染參數兼容](https://github.com/siyuan-note/siyuan/issues/8849) +* [前端 "confirm" 對話框回調添加參數](https://github.com/siyuan-note/siyuan/issues/8851) +* [屬性視圖支持 URL 列](https://github.com/siyuan-note/siyuan/issues/8854) +* [屬性視圖支持文檔樹上拖拽文檔插入行](https://github.com/siyuan-note/siyuan/issues/8858) diff --git a/app/changelogs/v2.9.8/v2.9.8_zh_CN.md b/app/changelogs/v2.9.8/v2.9.8_zh_CN.md new file mode 100644 index 000000000..2539df7a5 --- /dev/null +++ b/app/changelogs/v2.9.8/v2.9.8_zh_CN.md @@ -0,0 +1,47 @@ +## 概述 + +该版本修复了一些细节缺陷,建议升级。 + +## 变更记录 + +以下是此版本中的详细变更。 + +### 改进功能 + +* [导出 Word 文档时删除目标位置文件](https://github.com/siyuan-note/siyuan/issues/8822) +* [改进弹出层位置](https://github.com/siyuan-note/siyuan/issues/8824) +* [改进数据同步锁](https://github.com/siyuan-note/siyuan/issues/8827) +* [改进闪卡数据读写稳定性](https://github.com/siyuan-note/siyuan/issues/8834) +* [升级闪卡间隔重复算法 FSRSv4](https://github.com/siyuan-note/siyuan/issues/8843) +* [升级 Mermaid 10+](https://github.com/siyuan-note/siyuan/issues/8848) +* [鼠标移入配置项时统一按钮显示效果](https://github.com/siyuan-note/siyuan/pull/8850) +* [改进 local.json 损坏时的健壮性](https://github.com/siyuan-note/siyuan/issues/8852) +* [数据同步前检查本地数据分块完整性](https://github.com/siyuan-note/siyuan/issues/8853) +* [改进属性面板](https://github.com/siyuan-note/siyuan/issues/8855) + +### 修复缺陷 + +* [搜索结果预览时面包屑不正确](https://github.com/siyuan-note/siyuan/issues/8807) +* [大纲跳转到嵌入的标题块而非实际块](https://github.com/siyuan-note/siyuan/issues/8817) +* [以 `.` 开头的资源文件不应该被识别为已丢失的资源文件](https://github.com/siyuan-note/siyuan/issues/8821) +* [将非纯文本行级元素转换块引用时锚文本重复](https://github.com/siyuan-note/siyuan/issues/8825) +* [资源文件搜索乱码](https://github.com/siyuan-note/siyuan/issues/8828) +* [悬停文档树计数渲染异常](https://github.com/siyuan-note/siyuan/issues/8838) +* [插入图片链接后按 `Esc` 未保存链接地址](https://github.com/siyuan-note/siyuan/issues/8839) +* [拖拽靠左后会不应该选择所有块](https://github.com/siyuan-note/siyuan/issues/8845) +* [文档树最大列出数判断问题](https://github.com/siyuan-note/siyuan/pull/8846) +* [分屏后拖拽列表项导致数据丢失](https://github.com/siyuan-note/siyuan/issues/8863) + +### 开发者 + +* [属性视图搜索或添加新文档](https://github.com/siyuan-note/siyuan/issues/8665) +* [属性视图日期列过滤](https://github.com/siyuan-note/siyuan/issues/8756) +* [属性视图日期列计算](https://github.com/siyuan-note/siyuan/issues/8757) +* [块属性面板更好地显示属性视图字段](https://github.com/siyuan-note/siyuan/issues/8765) +* [推送数据库索引提交事件](https://github.com/siyuan-note/siyuan/issues/8814) +* [持久化闪卡复习日志记录](https://github.com/siyuan-note/siyuan/issues/8833) +* [内核 API `/api/export/exportResources` 导出文件和文件夹](https://github.com/siyuan-note/siyuan/pull/8841) +* [前端 API "Protyle" 渲染参数兼容](https://github.com/siyuan-note/siyuan/issues/8849) +* [前端 "confirm" 对话框回调添加参数](https://github.com/siyuan-note/siyuan/issues/8851) +* [属性视图支持 URL 列](https://github.com/siyuan-note/siyuan/issues/8854) +* [属性视图支持文档树上拖拽文档插入行](https://github.com/siyuan-note/siyuan/issues/8858) diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index 5a60f3e6d..c0eeb642f 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -103,6 +103,14 @@ func RenderAttributeView(avID, nodeID string) (viewable av.Viewable, attrView *a return } + if "" == attrView.NodeID { + attrView.NodeID = nodeID + if err = av.SaveAttributeView(attrView); nil != err { + logging.LogErrorf("save attribute view [%s] failed: %s", avID, err) + return + } + } + if 1 > len(attrView.Views) { err = av.ErrViewNotFound return @@ -378,14 +386,13 @@ func setAttributeViewColumnCalc(operation *Operation) (err error) { } func (tx *Transaction) doInsertAttrViewBlock(operation *Operation) (ret *TxErr) { - firstSrcID := operation.SrcIDs[0] - tree, err := tx.loadTree(firstSrcID) - if nil != err { - logging.LogErrorf("load tree [%s] failed: %s", firstSrcID, err) - return &TxErr{code: TxErrCodeBlockNotFound, id: firstSrcID, msg: err.Error()} - } - for _, id := range operation.SrcIDs { + tree, err := tx.loadTree(id) + if nil != err { + logging.LogErrorf("load tree [%s] failed: %s", id, err) + return &TxErr{code: TxErrCodeBlockNotFound, id: id, msg: err.Error()} + } + var avErr error if avErr = addAttributeViewBlock(id, operation, tree, tx); nil != avErr { return &TxErr{code: TxErrWriteAttributeView, id: operation.AvID, msg: avErr.Error()}