mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-10-22 00:57:45 +00:00
d58143e4e1
Move the signed tag verification line above the release notes, don't disable the bottom margin, and make sure the verification line's box is properly rounded like other boxes. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
81 lines
3.1 KiB
Go HTML Template
81 lines
3.1 KiB
Go HTML Template
{{$v := call .ctxData.VerifyTag .release}}
|
|
{{if call .ctxData.HasSignature $v}}
|
|
{{$class := "isSigned"}}
|
|
{{$href := ""}}
|
|
{{if $v.Verified}}
|
|
{{$href = $v.SigningUser.HomeLink}}
|
|
{{$class = (print $class " isVerified")}}
|
|
{{else}}
|
|
{{$class = (print $class " isWarning")}}
|
|
{{end}}
|
|
|
|
<div class="ui attached message tw-text-left tw-flex tw-content-center tw-justify-between tag-signature-row tw-flex-wrap {{$class}}">
|
|
<div class="tw-flex tw-content-center">
|
|
{{if $v.Verified}}
|
|
{{if ne $v.SigningUser.ID 0}}
|
|
{{svg "gitea-lock" 16 "tw-mr-2"}}
|
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.signed_by"}}</span>
|
|
{{ctx.AvatarUtils.Avatar $v.SigningUser 28 "tw-mr-2"}}
|
|
<a href="{{$v.SigningUser.HomeLink}}"><strong>{{$v.SigningUser.GetDisplayName}}</strong></a>
|
|
{{else}}
|
|
<span title="{{ctx.Locale.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog" 16 "tw-mr-2"}}</span>
|
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.signed_by"}}:</span>
|
|
{{ctx.AvatarUtils.AvatarByEmail $v.SigningEmail "" 28 "tw-mr-2"}}
|
|
<strong>{{$v.SigningUser.GetDisplayName}}</strong>
|
|
{{end}}
|
|
{{else}}
|
|
{{svg "gitea-unlock" 16 "tw-mr-2"}}
|
|
<span class="ui text">{{ctx.Locale.Tr $v.Reason}}</span>
|
|
{{end}}
|
|
</div>
|
|
|
|
<div class="tw-flex tw-content-center">
|
|
{{if $v.Verified}}
|
|
{{if ne $v.SigningUser.ID 0}}
|
|
{{svg "octicon-verified" 16 "tw-mr-2"}}
|
|
{{if $v.SigningSSHKey}}
|
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
|
|
{{$v.SigningSSHKey.Fingerprint}}
|
|
{{else}}
|
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
|
{{$v.SigningKey.PaddedKeyID}}
|
|
{{end}}
|
|
{{else}}
|
|
{{svg "octicon-unverified" 16 "tw-mr-2"}}
|
|
{{if $v.SigningSSHKey}}
|
|
<span class="ui text tw-mr-2" data-tooltip-content="{{ctx.Locale.Tr "gpg.default_key"}}">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
|
|
{{$v.SigningSSHKey.Fingerprint}}
|
|
{{else}}
|
|
<span class="ui text tw-mr-2" data-tooltip-content="{{ctx.Locale.Tr "gpg.default_key"}}">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
|
{{$v.SigningKey.PaddedKeyID}}
|
|
{{end}}
|
|
{{end}}
|
|
{{else if $v.Warning}}
|
|
{{svg "octicon-unverified" 16 "tw-mr-2"}}
|
|
{{if $v.SigningSSHKey}}
|
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
|
|
{{$v.SigningSSHKey.Fingerprint}}
|
|
{{else}}
|
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
|
{{$v.SigningKey.PaddedKeyID}}
|
|
{{end}}
|
|
{{else}}
|
|
{{if $v.SigningKey}}
|
|
{{if ne $v.SigningKey.KeyID ""}}
|
|
{{svg "octicon-verified" 16 "tw-mr-2"}}
|
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
|
{{$v.SigningKey.PaddedKeyID}}
|
|
{{end}}
|
|
{{end}}
|
|
{{if $v.SigningSSHKey}}
|
|
{{if ne $v.SigningSSHKey.Fingerprint ""}}
|
|
{{svg "octicon-verified" 16 "tw-mr-2"}}
|
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
|
|
{{$v.SigningSSHKey.Fingerprint}}
|
|
{{end}}
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
{{end}}
|