Skip to content

Commit b8af955

Browse files
committed
Change how identities are shown in commit page
The username is now always shown next to full names. The commit information should use the full name associated with the commit and the signature information should use the full name associated with the profile, provided that it exists. This should remove any confusion if the author decides to use different names under the same account at a later point in time.
1 parent 02119ec commit b8af955

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

templates/repo/commit_page.tmpl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@
147147
<div class="gt-df gt-ac author">
148148
{{if .Author}}
149149
{{avatar $.Context .Author 28 "gt-mr-3"}}
150-
{{if .Author.FullName}}
151-
<a href="{{.Author.HomeLink}}"><strong>{{.Author.FullName}}</strong></a>
150+
{{if .Author.Name}}
151+
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}} ({{.Author.Name}})</strong></a>
152152
{{else}}
153153
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a>
154154
{{end}}
@@ -201,7 +201,11 @@
201201
<span class="ui text gt-mr-3">{{.locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}:</span>
202202
{{end}}
203203
{{avatar $.Context .Verification.SigningUser 28 "gt-mr-3"}}
204-
<a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Verification.SigningUser.GetDisplayName}}</strong></a>
204+
{{if .Verification.SigningUser.Fullname}}
205+
<a href="{{.Verification.SigningUser.HomeLink}}"><strong> {{.Verification.SigningUser.FullName}} ({{.Verification.SigningUser.GetDisplayName}})</strong></a>
206+
{{else}}
207+
<a href="{{.Verification.SigningUser.HomeLink}}"><strong> ({{.Verification.SigningUser.GetDisplayName}})</strong></a>
208+
{{end}}
205209
{{else}}
206210
<span title="{{.locale.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog" 16 "gt-mr-3"}}</span>
207211
<span class="ui text gt-mr-3">{{.locale.Tr "repo.commits.signed_by"}}:</span>

0 commit comments

Comments
 (0)