mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 13:28:48 +01:00
🎨 Add more file formats supporting snapshots comparing https://github.com/siyuan-note/siyuan/issues/8438
This commit is contained in:
parent
7fe8568951
commit
b5087a5eb1
1 changed files with 5 additions and 0 deletions
|
|
@ -165,6 +165,7 @@ type LeftRightDiff struct {
|
|||
type DiffFile struct {
|
||||
FileID string `json:"fileID"`
|
||||
Title string `json:"title"`
|
||||
Path string `json:"path"`
|
||||
Updated int64 `json:"updated"`
|
||||
}
|
||||
|
||||
|
|
@ -209,6 +210,7 @@ func DiffRepoSnapshots(left, right string) (ret *LeftRightDiff, err error) {
|
|||
ret.AddsLeft = append(ret.AddsLeft, &DiffFile{
|
||||
FileID: removeRight.ID,
|
||||
Title: title,
|
||||
Path: removeRight.Path,
|
||||
Updated: removeRight.Updated,
|
||||
})
|
||||
}
|
||||
|
|
@ -225,6 +227,7 @@ func DiffRepoSnapshots(left, right string) (ret *LeftRightDiff, err error) {
|
|||
ret.RemovesRight = append(ret.RemovesRight, &DiffFile{
|
||||
FileID: addLeft.ID,
|
||||
Title: title,
|
||||
Path: addLeft.Path,
|
||||
Updated: addLeft.Updated,
|
||||
})
|
||||
}
|
||||
|
|
@ -241,6 +244,7 @@ func DiffRepoSnapshots(left, right string) (ret *LeftRightDiff, err error) {
|
|||
ret.UpdatesLeft = append(ret.UpdatesLeft, &DiffFile{
|
||||
FileID: updateLeft.ID,
|
||||
Title: title,
|
||||
Path: updateLeft.Path,
|
||||
Updated: updateLeft.Updated,
|
||||
})
|
||||
}
|
||||
|
|
@ -257,6 +261,7 @@ func DiffRepoSnapshots(left, right string) (ret *LeftRightDiff, err error) {
|
|||
ret.UpdatesRight = append(ret.UpdatesRight, &DiffFile{
|
||||
FileID: updateRight.ID,
|
||||
Title: title,
|
||||
Path: updateRight.Path,
|
||||
Updated: updateRight.Updated,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue