mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Replace ajax with fetch, improve image diff (#27267)
1. Dropzone attachment removal, pretty simple replacement 2. Image diff: The previous code fetched every image twice, once via `img[src]` and once via `$.ajax`. Now it's only fetched once and a second time only when necessary. The image diff code was partially rewritten. --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
{{if or .blobBase .blobHead}}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="image-diff" data-path-before="{{.root.BeforeRawPath}}/{{PathEscapeSegments .file.OldName}}" data-path-after="{{.root.RawPath}}/{{PathEscapeSegments .file.Name}}">
|
||||
<div class="image-diff"
|
||||
data-path-before="{{.root.BeforeRawPath}}/{{PathEscapeSegments .file.OldName}}"
|
||||
data-path-after="{{.root.RawPath}}/{{PathEscapeSegments .file.Name}}"
|
||||
data-mime-before="{{.sniffedTypeBase.GetMimeType}}"
|
||||
data-mime-after="{{.sniffedTypeHead.GetMimeType}}"
|
||||
>
|
||||
<div class="ui secondary pointing tabular top attached borderless menu new-menu">
|
||||
<div class="new-menu-inner">
|
||||
<a class="item active" data-tab="diff-side-by-side-{{.file.Index}}">{{ctx.Locale.Tr "repo.diff.image.side_by_side"}}</a>
|
||||
|
Reference in New Issue
Block a user