From fc3580166c8f5684f5018b78bfce040e551df885 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 18 Mar 2024 10:17:10 +0800 Subject: [PATCH] :art: Show operation type in the file history item list https://github.com/siyuan-note/siyuan/issues/10634 --- kernel/model/history.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/model/history.go b/kernel/model/history.go index 1be14159a..866999e7e 100644 --- a/kernel/model/history.go +++ b/kernel/model/history.go @@ -335,6 +335,7 @@ type History struct { type HistoryItem struct { Title string `json:"title"` Path string `json:"path"` + Op string `json:"op"` } const fileHistoryPageSize = 32 @@ -732,6 +733,7 @@ func fromSQLHistories(sqlHistories []*sql.History) (ret []*HistoryItem) { item := &HistoryItem{ Title: sqlHistory.Title, Path: filepath.Join(util.HistoryDir, sqlHistory.Path), + Op: sqlHistory.Op, } if HistoryTypeAsset == sqlHistory.Type { item.Path = filepath.ToSlash(strings.TrimPrefix(item.Path, util.WorkspaceDir))