]> source.dussan.org Git - gitea.git/commit
Add Image Diff for SVG files (#14867)
authorKN4CK3R <KN4CK3R@users.noreply.github.com>
Sat, 5 Jun 2021 12:32:19 +0000 (14:32 +0200)
committerGitHub <noreply@github.com>
Sat, 5 Jun 2021 12:32:19 +0000 (15:32 +0300)
commit8e262104c25d1c2578f683109e1b373aade3a17c
tree04b8fda8516498b74350bb695f230e0e1089a48d
parent7979c3654eb91adce4fd9717d9ff891496a56ff3
Add Image Diff for SVG files (#14867)

* Added type sniffer.

* Switched content detection from base to typesniffer.

* Added GuessContentType to Blob.

* Moved image info logic to client.
Added support for SVG images in diff.

* Restore old blocked svg behaviour.

* Added missing image formats.

* Execute image diff only when container is visible.

* add margin to spinner

* improve BIN tag on image diffs

* Default to render view.

* Show image diff on incomplete diff.

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
19 files changed:
modules/avatar/avatar.go
modules/base/tool.go
modules/base/tool_test.go
modules/git/blob.go
modules/git/commit.go
modules/indexer/code/bleve.go
modules/indexer/code/elastic_search.go
modules/typesniffer/typesniffer.go [new file with mode: 0644]
modules/typesniffer/typesniffer_test.go [new file with mode: 0644]
routers/repo/compare.go
routers/repo/download.go
routers/repo/editor.go
routers/repo/lfs.go
routers/repo/setting.go
routers/repo/view.go
routers/user/setting/profile.go
templates/repo/diff/box.tmpl
templates/repo/diff/image_diff.tmpl
web_src/js/features/imagediff.js