use ctx.RootData.IsSigned

This commit is contained in:
silverwind 2025-12-13 15:09:09 +01:00
parent 108919d7a1
commit fd9a7a11bc
No known key found for this signature in database
GPG Key ID: 2E62B41C93869443
4 changed files with 2 additions and 6 deletions

View File

@ -4,7 +4,6 @@
* Author: The author, currently only the commit page passes this
* AvatarSize: Avatar size in pixels
* AuthorBold: Whether to render the author as bold text
* IsSigned: Whether the user is currently signed in
*/}}
<div class="flex-text-inline{{if .AuthorBold}} tw-font-semibold{{end}}">
{{if .User}}
@ -28,7 +27,7 @@
{{$username = .Commit.Author.Name}}
{{end}}
{{ctx.AvatarUtils.AvatarByEmail .Author.Email $username .AvatarSize}}
<span{{if .IsSigned}} title="{{.Author.Email}}"{{end}}>
<span{{if ctx.RootData.IsSigned}} title="{{.Author.Email}}"{{end}}>
{{if .Author.HomeLink}}
<a class="muted author-wrapper" href="{{.Author.HomeLink}}">
{{$username}}
@ -45,7 +44,7 @@
{{$username = .Author.Name}}
{{end}}
{{ctx.AvatarUtils.AvatarByEmail .Commit.Author.Email $username .AvatarSize}}
<span{{if .IsSigned}} title="{{.Commit.Author.Email}}"{{end}}>
<span{{if ctx.RootData.IsSigned}} title="{{.Commit.Author.Email}}"{{end}}>
{{if .Commit.Author.Name}}
{{.Commit.Author.Name}}
{{else}}

View File

@ -133,7 +133,6 @@
"Author" .Author
"AvatarSize" 20
"AuthorBold" true
"IsSigned" $.IsSigned
)}}
<span class="text grey">{{DateUtils.TimeSince .Commit.Author.When}}</span>

View File

@ -19,7 +19,6 @@
"Commit" .
"User" .User
"AvatarSize" 28
"IsSigned" $.IsSigned
)}}
</div>
</td>

View File

@ -7,7 +7,6 @@
"Commit" .LatestCommit
"AvatarSize" 24
"AuthorBold" true
"IsSigned" $.IsSigned
)}}
{{template "repo/commit_sign_badge" dict "Commit" .LatestCommit "CommitBaseLink" (print .RepoLink "/commit") "CommitSignVerification" .LatestCommitVerification}}