Browse Source

Improve diff stats bar

pull/30669/head
silverwind 1 week ago
parent
commit
81777217b3
No account linked to committer's email address
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      templates/repo/pulls/tab_menu.tmpl
  2. 1
    1
      web_src/css/repo.css

+ 1
- 1
templates/repo/pulls/tab_menu.tmpl View File

@@ -16,7 +16,7 @@
<span class="ui small label">{{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}}</span>
</a>
{{if or .Diff.TotalAddition .Diff.TotalDeletion}}
<span class="item tw-ml-auto tw-pr-0 tw-font-bold tw-flex tw-items-center tw-gap-2">
<span class="tw-ml-auto tw-pl-3 tw-whitespace-nowrap tw-pr-0 tw-font-bold tw-flex tw-items-center tw-gap-2">
<span><span class="text green">{{if .Diff.TotalAddition}}+{{.Diff.TotalAddition}}{{end}}</span> <span class="text red">{{if .Diff.TotalDeletion}}-{{.Diff.TotalDeletion}}{{end}}</span></span>
<span class="diff-stats-bar">
<div class="diff-stats-add-bar" style="width: {{Eval 100 "*" .Diff.TotalAddition "/" "(" .Diff.TotalAddition "+" .Diff.TotalDeletion "+" 0.0 ")"}}%"></div>

+ 1
- 1
web_src/css/repo.css View File

@@ -2520,7 +2520,7 @@ tbody.commit-list {
display: inline-block;
background-color: var(--color-red);
height: 12px;
width: 40px;
width: 44px;
}

.diff-stats-bar .diff-stats-add-bar {

Loading…
Cancel
Save