summaryrefslogtreecommitdiffstats
path: root/templates/repo/tag/verification_box.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/tag/verification_box.tmpl')
-rw-r--r--templates/repo/tag/verification_box.tmpl27
1 files changed, 27 insertions, 0 deletions
diff --git a/templates/repo/tag/verification_box.tmpl b/templates/repo/tag/verification_box.tmpl
new file mode 100644
index 0000000..3cf88ac
--- /dev/null
+++ b/templates/repo/tag/verification_box.tmpl
@@ -0,0 +1,27 @@
+{{$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}}
+
+ <a {{if $href}}href="{{$href}}"{{end}} class="ui label tw-ml-2 {{$class}}">
+ {{if $v.Verified}}
+ <div title="{{$v.Reason}}">
+ {{if ne $v.SigningUser.ID 0}}
+ {{svg "gitea-lock"}}
+ {{ctx.AvatarUtils.Avatar $v.SigningUser 28 "signature"}}
+ {{else}}
+ <span title="{{ctx.Locale.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog"}}</span>
+ {{ctx.AvatarUtils.AvatarByEmail $v.Verification.SigningEmail "" 28 "signature"}}
+ {{end}}
+ </div>
+ {{else}}
+ <span title="{{ctx.Locale.Tr $v.Reason}}">{{svg "gitea-unlock"}}</span>
+ {{end}}
+ </a>
+{{end}}