mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 23:49:23 +00:00
Hide collapse icon in diff with no lines (#21094)
Sometimes (e.g. renaming a file) nothing of the content is changed. In this case, it makes no sense to show the collapse icon in a diff.
This commit is contained in:
parent
85016af1fe
commit
be93e48ccb
|
@ -79,6 +79,7 @@
|
||||||
<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} mt-3" id="diff-{{$file.NameHash}}" data-old-filename="{{$file.OldName}}" data-new-filename="{{$file.Name}}" {{if $file.ShouldBeHidden}}data-folded="true"{{end}}>
|
<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} mt-3" id="diff-{{$file.NameHash}}" data-old-filename="{{$file.OldName}}" data-new-filename="{{$file.Name}}" {{if $file.ShouldBeHidden}}data-folded="true"{{end}}>
|
||||||
<h4 class="diff-file-header sticky-2nd-row ui top attached normal header df ac sb">
|
<h4 class="diff-file-header sticky-2nd-row ui top attached normal header df ac sb">
|
||||||
<div class="df ac">
|
<div class="df ac">
|
||||||
|
{{if or (gt $file.Addition 0) (gt $file.Deletion 0) $file.IsBin}}
|
||||||
<a role="button" class="fold-file muted mr-2">
|
<a role="button" class="fold-file muted mr-2">
|
||||||
{{if $file.ShouldBeHidden}}
|
{{if $file.ShouldBeHidden}}
|
||||||
{{svg "octicon-chevron-right" 18}}
|
{{svg "octicon-chevron-right" 18}}
|
||||||
|
@ -86,6 +87,7 @@
|
||||||
{{svg "octicon-chevron-down" 18}}
|
{{svg "octicon-chevron-down" 18}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</a>
|
</a>
|
||||||
|
{{end}}
|
||||||
<div class="bold df ac">
|
<div class="bold df ac">
|
||||||
{{if $file.IsBin}}
|
{{if $file.IsBin}}
|
||||||
<span class="ml-1 mr-3">
|
<span class="ml-1 mr-3">
|
||||||
|
|
Loading…
Reference in a new issue