|
17 | 17 | {{$class = (printf "%s%s" $class " isWarning")}}
|
18 | 18 | {{end}}
|
19 | 19 | {{end}}
|
20 |
| - <div class="ui top attached info clearing segment {{$class}}"> |
| 20 | + <div class="ui top attached header clearing segment pr {{$class}}"> |
21 | 21 | {{if not $.PageIsUncyclo}}
|
22 |
| - <a class="ui floated right blue tiny button" href="{{.SourcePath}}"> |
| 22 | + <a class="ui blue tiny button browse-button" href="{{.SourcePath}}"> |
23 | 23 | {{.i18n.Tr "repo.diff.browse_source"}}
|
24 | 24 | </a>
|
25 | 25 | {{end}}
|
26 |
| - <h3><span class="message-wrapper"><span class="commit-summary" title="{{.Commit.Summary}}">{{RenderCommitMessage .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</span></span>{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses "root" $}}</h3> |
| 26 | + <h3 class="mt-0"><span class="message-wrapper"><span class="commit-summary" title="{{.Commit.Summary}}">{{RenderCommitMessage .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</span></span>{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses "root" $}}</h3> |
27 | 27 | {{if IsMultilineCommitMessage .Commit.Message}}
|
28 | 28 | <pre class="commit-body">{{RenderCommitBody .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
|
29 | 29 | {{end}}
|
30 | 30 | {{if .BranchName}}
|
31 |
| - <span class="text grey">{{svg "octicon-git-branch"}}{{.BranchName}}</span> |
| 31 | + <span class="text grey mr-3">{{svg "octicon-git-branch" 16 "mr-2"}}{{.BranchName}}</span> |
32 | 32 | {{end}}
|
33 | 33 | {{if .TagName}}
|
34 |
| - <span class="text grey">{{svg "octicon-tag"}}{{.TagName}}</span> |
| 34 | + <span class="text grey mr-3">{{svg "octicon-tag" 16 "mr-2"}}{{.TagName}}</span> |
35 | 35 | {{end}}
|
36 | 36 | </div>
|
37 |
| - <div class="ui attached info segment {{$class}}"> |
38 |
| - <div class="ui stackable grid"> |
39 |
| - <div class="nine wide column"> |
| 37 | + <div class="ui attached segment df ac sb py-2 commit-header-row {{$class}}"> |
| 38 | + <div class="df ac"> |
40 | 39 | {{if .Author}}
|
41 |
| - {{avatar .Author}} |
| 40 | + {{avatar .Author 28 "mr-3"}} |
42 | 41 | {{if .Author.FullName}}
|
43 | 42 | <a href="{{.Author.HomeLink}}"><strong>{{.Author.FullName}}</strong></a>
|
44 | 43 | {{else}}
|
45 | 44 | <a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a>
|
46 | 45 | {{end}}
|
47 | 46 | {{else}}
|
48 |
| - {{avatarByEmail .Commit.Author.Email .Commit.Author.Email 12}} |
| 47 | + {{avatarByEmail .Commit.Author.Email .Commit.Author.Email 28 "mr-3"}} |
49 | 48 | <strong>{{.Commit.Author.Name}}</strong>
|
50 | 49 | {{end}}
|
51 |
| - <span class="text grey" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span> |
| 50 | + <span class="text grey ml-3" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span> |
52 | 51 | {{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}}
|
53 |
| - <div class="committed-by"> |
54 |
| - <span class="text grey">{{svg "octicon-git-commit"}}{{.i18n.Tr "repo.diff.committed_by"}}</span> |
55 |
| - {{if ne .Verification.CommittingUser.ID 0}} |
56 |
| - {{avatar .Verification.CommittingUser}} |
57 |
| - <a href="{{.Verification.CommittingUser.HomeLink}}"><strong>{{.Commit.Committer.Name}}</strong></a> |
58 |
| - {{else}} |
59 |
| - {{avatarByEmail .Commit.Committer.Email .Commit.Committer.Name}} |
60 |
| - <strong>{{.Commit.Committer.Name}}</strong> |
| 52 | + <span class="text grey mx-3">{{.i18n.Tr "repo.diff.committed_by"}}</span> |
| 53 | + {{if ne .Verification.CommittingUser.ID 0}} |
| 54 | + {{avatar .Verification.CommittingUser 28 "mx-3"}} |
| 55 | + <a href="{{.Verification.CommittingUser.HomeLink}}"><strong>{{.Commit.Committer.Name}}</strong></a> |
| 56 | + {{else}} |
| 57 | + {{avatarByEmail .Commit.Committer.Email .Commit.Committer.Name 28 "mr-3"}} |
| 58 | + <strong>{{.Commit.Committer.Name}}</strong> |
| 59 | + {{end}} |
| 60 | + {{end}} |
| 61 | + </div> |
| 62 | + <div class="ui horizontal list df ac"> |
| 63 | + {{if .Parents}} |
| 64 | + <div class="item"> |
| 65 | + {{.i18n.Tr "repo.diff.parent"}} |
| 66 | + </div> |
| 67 | + <div class="item"> |
| 68 | + {{range .Parents}} |
| 69 | + {{if $.PageIsUncyclo}} |
| 70 | + <a class="ui blue sha label" href="{{$.RepoLink}}/wiki/commit/{{PathEscape .}}">{{ShortSha .}}</a> |
| 71 | + {{else}} |
| 72 | + <a class="ui blue sha label" href="{{$.RepoLink}}/commit/{{PathEscape .}}">{{ShortSha .}}</a> |
| 73 | + {{end}} |
61 | 74 | {{end}}
|
62 | 75 | </div>
|
63 | 76 | {{end}}
|
64 |
| - |
| 77 | + <div class="mobile-only"></div> |
| 78 | + <div class="item">{{.i18n.Tr "repo.diff.commit"}}</div> |
| 79 | + <div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div> |
65 | 80 | </div>
|
66 |
| - <div class="seven wide right aligned column"> |
67 |
| - <div class="ui horizontal list"> |
68 |
| - {{if .Parents}} |
69 |
| - <div class="item"> |
70 |
| - {{.i18n.Tr "repo.diff.parent"}} |
71 |
| - </div> |
72 |
| - <div class="item"> |
73 |
| - {{range .Parents}} |
74 |
| - {{if $.PageIsUncyclo}} |
75 |
| - <a class="ui blue sha label" href="{{$.RepoLink}}/wiki/commit/{{PathEscape .}}">{{ShortSha .}}</a> |
76 |
| - {{else}} |
77 |
| - <a class="ui blue sha label" href="{{$.RepoLink}}/commit/{{PathEscape .}}">{{ShortSha .}}</a> |
78 |
| - {{end}} |
79 |
| - {{end}} |
80 |
| - </div> |
81 |
| - {{end}} |
82 |
| - <div class="mobile-only"></div> |
83 |
| - <div class="item">{{.i18n.Tr "repo.diff.commit"}}</div> |
84 |
| - <div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div> |
85 |
| - </div> |
86 |
| - </div><!-- end column --> |
87 |
| - </div><!-- end grid --> |
88 | 81 | </div>
|
89 | 82 | {{if .Commit.Signature}}
|
90 |
| - <div class="ui bottom attached message {{$class}}"> |
91 |
| - {{if .Verification.Verified }} |
92 |
| - {{if ne .Verification.SigningUser.ID 0}} |
93 |
| - {{svg "gitea-lock"}} |
94 |
| - {{if eq .Verification.TrustStatus "trusted"}} |
95 |
| - <span class="ui text">{{.i18n.Tr "repo.commits.signed_by"}}:</span> |
96 |
| - {{else if eq .Verification.TrustStatus "untrusted"}} |
97 |
| - <span class="ui text">{{.i18n.Tr "repo.commits.signed_by_untrusted_user"}}:</span> |
| 83 | + <div class="ui bottom attached message tl df ac sb commit-header-row {{$class}}"> |
| 84 | + <div class="df ac"> |
| 85 | + {{if .Verification.Verified}} |
| 86 | + {{if ne .Verification.SigningUser.ID 0}} |
| 87 | + {{svg "gitea-lock" 16 "mr-3"}} |
| 88 | + {{if eq .Verification.TrustStatus "trusted"}} |
| 89 | + <span class="ui text mr-3">{{.i18n.Tr "repo.commits.signed_by"}}:</span> |
| 90 | + {{else if eq .Verification.TrustStatus "untrusted"}} |
| 91 | + <span class="ui text mr-3">{{.i18n.Tr "repo.commits.signed_by_untrusted_user"}}:</span> |
| 92 | + {{else}} |
| 93 | + <span class="ui text mr-3">{{.i18n.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}:</span> |
| 94 | + {{end}} |
| 95 | + {{avatar .Verification.SigningUser 28}} |
| 96 | + <a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Verification.SigningUser.Name}}</strong></a> |
98 | 97 | {{else}}
|
99 |
| - <span class="ui text">{{.i18n.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}:</span> |
| 98 | + <span title="{{.i18n.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog"}}</span> |
| 99 | + <span class="ui text">{{.i18n.Tr "repo.commits.signed_by"}}:</span> |
| 100 | + {{avatarByEmail .Verification.SigningEmail "" 28}} |
| 101 | + <strong>{{.Verification.SigningUser.Name}}</strong> |
100 | 102 | {{end}}
|
101 |
| - {{avatar .Verification.SigningUser}} |
102 |
| - <a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Verification.SigningUser.Name}}</strong></a> |
103 |
| - <span class="pull-right"><span class="ui text">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> {{.Verification.SigningKey.KeyID}}</span> |
104 | 103 | {{else}}
|
105 |
| - <span title="{{.i18n.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog"}}</span> |
106 |
| - <span class="ui text">{{.i18n.Tr "repo.commits.signed_by"}}:</span> |
107 |
| - {{avatarByEmail .Verification.SigningEmail ""}} |
108 |
| - <strong>{{.Verification.SigningUser.Name}}</strong> |
109 |
| - <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> |
| 104 | + {{svg "gitea-unlock" 16 "mr-3"}} |
| 105 | + <span class="ui text">{{.i18n.Tr .Verification.Reason}}</span> |
110 | 106 | {{end}}
|
111 |
| - {{else if .Verification.Warning}} |
112 |
| - {{svg "gitea-unlock"}} |
113 |
| - <span class="ui text">{{.i18n.Tr .Verification.Reason}}</span> |
114 |
| - <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> |
115 |
| - {{else}} |
116 |
| - <i class="unlock icon"></i> |
117 |
| - {{.i18n.Tr .Verification.Reason}} |
118 |
| - {{if .Verification.SigningKey}} |
119 |
| - {{if ne .Verification.SigningKey.KeyID ""}} |
120 |
| - <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> |
| 107 | + </div> |
| 108 | + <div class="df ac"> |
| 109 | + {{if .Verification.Verified}} |
| 110 | + {{if ne .Verification.SigningUser.ID 0}} |
| 111 | + {{svg "octicon-shield-check" 16 "mr-3"}} |
| 112 | + <span class="ui text mr-3">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> |
| 113 | + {{.Verification.SigningKey.KeyID}} |
| 114 | + {{else}} |
| 115 | + {{svg "octicon-shield-lock" 16 "mr-3"}} |
| 116 | + <span class="ui text mr-3 tooltip" data-content="{{.i18n.Tr "gpg.default_key"}}">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> |
| 117 | + {{.Verification.SigningKey.KeyID}} |
| 118 | + {{end}} |
| 119 | + {{else if .Verification.Warning}} |
| 120 | + {{svg "octicon-shield" 16 "mr-3"}} |
| 121 | + <span class="ui text mr-3">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> |
| 122 | + {{.Verification.SigningKey.KeyID}} |
| 123 | + {{else}} |
| 124 | + {{if .Verification.SigningKey}} |
| 125 | + {{if ne .Verification.SigningKey.KeyID ""}} |
| 126 | + {{svg "octicon-shield" 16 "mr-3"}} |
| 127 | + <span class="ui text mr-3">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> |
| 128 | + {{.Verification.SigningKey.KeyID}} |
| 129 | + {{end}} |
121 | 130 | {{end}}
|
122 | 131 | {{end}}
|
123 |
| - {{end}} |
| 132 | + </div> |
124 | 133 | </div>
|
125 | 134 | {{end}}
|
126 | 135 | {{if .Note}}
|
127 |
| - <div class="ui top attached info segment message git-notes"> |
128 |
| - <i class="sticky note icon"></i> |
| 136 | + <div class="ui top attached header segment git-notes"> |
| 137 | + {{svg "octicon-note" 16 "mr-3"}} |
129 | 138 | {{.i18n.Tr "repo.diff.git-notes"}}:
|
130 | 139 | {{if .NoteAuthor}}
|
131 | 140 | <a href="{{.NoteAuthor.HomeLink}}">
|
|
0 commit comments