loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Hide diff stats on empty PRs (#30629)

When a PR is empty, e.g. has neither additions nor deletions, we don't
need to show this:

<img width="125" alt="Screenshot 2024-04-21 at 23 25 38"
src="https://github.com/go-gitea/gitea/assets/115237/0b987eb5-66f5-4b9b-b5aa-7e9e267e9b52">

(cherry picked from commit 0386a42f70d1026c50697b12378f5026a63182b9)

authored by

silverwind and committed by
Earl Warren
02316e1e 2b45aa42

+2
+2
templates/repo/pulls/tab_menu.tmpl
··· 15 15 {{ctx.Locale.Tr "repo.pulls.tab_files"}} 16 16 <span class="ui small label">{{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}}</span> 17 17 </a> 18 + {{if or .Diff.TotalAddition .Diff.TotalDeletion}} 18 19 <span class="item tw-ml-auto tw-pr-0 tw-font-bold tw-flex tw-items-center tw-gap-2"> 19 20 <span><span class="text green">{{if .Diff.TotalAddition}}+{{.Diff.TotalAddition}}{{end}}</span> <span class="text red">{{if .Diff.TotalDeletion}}-{{.Diff.TotalDeletion}}{{end}}</span></span> 20 21 <span class="diff-stats-bar"> 21 22 <div class="diff-stats-add-bar" style="width: {{Eval 100 "*" .Diff.TotalAddition "/" "(" .Diff.TotalAddition "+" .Diff.TotalDeletion "+" 0.0 ")"}}%"></div> 22 23 </span> 23 24 </span> 25 + {{end}} 24 26 </div> 25 27 <div class="ui tabs divider"></div> 26 28 </div>