mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Show operation type in the file history item list https://github.com/siyuan-note/siyuan/issues/10634
This commit is contained in:
parent
b75b26fea3
commit
fc3580166c
1 changed files with 2 additions and 0 deletions
|
|
@ -335,6 +335,7 @@ type History struct {
|
||||||
type HistoryItem struct {
|
type HistoryItem struct {
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
|
Op string `json:"op"`
|
||||||
}
|
}
|
||||||
|
|
||||||
const fileHistoryPageSize = 32
|
const fileHistoryPageSize = 32
|
||||||
|
|
@ -732,6 +733,7 @@ func fromSQLHistories(sqlHistories []*sql.History) (ret []*HistoryItem) {
|
||||||
item := &HistoryItem{
|
item := &HistoryItem{
|
||||||
Title: sqlHistory.Title,
|
Title: sqlHistory.Title,
|
||||||
Path: filepath.Join(util.HistoryDir, sqlHistory.Path),
|
Path: filepath.Join(util.HistoryDir, sqlHistory.Path),
|
||||||
|
Op: sqlHistory.Op,
|
||||||
}
|
}
|
||||||
if HistoryTypeAsset == sqlHistory.Type {
|
if HistoryTypeAsset == sqlHistory.Type {
|
||||||
item.Path = filepath.ToSlash(strings.TrimPrefix(item.Path, util.WorkspaceDir))
|
item.Path = filepath.ToSlash(strings.TrimPrefix(item.Path, util.WorkspaceDir))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue