mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 20:02:09 +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:
parent
dc04044716
commit
73b63d9311
9 changed files with 96 additions and 82 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue