enhance(repo): unify diff stats on commit pages, misc diff tweaks (#39134)

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
tara~ ♡
2026-08-30 22:17:32 +08:00
committed by GitHub
co-authored by silverwind wxiaoguang
parent 8ef7a9e46d
commit 27570ea685
10 changed files with 42 additions and 39 deletions
+8 -1
View File
@@ -125,7 +125,7 @@
{{template "repo/commit_load_branches_and_tags" .}}
</div>
<div class="ui bottom attached segment flex-text-block tw-flex-wrap">
<div class="ui attached segment flex-text-block tw-flex-wrap">
<div class="flex-text-inline">
{{if .Author}}
{{ctx.AvatarUtils.Avatar .Author 20}}
@@ -192,6 +192,13 @@
</div>
</div>
{{if .ShowDiffSummaryInCommitHeader}}
<div class="ui attached segment flex-left-right">
<strong>{{ctx.Locale.TrN .DiffShortStat.NumFiles "repo.diff.num_files_changed_1" "repo.diff.num_files_changed_n" .DiffShortStat.NumFiles}}</strong>
{{template "repo/diff/stats" dict "Addition" .DiffShortStat.TotalAddition "Deletion" .DiffShortStat.TotalDeletion}}
</div>
{{end}}
{{if .NoteRendered}}
<div class="ui top attached header segment git-notes">
{{svg "octicon-note" 16 "tw-mr-2"}}