mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-07-09 13:00:02 +02:00

Co-authored-by: Beowulf <beowulf@beocode.eu> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7822 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Reviewed-by: Beowulf <beowulf@beocode.eu>
21 lines
737 B
Go HTML Template
21 lines
737 B
Go HTML Template
{{$class := "ui sha label"}}
|
|
{{if .signature}}
|
|
{{$class = (print $class " isSigned")}}
|
|
{{if .verification.Verified}}
|
|
{{if eq .verification.TrustStatus "trusted"}}
|
|
{{$class = (print $class " isVerified")}}
|
|
{{else if eq .verification.TrustStatus "untrusted"}}
|
|
{{$class = (print $class " isVerifiedUntrusted")}}
|
|
{{else}}
|
|
{{$class = (print $class " isVerifiedUnmatched")}}
|
|
{{end}}
|
|
{{else if .verification.Warning}}
|
|
{{$class = (print $class " isWarning")}}
|
|
{{end}}
|
|
{{end}}
|
|
<a {{if .commitLink}}href="{{.commitLink}}"{{end}} rel="nofollow" class="{{$class}}">
|
|
<span class="shortsha">{{ShortSha .sha1}}</span>
|
|
{{- if .signature -}}
|
|
{{template "repo/shabox_badge" dict "verification" .verification}}
|
|
{{- end -}}
|
|
</a>
|