Skip to content

Commit c0a807f

Browse files
committed
fix
1 parent adff3d6 commit c0a807f

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

templates/repo/commit_sign_badge.tmpl

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
* Commit
33
* CommitBaseLink
44
* CommitSignVerification
5-
If you'd like to modify this template, you could test it on the devtest page
5+
If you'd like to modify this template, you could test it on the devtest page.
6+
ATTENTION: this template could be re-rendered many times (on the graph and commit list page),
7+
so this template should be kept as small as possbile, DO NOT put large components like modal/dialog into it.
68
*/}}
79
{{- $commit := $.Commit -}}
810
{{- $commitBaseLink := $.CommitBaseLink -}}
@@ -55,19 +57,21 @@ If you'd like to modify this template, you could test it on the devtest page
5557
{{- ShortSha $commit.ID.String -}}
5658
{{- end -}}
5759
<span class="ui label commit-sign-badge {{$extraClass}}">
58-
{{- if $verified -}}
59-
{{- if and $signingUser $signingUser.ID -}}
60-
<span data-tooltip-content="{{$msgReason}}">{{svg "gitea-lock"}}</span>
61-
<span data-tooltip-content="{{$msgSigningKey}}">{{ctx.AvatarUtils.Avatar $signingUser 16}}</span>
62-
{{- else -}}
63-
<span data-tooltip-content="{{$msgReason}}">{{svg "gitea-lock-cog"}}</span>
64-
<span data-tooltip-content="{{$msgSigningKey}}">{{ctx.AvatarUtils.AvatarByEmail $signingEmail "" 16}}</span>
65-
{{- end -}}
66-
{{- else -}}
67-
<span data-tooltip-content="{{$msgReason}}">{{svg "gitea-unlock"}}</span>
68-
{{- end -}}
69-
</span>
60+
{{- if $verified -}}
61+
{{- if and $signingUser $signingUser.ID -}}
62+
<span data-tooltip-content="{{$msgReason}}">{{svg "gitea-lock"}}</span>
63+
<span data-tooltip-content="{{$msgSigningKey}}">{{ctx.AvatarUtils.Avatar $signingUser 16}}</span>
64+
{{- else -}}
65+
<span data-tooltip-content="{{$msgReason}}">{{svg "gitea-lock-cog"}}</span>
66+
<span data-tooltip-content="{{$msgSigningKey}}">{{ctx.AvatarUtils.AvatarByEmail $signingEmail "" 16}}</span>
67+
{{- end -}}
68+
{{- else -}}
69+
<span data-tooltip-content="{{$msgReason}}">{{svg "gitea-unlock"}}</span>
70+
{{- end -}}
71+
</span>
7072

7173
{{- if $commit -}}
7274
</a>
7375
{{- end -}}
76+
77+
{{- /* This template should be kept as small as possbile, DO NOT put large components like modal/dialog into it. */ -}}

0 commit comments

Comments
 (0)