diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/diff/box.tmpl | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 4f8f726097..8c4b972bbc 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -49,11 +49,15 @@ {{$isImage := or (call $.IsBlobAnImage $blobBase) (call $.IsBlobAnImage $blobHead)}} {{$isCsv := (call $.IsCsvFile $file)}} {{$showFileViewToggle := or $isImage (and (not $file.IsIncomplete) $isCsv)}} - <div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} mt-3" id="diff-{{.Index}}"> + <div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} mt-3" id="diff-{{.Index}}" {{if $file.IsGenerated}}data-folded="true"{{end}}> <h4 class="diff-file-header sticky-2nd-row ui top attached normal header df ac sb"> - <div class="df ac"> - <a role="button" class="fold-file muted mr-2"> - {{svg "octicon-chevron-down" 18}} + <div class="fold-file df ac"> + <a role="button" class="chevron muted mr-2"> + {{if $file.IsGenerated}} + {{svg "octicon-chevron-right" 18}} + {{else}} + {{svg "octicon-chevron-down" 18}} + {{end}} </a> <div class="bold df ac"> {{if $file.IsBin}} @@ -65,6 +69,12 @@ {{end}} </div> <span class="file mono">{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}{{if .IsLFSFile}} ({{$.i18n.Tr "repo.stored_lfs"}}){{end}}</span> + {{if $file.IsGenerated}} + <span class="ui label ml-3">{{$.i18n.Tr "repo.diff.generated"}}</span> + {{end}} + {{if $file.IsVendored}} + <span class="ui label ml-3">{{$.i18n.Tr "repo.diff.vendored"}}</span> + {{end}} </div> <div class="diff-file-header-actions df ac"> {{if $showFileViewToggle}} |