diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 4e6879650d..afd471368f 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -79,7 +79,7 @@ {{$isExpandable := or (gt $file.Addition 0) (gt $file.Deletion 0) $file.IsBin}}

-
+ - {{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}{{if .IsLFSFile}} ({{$.locale.Tr "repo.stored_lfs"}}){{end}} + {{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}{{if .IsLFSFile}} ({{$.locale.Tr "repo.stored_lfs"}}){{end}} {{if $file.IsGenerated}} {{$.locale.Tr "repo.diff.generated"}} {{end}} diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index 9eaa8644f1..3b93a76a16 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -1670,8 +1670,14 @@ align-items: center; .file { - flex: 1; - word-break: break-all; + min-width: 0; + .file-link { + max-width: fit-content; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + } } .button { @@ -3283,6 +3289,15 @@ td.blob-excerpt { position: static; } } + + .diff-file-header-actions { + flex-shrink: 0; + } + + .diff-file-name { + flex: auto; + min-width: 100px; + } } .diff-file-body {