|
2 | 2 | <div class="repository diff">
|
3 | 3 | {{template "repo/header" .}}
|
4 | 4 | <div class="ui container {{if .IsSplitStyle}}fluid padded{{end}}">
|
5 |
| - <div class="ui top attached info clearing segment {{if .Commit.Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}"> |
| 5 | + {{$class := ""}} |
| 6 | + {{if .Commit.Signature}} |
| 7 | + {{$class = (printf "%s%s" $class " isSigned")}} |
| 8 | + {{if .Verification.Verified}} |
| 9 | + {{if eq .Verification.TrustStatus "trusted"}} |
| 10 | + {{$class = (printf "%s%s" $class " isVerified")}} |
| 11 | + {{else if eq .Verification.TrustStatus "untrusted"}} |
| 12 | + {{$class = (printf "%s%s" $class " isVerifiedUntrusted")}} |
| 13 | + {{else}} |
| 14 | + {{$class = (printf "%s%s" $class " isVerifiedUnmatched")}} |
| 15 | + {{end}} |
| 16 | + {{else if .Verification.Warning}} |
| 17 | + {{$class = (printf "%s%s" $class " isWarning")}} |
| 18 | + {{end}} |
| 19 | + {{end}} |
| 20 | + <div class="ui top attached info clearing segment {{$class}}"> |
6 | 21 | <a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}">
|
7 | 22 | {{.i18n.Tr "repo.diff.browse_source"}}
|
8 | 23 | </a>
|
|
12 | 27 | {{end}}
|
13 | 28 | <span class="text grey"><i class="octicon octicon-git-branch"></i>{{.BranchName}}</span>
|
14 | 29 | </div>
|
15 |
| - <div class="ui attached info segment {{if .Commit.Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}"> |
| 30 | + <div class="ui attached info segment {{$class}}"> |
16 | 31 | <div class="ui stackable grid">
|
17 | 32 | <div class="nine wide column">
|
18 | 33 | {{if .Author}}
|
19 | 34 | <img class="ui avatar image" src="{{.Author.RelAvatarLink}}" />
|
20 | 35 | {{if .Author.FullName}}
|
21 |
| - <a href="{{.Author.HomeLink}}"><strong>{{.Author.FullName}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}} |
| 36 | + <a href="{{.Author.HomeLink}}"><strong>{{.Author.FullName}}</strong> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}}</a> |
22 | 37 | {{else}}
|
23 |
| - <a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}} |
| 38 | + <a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}}</a> |
24 | 39 | {{end}}
|
25 | 40 | {{else}}
|
26 | 41 | <img class="ui avatar image" src="{{AvatarLink .Commit.Author.Email}}" />
|
|
30 | 45 | <span> </span>
|
31 | 46 | {{if ne .Verification.CommittingUser.ID 0}}
|
32 | 47 | <img class="ui avatar image" src="{{.Verification.CommittingUser.RelAvatarLink}}" />
|
33 |
| - <a href="{{.Verification.CommittingUser.HomeLink}}"><strong>{{.Commit.Committer.Name}}</strong></a> <{{.Commit.Committer.Email}}> |
| 48 | + <a href="{{.Verification.CommittingUser.HomeLink}}"><strong>{{.Commit.Committer.Name}}</strong> <{{.Commit.Committer.Email}}></a> |
34 | 49 | {{else}}
|
35 | 50 | <img class="ui avatar image" src="{{AvatarLink .Commit.Committer.Email}}" />
|
36 | 51 | <strong>{{.Commit.Committer.Name}}</strong>
|
|
58 | 73 | </div><!-- end grid -->
|
59 | 74 | </div>
|
60 | 75 | {{if .Commit.Signature}}
|
61 |
| - {{if .Verification.Verified }} |
62 |
| - <div class="ui bottom attached positive message"> |
| 76 | + <div class="ui bottom attached message {{$class}}"> |
| 77 | + {{if .Verification.Verified }} |
63 | 78 | {{if ne .Verification.SigningUser.ID 0}}
|
64 |
| - <i class="green lock icon"></i> |
65 |
| - <span>{{.i18n.Tr "repo.commits.signed_by"}}:</span> |
| 79 | + <i class="lock icon"></i> |
| 80 | + {{if eq .Verification.TrustStatus "trusted"}} |
| 81 | + <span class="ui text">{{.i18n.Tr "repo.commits.signed_by"}}:</span> |
| 82 | + {{else if eq .Verification.TrustStatus "untrusted"}} |
| 83 | + <span class="ui text">{{.i18n.Tr "repo.commits.signed_by_untrusted_user"}}:</span> |
| 84 | + {{else}} |
| 85 | + <span class="ui text">{{.i18n.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}:</span> |
| 86 | + {{end}} |
66 | 87 | <img class="ui avatar image" src="{{.Verification.SigningUser.RelAvatarLink}}" />
|
67 |
| - <a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Verification.SigningUser.Name}}</strong></a> <{{.Verification.SigningEmail}}> |
68 |
| - <span class="pull-right"><span>{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> {{.Verification.SigningKey.KeyID}}</span> |
| 88 | + <a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Verification.SigningUser.Name}}</strong> <{{.Verification.SigningEmail}}></a> |
| 89 | + <span class="pull-right"><span class="ui text">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> {{.Verification.SigningKey.KeyID}}</span> |
69 | 90 | {{else}}
|
70 | 91 | <i class="icons" title="{{.i18n.Tr "gpg.default_key"}}">
|
71 |
| - <i class="green lock icon"></i> |
| 92 | + <i class="lock icon"></i> |
72 | 93 | <i class="tiny inverted cog icon centerlock"></i>
|
73 | 94 | </i>
|
74 |
| - <span>{{.i18n.Tr "repo.commits.signed_by"}}:</span> |
| 95 | + <span class="ui text">{{.i18n.Tr "repo.commits.signed_by"}}:</span> |
75 | 96 | <img class="ui avatar image" src="{{AvatarLink .Verification.SigningEmail}}" />
|
76 | 97 | <strong>{{.Verification.SigningUser.Name}}</strong> <{{.Verification.SigningEmail}}>
|
77 |
| - <span class="pull-right"><span>{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> <i class="cogs icon" title="{{.i18n.Tr "gpg.default_key"}}"></i>{{.Verification.SigningKey.KeyID}}</span> |
| 98 | + <span class="pull-right"><span class="ui text">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> <i class="cogs icon" title="{{.i18n.Tr "gpg.default_key"}}"></i>{{.Verification.SigningKey.KeyID}}</span> |
78 | 99 | {{end}}
|
79 |
| - </div> |
80 |
| - {{else if .Verification.Warning}} |
81 |
| - <div class="ui bottom attached message"> |
82 |
| - <i class="red unlock icon"></i> |
83 |
| - <span class="red text">{{.i18n.Tr .Verification.Reason}}</span> |
84 |
| - <span class="pull-right"><span class="red text">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> <i class="red warning icon"></i>{{.Verification.SigningKey.KeyID}}</span> |
85 |
| - </div> |
86 |
| - {{else}} |
87 |
| - <div class="ui bottom attached message"> |
88 |
| - <i class="grey unlock icon"></i> |
| 100 | + {{else if .Verification.Warning}} |
| 101 | + <i class="unlock icon"></i> |
| 102 | + <span class="ui text">{{.i18n.Tr .Verification.Reason}}</span> |
| 103 | + <span class="pull-right"><span class="ui text">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> <i class="warning icon"></i>{{.Verification.SigningKey.KeyID}}</span> |
| 104 | + {{else}} |
| 105 | + <i class="unlock icon"></i> |
89 | 106 | {{.i18n.Tr .Verification.Reason}}
|
90 | 107 | {{if and .Verification.SigningKey (ne .Verification.SigningKey.KeyID "")}}
|
91 |
| - <span class="pull-right"><span class="red text">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> <i class="red warning icon"></i>{{.Verification.SigningKey.KeyID}}</span> |
| 108 | + <span class="pull-right"><span class="ui text">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> <i class="warning icon"></i>{{.Verification.SigningKey.KeyID}}</span> |
92 | 109 | {{end}}
|
93 |
| - </div> |
94 |
| - {{end}} |
| 110 | + {{end}} |
| 111 | + </div> |
95 | 112 | {{end}}
|
96 | 113 | {{if .Note}}
|
97 | 114 | <div class="ui top attached info segment message git-notes">
|
|
0 commit comments