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

View File

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

View File

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

View File

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