|
2 | 2 | * Commit |
3 | 3 | * CommitBaseLink |
4 | 4 | * 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. |
6 | 8 | */}} |
7 | 9 | {{- $commit := $.Commit -}} |
8 | 10 | {{- $commitBaseLink := $.CommitBaseLink -}} |
@@ -55,19 +57,21 @@ If you'd like to modify this template, you could test it on the devtest page |
55 | 57 | {{- ShortSha $commit.ID.String -}} |
56 | 58 | {{- end -}} |
57 | 59 | <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> |
70 | 72 |
|
71 | 73 | {{- if $commit -}} |
72 | 74 | </a> |
73 | 75 | {{- 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