Merge pull request '[PORT] gitea#30396: Fix author name alignment in commits table' (#3243) from gusted/forgejo-gt-30396 into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3243
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
Earl Warren 2024-04-16 06:41:45 +00:00
commit 7d0ea92da4

View file

@ -13,17 +13,19 @@
{{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}} {{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}}
{{range .Commits}} {{range .Commits}}
<tr> <tr>
<td class="author tw-flex"> <td class="author">
{{$userName := .Author.Name}} <div class="tw-flex">
{{if .User}} {{$userName := .Author.Name}}
{{if and .User.FullName DefaultShowFullName}} {{if .User}}
{{$userName = .User.FullName}} {{if and .User.FullName DefaultShowFullName}}
{{$userName = .User.FullName}}
{{end}}
{{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}<a class="muted author-wrapper" href="{{.User.HomeLink}}">{{$userName}}</a>
{{else}}
{{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}}
<span class="author-wrapper">{{$userName}}</span>
{{end}} {{end}}
{{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}<a class="muted author-wrapper" href="{{.User.HomeLink}}">{{$userName}}</a> </div>
{{else}}
{{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}}
<span class="author-wrapper">{{$userName}}</span>
{{end}}
</td> </td>
<td class="sha"> <td class="sha">
{{$class := "ui sha label"}} {{$class := "ui sha label"}}