diff --git a/app/changelogs/v2.10.11/v2.10.11.md b/app/changelogs/v2.10.11/v2.10.11.md new file mode 100644 index 000000000..193c405b4 --- /dev/null +++ b/app/changelogs/v2.10.11/v2.10.11.md @@ -0,0 +1,51 @@ +## Overview + +This version fixes some bugs, and it is recommended to upgrade. + +Advertisement: Currently, `PRO Features` are in the early bird price stage, welcome to [learn more](https://b3log.org/siyuan/en/pricing.html). + +Note: The annual `Subscription` includes `Pro features`. If you are an annual subscriber, you do not need to buy PRO Features separately. + +## Changelogs + +Below are the detailed changes in this version. + +### Enhancement + +* [Improve the application icon on macOS desktop](https://github.com/siyuan-note/siyuan/issues/9403) +* [Math and embed block editing use fixed-width fonts](https://github.com/siyuan-note/siyuan/issues/9406) +* [When the doc is in read-only mode, the backlink and graph are not shown in the right-click menu of the ref](https://github.com/siyuan-note/siyuan/issues/9409) +* [Outline supports Ctrl+Click focus opening](https://github.com/siyuan-note/siyuan/issues/9410) +* [Add `--b3-font-family` to `` element's font-family](https://github.com/siyuan-note/siyuan/issues/9412) +* [PDF outline overlays editor select text toolbar](https://github.com/siyuan-note/siyuan/issues/9415) +* [Don't load plugin when the user hasn't agreed to trust bazaar content yet](https://github.com/siyuan-note/siyuan/issues/9426) +* [Improve pandoc binary path setting](https://github.com/siyuan-note/siyuan/issues/9427) +* [Hide text toolbar when using ref on the mobile](https://github.com/siyuan-note/siyuan/issues/9431) +* [After selecting the image Ctrl+X should cut the image instead of the block](https://github.com/siyuan-note/siyuan/issues/9433) +* [Add `--b3-font-family` to `.b3-menu__accelerator`'s font-family](https://github.com/siyuan-note/siyuan/issues/9439) +* [Adjust workspace name length limit to 32 runes](https://github.com/siyuan-note/siyuan/issues/9440) + +### Bugfix + +* [If PDF is opened by the new window, open it again and jump to the new window](https://github.com/siyuan-note/siyuan/issues/9405) +* [Exception when clicking on the blank space of the table block to paste text](https://github.com/siyuan-note/siyuan/issues/9411) +* [SVG images cannot be displayed on some systems](https://github.com/siyuan-note/siyuan/issues/9413) +* [An error occurs when opening a PDF file without annotations](https://github.com/siyuan-note/siyuan/issues/9425) +* [The access authorization code setting item is not displayed on the iPad](https://github.com/siyuan-note/siyuan/issues/9432) +* [When the heading block and super block are used together, repeating content if unfolding the heading](https://github.com/siyuan-note/siyuan/issues/9435) + +### Development + +* [Change database template column custom attribute action](https://github.com/siyuan-note/siyuan/issues/9401) +* [Click on the PDF asset in the database asset column to open it on the right](https://github.com/siyuan-note/siyuan/issues/9402) +* [Improve database template edit](https://github.com/siyuan-note/siyuan/issues/9404) +* [Database template columns support number calculations](https://github.com/siyuan-note/siyuan/issues/9408) +* [Database template columns support number filter](https://github.com/siyuan-note/siyuan/issues/9414) +* [Database block loading animation](https://github.com/siyuan-note/siyuan/issues/9416) +* [Database table view supports arrow keys/Esc to select a cell/row](https://github.com/siyuan-note/siyuan/issues/9417) +* [Improve database UI and add copy button to text, template, number, date, created and updated columns](https://github.com/siyuan-note/siyuan/issues/9418) +* [Supports searching database view content](https://github.com/siyuan-note/siyuan/issues/9419) +* [Improve database table view row menu property](https://github.com/siyuan-note/siyuan/issues/9420) +* [Improve database table view row interaction](https://github.com/siyuan-note/siyuan/issues/9421) +* [Click on the template cell to modify the template](https://github.com/siyuan-note/siyuan/issues/9423) +* [Database table view export does not display select content](https://github.com/siyuan-note/siyuan/issues/9428) diff --git a/app/changelogs/v2.10.11/v2.10.11_zh_CHT.md b/app/changelogs/v2.10.11/v2.10.11_zh_CHT.md new file mode 100644 index 000000000..18cb94ff0 --- /dev/null +++ b/app/changelogs/v2.10.11/v2.10.11_zh_CHT.md @@ -0,0 +1,51 @@ +## 概述 + +此版本修復了一些缺陷,建議升級。 + +廣告: 目前 `功能特性` 正處於早鳥價階段,歡迎[了解](https://b3log.org/siyuan/pricing.html)。 + +註:`年付訂閱` 包含 `功能特性`,如果你是訂閱會員,則無需單獨購買功能特性。 + +## 變更記錄 + +以下是此版本中的詳細變更。 + +### 改進功能 + +* [改進 macOS 桌面端應用程式圖示](https://github.com/siyuan-note/siyuan/issues/9403) +* [數學公式編輯與嵌入塊編輯使用等寬字體](https://github.com/siyuan-note/siyuan/issues/9406) +* [在唯讀模式下引用元素右鍵選單顯示反鍊和關係圖選單項目](https://github.com/siyuan-note/siyuan/issues/9409) +* [大綱條目支援 Ctrl+點擊 聚焦開啟](https://github.com/siyuan-note/siyuan/issues/9410) +* [為 `` 元素字體族新增 `--b3-font-family`](https://github.com/siyuan-note/siyuan/issues/9412) +* [PDF 大綱不再涵蓋編輯選擇文字工具了](https://github.com/siyuan-note/siyuan/issues/9415) +* [使用者未同意信任市集內容前不載入插件](https://github.com/siyuan-note/siyuan/issues/9426) +* [改進 Pandoc 可執行檔路徑設定](https://github.com/siyuan-note/siyuan/issues/9427) +* [行動端使用引用時隱藏文字工具列](https://github.com/siyuan-note/siyuan/issues/9431) +* [選擇圖片後 Ctrl+X 不再剪下方塊](https://github.com/siyuan-note/siyuan/issues/9433) +* [為 `.b3-menu__accelerator` 字體族加上 `--b3-font-family`](https://github.com/siyuan-note/siyuan/issues/9439) +* [調整工作空間資料夾名長度上限為 32 字](https://github.com/siyuan-note/siyuan/issues/9440) + +### 修復缺陷 + +* [新視窗開啟 PDF 後再次開啟跳轉不正確](https://github.com/siyuan-note/siyuan/issues/9405) +* [點選表格區塊空白處後貼上文字異常](https://github.com/siyuan-note/siyuan/issues/9411) +* [SVG 圖示在某些系統上無法顯示](https://github.com/siyuan-note/siyuan/issues/9413) +* [開啟不存在標註的 PDF 時彈出報錯提示](https://github.com/siyuan-note/siyuan/issues/9425) +* [iPad 端未顯示存取授權碼設定項目](https://github.com/siyuan-note/siyuan/issues/9432) +* [組合使用標題區塊和超級區塊時展開標題區塊內容重複載入](https://github.com/siyuan-note/siyuan/issues/9435) + +### 開發者 + +* [變更資料庫範本列自訂屬性操作](https://github.com/siyuan-note/siyuan/issues/9401) +* [點選開啟資料庫資源檔案列中的 PDF 時在右側開啟](https://github.com/siyuan-note/siyuan/issues/9402) +* [改進資料庫範本列編輯框](https://github.com/siyuan-note/siyuan/issues/9404) +* [資料庫範本列支援數位計算](https://github.com/siyuan-note/siyuan/issues/9408) +* [資料庫範本列支援數位過濾](https://github.com/siyuan-note/siyuan/issues/9414) +* [改進資料庫區塊載入動畫](https://github.com/siyuan-note/siyuan/issues/9416) +* [資料庫表格檢視支援箭頭/Esc 選擇儲存格/行](https://github.com/siyuan-note/siyuan/issues/9417) +* [改進資料庫介面細節並為文字、範本、數字、日期加入複製按鈕](https://github.com/siyuan-note/siyuan/issues/9418) +* [全域搜尋支援搜尋資料庫視圖內容](https://github.com/siyuan-note/siyuan/issues/9419) +* [改進資料庫表格視圖行選單](https://github.com/siyuan-note/siyuan/issues/9420) +* [改進資料庫表格視圖行互動](https://github.com/siyuan-note/siyuan/issues/9421) +* [點選資料庫範本列單元格支援修改範本](https://github.com/siyuan-note/siyuan/issues/9423) +* [資料庫表格檢視匯出時顯示單選內容](https://github.com/siyuan-note/siyuan/issues/9428) \ No newline at end of file diff --git a/app/changelogs/v2.10.11/v2.10.11_zh_CN.md b/app/changelogs/v2.10.11/v2.10.11_zh_CN.md new file mode 100644 index 000000000..536a7d152 --- /dev/null +++ b/app/changelogs/v2.10.11/v2.10.11_zh_CN.md @@ -0,0 +1,51 @@ +## 概述 + +该版本修复了一些缺陷,建议升级。 + +广告: 目前 `功能特性` 正处于早鸟价阶段,欢迎[了解](https://b3log.org/siyuan/pricing.html)。 + +注:`年付订阅` 包含 `功能特性`,如果你是订阅会员,则无需单独购买功能特性。 + +## 变更记录 + +以下是此版本中的详细变更。 + +### 改进功能 + +* [改进 macOS 桌面端应用程序图标](https://github.com/siyuan-note/siyuan/issues/9403) +* [数学公式编辑和嵌入块编辑使用等宽字体](https://github.com/siyuan-note/siyuan/issues/9406) +* [在只读模式下引用元素右键菜单显示反链和关系图菜单项](https://github.com/siyuan-note/siyuan/issues/9409) +* [大纲条目支持 Ctrl+点击 聚焦打开](https://github.com/siyuan-note/siyuan/issues/9410) +* [为 `` 元素字体族添加 `--b3-font-family`](https://github.com/siyuan-note/siyuan/issues/9412) +* [PDF 大纲不再覆盖编辑选择文本工具了](https://github.com/siyuan-note/siyuan/issues/9415) +* [用户未同意信任集市内容前不加载插件](https://github.com/siyuan-note/siyuan/issues/9426) +* [改进 Pandoc 可执行文件路径设置](https://github.com/siyuan-note/siyuan/issues/9427) +* [移动端使用引用时隐藏文本工具栏](https://github.com/siyuan-note/siyuan/issues/9431) +* [选择图片后 Ctrl+X 不再剪切块](https://github.com/siyuan-note/siyuan/issues/9433) +* [为 `.b3-menu__accelerator` 字体族添加 `--b3-font-family`](https://github.com/siyuan-note/siyuan/issues/9439) +* [调整工作空间文件夹名长度上限为 32 字](https://github.com/siyuan-note/siyuan/issues/9440) + +### 修复缺陷 + +* [新窗口打开 PDF 后再次打开跳转不正确](https://github.com/siyuan-note/siyuan/issues/9405) +* [点击表格块空白处后粘贴文本异常](https://github.com/siyuan-note/siyuan/issues/9411) +* [SVG 图标在某些系统上无法显示](https://github.com/siyuan-note/siyuan/issues/9413) +* [打开不存在标注的 PDF 时弹出报错提示](https://github.com/siyuan-note/siyuan/issues/9425) +* [iPad 端未显示访问授权码设置项](https://github.com/siyuan-note/siyuan/issues/9432) +* [组合使用标题块和超级块时展开标题块内容重复加载](https://github.com/siyuan-note/siyuan/issues/9435) + +### 开发者 + +* [变更数据库模板列自定义属性操作](https://github.com/siyuan-note/siyuan/issues/9401) +* [点击打开数据库资源文件列中的 PDF 时在右侧打开](https://github.com/siyuan-note/siyuan/issues/9402) +* [改进数据库模板列编辑框](https://github.com/siyuan-note/siyuan/issues/9404) +* [数据库模板列支持数字计算](https://github.com/siyuan-note/siyuan/issues/9408) +* [数据库模板列支持数字过滤](https://github.com/siyuan-note/siyuan/issues/9414) +* [改进数据库块加载动画](https://github.com/siyuan-note/siyuan/issues/9416) +* [数据库表格视图支持箭头/Esc 选择单元格/行](https://github.com/siyuan-note/siyuan/issues/9417) +* [改进数据库界面细节并为文本、模板、数字、日期加入复制按钮](https://github.com/siyuan-note/siyuan/issues/9418) +* [全局搜索支持搜索数据库视图内容](https://github.com/siyuan-note/siyuan/issues/9419) +* [改进数据库表格视图行菜单](https://github.com/siyuan-note/siyuan/issues/9420) +* [改进数据库表格视图行交互](https://github.com/siyuan-note/siyuan/issues/9421) +* [点击数据库模板列单元格支持修改模板](https://github.com/siyuan-note/siyuan/issues/9423) +* [数据库表格视图导出时显示单选内容](https://github.com/siyuan-note/siyuan/issues/9428) diff --git a/kernel/av/av.go b/kernel/av/av.go index e172c4d32..c2333f9e7 100644 --- a/kernel/av/av.go +++ b/kernel/av/av.go @@ -123,38 +123,77 @@ type Value struct { func (value *Value) String() string { switch value.Type { case KeyTypeBlock: + if nil == value.Block { + return "" + } return value.Block.Content case KeyTypeText: + if nil == value.Text { + return "" + } return value.Text.Content case KeyTypeNumber: + if nil == value.Number { + return "" + } return value.Number.FormattedContent case KeyTypeDate: + if nil == value.Date { + return "" + } return value.Date.FormattedContent case KeyTypeSelect: + if 1 > len(value.MSelect) { + return "" + } return value.MSelect[0].Content case KeyTypeMSelect: + if 1 > len(value.MSelect) { + return "" + } var ret []string for _, v := range value.MSelect { ret = append(ret, v.Content) } return strings.Join(ret, " ") case KeyTypeURL: + if nil == value.URL { + return "" + } return value.URL.Content case KeyTypeEmail: + if nil == value.Email { + return "" + } return value.Email.Content case KeyTypePhone: + if nil == value.Phone { + return "" + } return value.Phone.Content case KeyTypeMAsset: + if 1 > len(value.MAsset) { + return "" + } var ret []string for _, v := range value.MAsset { ret = append(ret, v.Content) } return strings.Join(ret, " ") case KeyTypeTemplate: + if nil == value.Template { + return "" + } return value.Template.Content case KeyTypeCreated: + if nil == value.Created { + return "" + } return value.Created.FormattedContent case KeyTypeUpdated: + if nil == value.Updated { + return "" + } return value.Updated.FormattedContent default: return "" @@ -515,7 +554,7 @@ func ParseAttributeView(avID string) (ret *AttributeView, err error) { } func SaveAttributeView(av *AttributeView) (err error) { - // 做一些数据兼容处理 + // 做一些数据兼容和订正处理 now := util.CurrentTimeMillis() for _, kv := range av.KeyValues { if KeyTypeBlock == kv.Key.Type { @@ -545,6 +584,13 @@ func SaveAttributeView(av *AttributeView) (err error) { } } + // 数据订正 - 行去重 + for _, view := range av.Views { + if nil != view.Table { + view.Table.RowIDs = gulu.Str.RemoveDuplicatedElem(view.Table.RowIDs) + } + } + data, err := gulu.JSON.MarshalIndentJSON(av, "", "\t") // TODO: single-line for production if nil != err { logging.LogErrorf("marshal attribute view [%s] failed: %s", av.ID, err) diff --git a/kernel/go.mod b/kernel/go.mod index a985356df..76039456e 100644 --- a/kernel/go.mod +++ b/kernel/go.mod @@ -47,7 +47,7 @@ require ( github.com/radovskyb/watcher v1.0.7 github.com/sashabaranov/go-openai v1.15.4 github.com/shirou/gopsutil/v3 v3.23.9 - github.com/siyuan-note/dejavu v0.0.0-20231011011318-b841d3f65033 + github.com/siyuan-note/dejavu v0.0.0-20231016100815-49abd5f81a61 github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 github.com/siyuan-note/eventbus v0.0.0-20230804030110-cf250f838c80 github.com/siyuan-note/filelock v0.0.0-20230615140405-d05a21d49524 @@ -72,10 +72,10 @@ require ( github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/advancedlogic/GoOse v0.0.0-20230923151002-b0edce1b52f8 // indirect github.com/alecthomas/chroma v0.10.0 // indirect - github.com/andybalholm/brotli v1.0.5 // indirect + github.com/andybalholm/brotli v1.0.6 // indirect github.com/andybalholm/cascadia v1.3.2 // indirect github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef // indirect - github.com/aws/aws-sdk-go v1.45.24 // indirect + github.com/aws/aws-sdk-go v1.45.25 // indirect github.com/bytedance/sonic v1.10.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect @@ -110,7 +110,7 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jolestar/go-commons-pool/v2 v2.1.2 // indirect github.com/juju/errors v1.0.0 // indirect - github.com/klauspost/compress v1.17.0 // indirect + github.com/klauspost/compress v1.17.1 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/leodido/go-urn v1.2.4 // indirect github.com/levigross/exp-html v0.0.0-20120902181939-8df60c69a8f5 // indirect @@ -128,7 +128,7 @@ require ( github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect - github.com/qiniu/go-sdk/v7 v7.17.1 // indirect + github.com/qiniu/go-sdk/v7 v7.18.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/qtls-go1-20 v0.3.4 // indirect github.com/quic-go/quic-go v0.39.0 // indirect diff --git a/kernel/go.sum b/kernel/go.sum index 689efe7f3..06ab7b323 100644 --- a/kernel/go.sum +++ b/kernel/go.sum @@ -38,8 +38,8 @@ github.com/advancedlogic/GoOse v0.0.0-20230923151002-b0edce1b52f8 h1:W8vGdmv8tBT github.com/advancedlogic/GoOse v0.0.0-20230923151002-b0edce1b52f8/go.mod h1:xsQ2audmGlEq8nrlujTIUfK+he+K09sPvpJ1lB366zU= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= -github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= -github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= +github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss= @@ -49,8 +49,8 @@ github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de h1:FxWPpzIjnTlhP github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de/go.mod h1:DCaWoUhZrYW9p1lxo/cm8EmUOOzAPSEZNGF2DK1dJgw= github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef h1:2JGTg6JapxP9/R33ZaagQtAM4EkkSYnIAlOG5EI8gkM= github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef/go.mod h1:JS7hed4L1fj0hXcyEejnW57/7LCetXggd+vwrRnYeII= -github.com/aws/aws-sdk-go v1.45.24 h1:TZx/CizkmCQn8Rtsb11iLYutEQVGK5PK9wAhwouELBo= -github.com/aws/aws-sdk-go v1.45.24/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF4= +github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= github.com/bytedance/sonic v1.10.1 h1:7a1wuFXL1cMy7a3f7/VFcEtriuXQnUBhtoVfOZiaysc= @@ -212,8 +212,8 @@ github.com/juju/errors v1.0.0/go.mod h1:B5x9thDqx0wIMH3+aLIMP9HjItInYWObRovoCFM5 github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= github.com/juju/testing v0.0.0-20191001232224-ce9dec17d28b/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.1 h1:NE3C767s2ak2bweCZo3+rdP4U/HoyVXLv/X9f2gPS5g= +github.com/klauspost/compress v1.17.1/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= @@ -294,8 +294,8 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:Om github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b h1:0LFwY6Q3gMACTjAbMZBjXAqTOzOwFaj2Ld6cjeQ7Rig= github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/qiniu/dyn v1.3.0/go.mod h1:E8oERcm8TtwJiZvkQPbcAh0RL8jO1G0VXJMW3FAWdkk= -github.com/qiniu/go-sdk/v7 v7.17.1 h1:UoQv7fBKtzAiD1qZPIvTy62Se48YLKxcCYP9nAwWMa0= -github.com/qiniu/go-sdk/v7 v7.17.1/go.mod h1:nqoYCNo53ZlGA521RvRethvxUDvXKt4gtYXOwye868w= +github.com/qiniu/go-sdk/v7 v7.18.0 h1:rw4DMSQkK6NRa6IeuX32/POv/go0tRviPTVCJSiBNlk= +github.com/qiniu/go-sdk/v7 v7.18.0/go.mod h1:nqoYCNo53ZlGA521RvRethvxUDvXKt4gtYXOwye868w= github.com/qiniu/x v1.10.5/go.mod h1:03Ni9tj+N2h2aKnAz+6N0Xfl8FwMEDRC2PAlxekASDs= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= @@ -338,8 +338,8 @@ github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFR github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA= github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= github.com/simplereach/timeutils v1.2.0/go.mod h1:VVbQDfN/FHRZa1LSqcwo4kNZ62OOyqLLGQKYB3pB0Q8= -github.com/siyuan-note/dejavu v0.0.0-20231011011318-b841d3f65033 h1:OVEYoXDlLS+hCLB1qfT64VghJ/AeK81qEd5MD5+txpM= -github.com/siyuan-note/dejavu v0.0.0-20231011011318-b841d3f65033/go.mod h1:beeS/d+Qi681e3H9iU71WzCqIH66zcF1LTxelyy/W3c= +github.com/siyuan-note/dejavu v0.0.0-20231016100815-49abd5f81a61 h1:3toT7NOT57XWyo/VjjbLr9n8S40iwjBwwwPKgKyTZu0= +github.com/siyuan-note/dejavu v0.0.0-20231016100815-49abd5f81a61/go.mod h1:SC4h2u+FX1IsLIwhrkLPh85oU5NZD/6cBRcjdEv/mmc= github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 h1:Bi7/7f29LW+Fm0cHc0J1NO1cZqyJwljSWVmfOqVZgaE= github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw= github.com/siyuan-note/eventbus v0.0.0-20230804030110-cf250f838c80 h1:XghjHKJd+SiL0DkGYFVC+UGUDFtnR4v9gkAbPeh9Eq8= diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index 038f081ef..5d31981dc 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -183,7 +183,7 @@ func RenderAttributeView(avID string) (viewable av.Viewable, attrView *av.Attrib view = attrView.Views[0] } - // 做一些数据兼容处理,保存的时候也会做 av.SaveAttributeView() + // 做一些数据兼容和订正处理,保存的时候也会做 av.SaveAttributeView() currentTimeMillis := util.CurrentTimeMillis() for _, kv := range attrView.KeyValues { switch kv.Key.Type { @@ -1234,6 +1234,12 @@ func replaceAttributeViewBlock(operation *Operation, tx *Transaction) (err error for _, v := range attrView.Views { switch v.LayoutType { case av.LayoutTypeTable: + for _, rowID := range v.Table.RowIDs { + if rowID == operation.NextID { + return + } + } + for i, rowID := range v.Table.RowIDs { if rowID == operation.PreviousID { v.Table.RowIDs[i] = operation.NextID