mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 08:48:49 +01:00
🎨 数据快照对比加入时间标识 https://github.com/siyuan-note/siyuan/issues/6899
This commit is contained in:
parent
6fa661982d
commit
42c09e2fad
6 changed files with 70 additions and 8 deletions
|
|
@ -128,10 +128,12 @@ func OpenRepoSnapshotDoc(fileID string) (id, rootID, content string, isLargeDoc
|
|||
}
|
||||
|
||||
type LeftRightDiff struct {
|
||||
AddsLeft []*DiffFile `json:"addsLeft"`
|
||||
UpdatesLeft []*DiffFile `json:"updatesLeft"`
|
||||
UpdatesRight []*DiffFile `json:"updatesRight"`
|
||||
RemovesRight []*DiffFile `json:"removesRight"`
|
||||
LeftIndex *entity.Index `json:"leftIndex"`
|
||||
RightIndex *entity.Index `json:"rightIndex"`
|
||||
AddsLeft []*DiffFile `json:"addsLeft"`
|
||||
UpdatesLeft []*DiffFile `json:"updatesLeft"`
|
||||
UpdatesRight []*DiffFile `json:"updatesRight"`
|
||||
RemovesRight []*DiffFile `json:"removesRight"`
|
||||
}
|
||||
|
||||
type DiffFile struct {
|
||||
|
|
@ -155,7 +157,13 @@ func DiffRepoSnapshots(left, right string) (ret *LeftRightDiff, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
ret = &LeftRightDiff{}
|
||||
diff.LeftIndex.Files = nil
|
||||
diff.RightIndex.Files = nil
|
||||
|
||||
ret = &LeftRightDiff{
|
||||
LeftIndex: diff.LeftIndex,
|
||||
RightIndex: diff.RightIndex,
|
||||
}
|
||||
luteEngine := NewLute()
|
||||
for _, addLeft := range diff.AddsLeft {
|
||||
title, err := parseTitleInSnapshot(addLeft.ID, repo, luteEngine)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue