mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Add more file formats supporting snapshots comparing https://github.com/siyuan-note/siyuan/issues/8438
This commit is contained in:
parent
b5087a5eb1
commit
ad14030eb4
1 changed files with 5 additions and 0 deletions
|
|
@ -166,6 +166,7 @@ type DiffFile struct {
|
||||||
FileID string `json:"fileID"`
|
FileID string `json:"fileID"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
|
HSize string `json:"hSize"`
|
||||||
Updated int64 `json:"updated"`
|
Updated int64 `json:"updated"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -211,6 +212,7 @@ func DiffRepoSnapshots(left, right string) (ret *LeftRightDiff, err error) {
|
||||||
FileID: removeRight.ID,
|
FileID: removeRight.ID,
|
||||||
Title: title,
|
Title: title,
|
||||||
Path: removeRight.Path,
|
Path: removeRight.Path,
|
||||||
|
HSize: humanize.Bytes(uint64(removeRight.Size)),
|
||||||
Updated: removeRight.Updated,
|
Updated: removeRight.Updated,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -228,6 +230,7 @@ func DiffRepoSnapshots(left, right string) (ret *LeftRightDiff, err error) {
|
||||||
FileID: addLeft.ID,
|
FileID: addLeft.ID,
|
||||||
Title: title,
|
Title: title,
|
||||||
Path: addLeft.Path,
|
Path: addLeft.Path,
|
||||||
|
HSize: humanize.Bytes(uint64(addLeft.Size)),
|
||||||
Updated: addLeft.Updated,
|
Updated: addLeft.Updated,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -245,6 +248,7 @@ func DiffRepoSnapshots(left, right string) (ret *LeftRightDiff, err error) {
|
||||||
FileID: updateLeft.ID,
|
FileID: updateLeft.ID,
|
||||||
Title: title,
|
Title: title,
|
||||||
Path: updateLeft.Path,
|
Path: updateLeft.Path,
|
||||||
|
HSize: humanize.Bytes(uint64(updateLeft.Size)),
|
||||||
Updated: updateLeft.Updated,
|
Updated: updateLeft.Updated,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -262,6 +266,7 @@ func DiffRepoSnapshots(left, right string) (ret *LeftRightDiff, err error) {
|
||||||
FileID: updateRight.ID,
|
FileID: updateRight.ID,
|
||||||
Title: title,
|
Title: title,
|
||||||
Path: updateRight.Path,
|
Path: updateRight.Path,
|
||||||
|
HSize: humanize.Bytes(uint64(updateRight.Size)),
|
||||||
Updated: updateRight.Updated,
|
Updated: updateRight.Updated,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue