|
2 | 2 | <div role="main" aria-label="{{.Title}}" class="page-content repository diff">
|
3 | 3 | {{template "repo/header" .}}
|
4 | 4 | <div class="ui container fluid padded">
|
5 |
| - {{$class := ""}} |
6 |
| - {{if .Commit.Signature}} |
7 |
| - {{$class = (print $class " isSigned")}} |
8 |
| - {{if .Verification.Verified}} |
9 |
| - {{if eq .Verification.TrustStatus "trusted"}} |
10 |
| - {{$class = (print $class " isVerified")}} |
11 |
| - {{else if eq .Verification.TrustStatus "untrusted"}} |
12 |
| - {{$class = (print $class " isVerifiedUntrusted")}} |
13 |
| - {{else}} |
14 |
| - {{$class = (print $class " isVerifiedUnmatched")}} |
15 |
| - {{end}} |
16 |
| - {{else if .Verification.Warning}} |
17 |
| - {{$class = (print $class " isWarning")}} |
18 |
| - {{end}} |
19 |
| - {{end}} |
20 |
| - <div class="ui top attached header clearing segment tw-relative commit-header {{$class}}"> |
| 5 | + <div class="ui top attached header clearing segment tw-relative commit-header"> |
21 | 6 | <div class="tw-flex tw-mb-4 tw-flex-wrap">
|
22 | 7 | <h3 class="tw-mb-0 tw-flex-1"><span class="commit-summary" title="{{.Commit.Summary}}">{{RenderCommitMessage $.Context .Commit.Message ($.Repository.ComposeMetas ctx)}}</span>{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses}}</h3>
|
23 | 8 | {{if not $.PageIsWiki}}
|
|
139 | 124 | {{end}}
|
140 | 125 | {{template "repo/commit_load_branches_and_tags" .}}
|
141 | 126 | </div>
|
142 |
| - <div class="ui attached segment tw-flex tw-items-center tw-justify-between tw-py-1 commit-header-row tw-flex-wrap {{$class}}"> |
| 127 | + <div class="ui attached segment tw-flex tw-items-center tw-justify-between tw-py-1 commit-header-row tw-flex-wrap"> |
143 | 128 | <div class="tw-flex tw-items-center author">
|
144 | 129 | {{if .Author}}
|
145 | 130 | {{ctx.AvatarUtils.Avatar .Author 28 "tw-mr-2"}}
|
|
163 | 148 | <strong>{{.Commit.Committer.Name}}</strong>
|
164 | 149 | {{end}}
|
165 | 150 | {{end}}
|
| 151 | + {{template "shared/verifyicon" .}} |
166 | 152 | </div>
|
167 | 153 | <div class="ui horizontal list tw-flex tw-items-center">
|
168 | 154 | {{if .Parents}}
|
|
183 | 169 | </div>
|
184 | 170 | </div>
|
185 | 171 | </div>
|
186 |
| - {{if .Commit.Signature}} |
187 |
| - <div class="ui bottom attached message tw-text-left tw-flex tw-items-center tw-justify-between commit-header-row tw-flex-wrap tw-mb-0 {{$class}}"> |
188 |
| - <div class="tw-flex tw-items-center"> |
189 |
| - {{if .Verification.Verified}} |
190 |
| - {{if ne .Verification.SigningUser.ID 0}} |
191 |
| - {{svg "gitea-lock" 16 "tw-mr-2"}} |
192 |
| - {{if eq .Verification.TrustStatus "trusted"}} |
193 |
| - <span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.signed_by"}}:</span> |
194 |
| - {{else if eq .Verification.TrustStatus "untrusted"}} |
195 |
| - <span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user"}}:</span> |
196 |
| - {{else}} |
197 |
| - <span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}:</span> |
198 |
| - {{end}} |
199 |
| - {{ctx.AvatarUtils.Avatar .Verification.SigningUser 28 "tw-mr-2"}} |
200 |
| - <a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Verification.SigningUser.GetDisplayName}}</strong></a> |
201 |
| - {{else}} |
202 |
| - <span title="{{ctx.Locale.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog" 16 "tw-mr-2"}}</span> |
203 |
| - <span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.signed_by"}}:</span> |
204 |
| - {{ctx.AvatarUtils.AvatarByEmail .Verification.SigningEmail "" 28 "tw-mr-2"}} |
205 |
| - <strong>{{.Verification.SigningUser.GetDisplayName}}</strong> |
206 |
| - {{end}} |
207 |
| - {{else}} |
208 |
| - {{svg "gitea-unlock" 16 "tw-mr-2"}} |
209 |
| - <span class="ui text">{{ctx.Locale.Tr .Verification.Reason}}</span> |
210 |
| - {{end}} |
211 |
| - </div> |
212 |
| - <div class="tw-flex tw-items-center"> |
213 |
| - {{if .Verification.Verified}} |
214 |
| - {{if ne .Verification.SigningUser.ID 0}} |
215 |
| - {{svg "octicon-verified" 16 "tw-mr-2"}} |
216 |
| - {{if .Verification.SigningSSHKey}} |
217 |
| - <span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span> |
218 |
| - {{.Verification.SigningSSHKey.Fingerprint}} |
219 |
| - {{else}} |
220 |
| - <span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span> |
221 |
| - {{.Verification.SigningKey.PaddedKeyID}} |
222 |
| - {{end}} |
223 |
| - {{else}} |
224 |
| - {{svg "octicon-unverified" 16 "tw-mr-2"}} |
225 |
| - {{if .Verification.SigningSSHKey}} |
226 |
| - <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> |
227 |
| - {{.Verification.SigningSSHKey.Fingerprint}} |
228 |
| - {{else}} |
229 |
| - <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> |
230 |
| - {{.Verification.SigningKey.PaddedKeyID}} |
231 |
| - {{end}} |
232 |
| - {{end}} |
233 |
| - {{else if .Verification.Warning}} |
234 |
| - {{svg "octicon-unverified" 16 "tw-mr-2"}} |
235 |
| - {{if .Verification.SigningSSHKey}} |
236 |
| - <span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span> |
237 |
| - {{.Verification.SigningSSHKey.Fingerprint}} |
238 |
| - {{else}} |
239 |
| - <span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span> |
240 |
| - {{.Verification.SigningKey.PaddedKeyID}} |
241 |
| - {{end}} |
242 |
| - {{else}} |
243 |
| - {{if .Verification.SigningKey}} |
244 |
| - {{if ne .Verification.SigningKey.KeyID ""}} |
245 |
| - {{svg "octicon-verified" 16 "tw-mr-2"}} |
246 |
| - <span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span> |
247 |
| - {{.Verification.SigningKey.PaddedKeyID}} |
248 |
| - {{end}} |
249 |
| - {{end}} |
250 |
| - {{if .Verification.SigningSSHKey}} |
251 |
| - {{if ne .Verification.SigningSSHKey.Fingerprint ""}} |
252 |
| - {{svg "octicon-verified" 16 "tw-mr-2"}} |
253 |
| - <span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span> |
254 |
| - {{.Verification.SigningSSHKey.Fingerprint}} |
255 |
| - {{end}} |
256 |
| - {{end}} |
257 |
| - {{end}} |
258 |
| - </div> |
259 |
| - </div> |
260 |
| - {{end}} |
261 | 172 | {{if .NoteRendered}}
|
262 | 173 | <div class="ui top attached header segment git-notes">
|
263 | 174 | {{svg "octicon-note" 16 "tw-mr-2"}}
|
|
0 commit comments