1{{template "base/head" .}} 2<div class="page-content repository diff"> 3 {{template "repo/header" .}} 4 <div class="ui container {{if .IsSplitStyle}}fluid padded{{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 header clearing segment pr {{$class}}"> 21 {{if not $.PageIsWiki}} 22 <a class="ui blue tiny button browse-button" href="{{.SourcePath}}"> 23 {{.i18n.Tr "repo.diff.browse_source"}} 24 </a> 25 {{end}} 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 {{if IsMultilineCommitMessage .Commit.Message}} 28 <pre class="commit-body">{{RenderCommitBody .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</pre> 29 {{end}} 30 {{if .BranchName}} 31 <span class="text grey mr-3">{{svg "octicon-git-branch" 16 "mr-2"}}{{.BranchName}}</span> 32 {{end}} 33 {{if .TagName}} 34 <span class="text grey mr-3">{{svg "octicon-tag" 16 "mr-2"}}{{.TagName}}</span> 35 {{end}} 36 </div> 37 <div class="ui attached segment df ac sb py-2 commit-header-row {{$class}}"> 38 <div class="df ac"> 39 {{if .Author}} 40 {{avatar .Author 28 "mr-3"}} 41 {{if .Author.FullName}} 42 <a href="{{.Author.HomeLink}}"><strong>{{.Author.FullName}}</strong></a> 43 {{else}} 44 <a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a> 45 {{end}} 46 {{else}} 47 {{avatarByEmail .Commit.Author.Email .Commit.Author.Email 28 "mr-3"}} 48 <strong>{{.Commit.Author.Name}}</strong> 49 {{end}} 50 <span class="text grey ml-3" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span> 51 {{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}} 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 $.PageIsWiki}} 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}} 74 {{end}} 75 </div> 76 {{end}} 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> 80 </div> 81 </div> 82 {{if .Commit.Signature}} 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.GetDisplayName}}</strong></a> 97 {{else}} 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.GetDisplayName}}</strong> 102 {{end}} 103 {{else}} 104 {{svg "gitea-unlock" 16 "mr-3"}} 105 <span class="ui text">{{.i18n.Tr .Verification.Reason}}</span> 106 {{end}} 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 {{if .Verification.SigningSSHKey}} 113 <span class="ui text mr-3">{{.i18n.Tr "repo.commits.ssh_key_fingerprint"}}:</span> 114 {{.Verification.SigningSSHKey.Fingerprint}} 115 {{else}} 116 <span class="ui text mr-3">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> 117 {{.Verification.SigningKey.KeyID}} 118 {{end}} 119 {{else}} 120 {{svg "octicon-shield-lock" 16 "mr-3"}} 121 {{if .Verification.SigningSSHKey}} 122 <span class="ui text mr-3 tooltip" data-content="{{.i18n.Tr "gpg.default_key"}}">{{.i18n.Tr "repo.commits.ssh_key_fingerprint"}}:</span> 123 {{.Verification.SigningSSHKey.Fingerprint}} 124 {{else}} 125 <span class="ui text mr-3 tooltip" data-content="{{.i18n.Tr "gpg.default_key"}}">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> 126 {{.Verification.SigningKey.KeyID}} 127 {{end}} 128 {{end}} 129 {{else if .Verification.Warning}} 130 {{svg "octicon-shield" 16 "mr-3"}} 131 {{if .Verification.SigningSSHKey}} 132 <span class="ui text mr-3">{{.i18n.Tr "repo.commits.ssh_key_fingerprint"}}:</span> 133 {{.Verification.SigningSSHKey.Fingerprint}} 134 {{else}} 135 <span class="ui text mr-3">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> 136 {{.Verification.SigningKey.KeyID}} 137 {{end}} 138 {{else}} 139 {{if .Verification.SigningKey}} 140 {{if ne .Verification.SigningKey.KeyID ""}} 141 {{svg "octicon-shield" 16 "mr-3"}} 142 <span class="ui text mr-3">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> 143 {{.Verification.SigningKey.KeyID}} 144 {{end}} 145 {{end}} 146 {{if .Verification.SigningSSHKey}} 147 {{if ne .Verification.SigningSSHKey.Fingerprint ""}} 148 {{svg "octicon-shield" 16 "mr-3"}} 149 <span class="ui text mr-3">{{.i18n.Tr "repo.commits.ssh_key_fingerprint"}}:</span> 150 {{.Verification.SigningSSHKey.Fingerprint}} 151 {{end}} 152 {{end}} 153 {{end}} 154 </div> 155 </div> 156 {{end}} 157 {{if .Note}} 158 <div class="ui top attached header segment git-notes"> 159 {{svg "octicon-note" 16 "mr-3"}} 160 {{.i18n.Tr "repo.diff.git-notes"}}: 161 {{if .NoteAuthor}} 162 <a href="{{.NoteAuthor.HomeLink}}"> 163 {{if .NoteAuthor.FullName}} 164 <strong>{{.NoteAuthor.FullName}}</strong> 165 {{else}} 166 <strong>{{.NoteCommit.Author.Name}}</strong> 167 {{end}} 168 </a> 169 {{else}} 170 <strong>{{.NoteCommit.Author.Name}}</strong> 171 {{end}} 172 <span class="text grey" id="note-authored-time">{{TimeSince .NoteCommit.Author.When $.Lang}}</span> 173 </div> 174 <div class="ui bottom attached info segment git-notes"> 175 <pre class="commit-body">{{RenderNote .Note $.RepoLink $.Repository.ComposeMetas}}</pre> 176 </div> 177 {{end}} 178 {{template "repo/diff/box" .}} 179 </div> 180</div> 181{{template "base/footer" .}} 182