mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-18 00:01:32 -04:00
Compare commits
5 Commits
75eaf99076
...
ddf61373f6
Author | SHA1 | Date | |
---|---|---|---|
|
ddf61373f6 | ||
|
b4ed3f07e4 | ||
|
ced94f2e0d | ||
|
aff432b197 | ||
|
0ac3be1482 |
@ -25,6 +25,8 @@ const (
|
||||
func NewDiffPatch(ctx *context.Context) {
|
||||
canCommit := renderCommitRights(ctx)
|
||||
|
||||
ctx.Data["PageIsPatch"] = true
|
||||
|
||||
ctx.Data["TreePath"] = ""
|
||||
|
||||
ctx.Data["commit_summary"] = ""
|
||||
@ -51,6 +53,7 @@ func NewDiffPatchPost(ctx *context.Context) {
|
||||
if form.CommitChoice == frmCommitChoiceNewBranch {
|
||||
branchName = form.NewBranchName
|
||||
}
|
||||
ctx.Data["PageIsPatch"] = true
|
||||
ctx.Data["TreePath"] = ""
|
||||
ctx.Data["BranchLink"] = ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()
|
||||
ctx.Data["FileContent"] = form.Content
|
||||
|
@ -18,9 +18,9 @@
|
||||
</span>
|
||||
</a>
|
||||
{{end}}
|
||||
<div class="ui icon button mobile-only" id="navbar-expand-toggle">
|
||||
<button class="ui icon button mobile-only" id="navbar-expand-toggle">
|
||||
{{svg "octicon-three-bars"}}
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
{{.locale.Tr "repo.editor.commit_changes"}}
|
||||
{{- end}}</h3>
|
||||
<div class="field">
|
||||
<input name="commit_summary" placeholder="{{if .PageIsDelete}}{{.locale.Tr "repo.editor.delete" .TreePath}}{{else if .PageIsUpload}}{{.locale.Tr "repo.editor.upload_files_to_dir" .TreePath}}{{else if .IsNewFile}}{{.locale.Tr "repo.editor.add_tmpl"}}{{else}}{{.locale.Tr "repo.editor.update" .TreePath}}{{end}}" value="{{.commit_summary}}" autofocus>
|
||||
<input name="commit_summary" placeholder="{{if .PageIsDelete}}{{.locale.Tr "repo.editor.delete" .TreePath}}{{else if .PageIsUpload}}{{.locale.Tr "repo.editor.upload_files_to_dir" .TreePath}}{{else if .IsNewFile}}{{.locale.Tr "repo.editor.add_tmpl"}}{{else if .PageIsPatch}}{{.locale.Tr "repo.editor.patch"}}{{else}}{{.locale.Tr "repo.editor.update" .TreePath}}{{end}}" value="{{.commit_summary}}" autofocus>
|
||||
</div>
|
||||
<div class="field">
|
||||
<textarea name="commit_message" placeholder="{{.locale.Tr "repo.editor.commit_message_desc"}}" rows="5">{{.commit_message}}</textarea>
|
||||
|
@ -27,7 +27,7 @@
|
||||
</a>
|
||||
{{end}}
|
||||
<div class="content comment-container">
|
||||
<div class="ui top attached header comment-header gt-df gt-ac gt-sb">
|
||||
<div class="ui top attached header comment-header gt-df gt-ac gt-sb" role="heading" aria-level="3">
|
||||
<div class="comment-header-left gt-df gt-ac">
|
||||
{{if .Issue.OriginalAuthor}}
|
||||
<span class="text black gt-bold">
|
||||
@ -69,7 +69,7 @@
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui attached segment comment-body">
|
||||
<div class="ui attached segment comment-body" role="article">
|
||||
<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission $.IsIssuePoster}}data-can-edit="true"{{end}}>
|
||||
{{if .Issue.RenderedContent}}
|
||||
{{.Issue.RenderedContent|Str2html}}
|
||||
@ -85,7 +85,7 @@
|
||||
</div>
|
||||
{{$reactions := .Issue.Reactions.GroupByType}}
|
||||
{{if $reactions}}
|
||||
<div class="ui attached segment reactions">
|
||||
<div class="ui attached segment reactions" role="note">
|
||||
{{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
@ -22,7 +22,7 @@
|
||||
</a>
|
||||
{{end}}
|
||||
<div class="content comment-container">
|
||||
<div class="ui top attached header comment-header gt-df gt-ac gt-sb">
|
||||
<div class="ui top attached header comment-header gt-df gt-ac gt-sb" role="heading" aria-level="3">
|
||||
<div class="comment-header-left gt-df gt-ac">
|
||||
{{if .OriginalAuthor}}
|
||||
<span class="text black gt-bold gt-mr-2">
|
||||
@ -69,7 +69,7 @@
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui attached segment comment-body">
|
||||
<div class="ui attached segment comment-body" role="article">
|
||||
<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission (and $.IsSigned (eq $.SignedUserID .PosterID))}}data-can-edit="true"{{end}}>
|
||||
{{if .RenderedContent}}
|
||||
{{.RenderedContent|Str2html}}
|
||||
@ -85,7 +85,7 @@
|
||||
</div>
|
||||
{{$reactions := .Reactions.GroupByType}}
|
||||
{{if $reactions}}
|
||||
<div class="ui attached segment reactions">
|
||||
<div class="ui attached segment reactions" role="note">
|
||||
{{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{{if .LatestCommitUser}}
|
||||
{{avatar $.Context .LatestCommitUser 24}}
|
||||
{{if .LatestCommitUser.FullName}}
|
||||
<a class="muted" href="{{.LatestCommitUser.HomeLink}}"><strong>{{.LatestCommitUser.FullName}}</strong></a>
|
||||
<a class="muted author-wrapper" title="{{.LatestCommitUser.FullName}}" href="{{.LatestCommitUser.HomeLink}}"><strong>{{.LatestCommitUser.FullName}}</strong></a>
|
||||
{{else}}
|
||||
<a class="muted" href="{{.LatestCommitUser.HomeLink}}"><strong>{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}</strong></a>
|
||||
<a class="muted author-wrapper" title="{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}" href="{{.LatestCommitUser.HomeLink}}"><strong>{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}</strong></a>
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{if .LatestCommit.Author}}
|
||||
{{avatarByEmail $.Context .LatestCommit.Author.Email .LatestCommit.Author.Name 24}}
|
||||
<strong>{{.LatestCommit.Author.Name}}</strong>
|
||||
<span class="author-wrapper" title="{{.LatestCommit.Author.Name}}"><strong>{{.LatestCommit.Author.Name}}</strong></span>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a rel="nofollow" class="ui sha label {{if .LatestCommit.Signature}} isSigned {{if .LatestCommitVerification.Verified}} isVerified{{if eq .LatestCommitVerification.TrustStatus "trusted"}}{{else if eq .LatestCommitVerification.TrustStatus "untrusted"}}Untrusted{{else}}Unmatched{{end}}{{else if .LatestCommitVerification.Warning}} isWarning{{end}}{{end}}" href="{{.RepoLink}}/commit/{{PathEscape .LatestCommit.ID.String}}">
|
||||
|
@ -237,6 +237,8 @@
|
||||
}
|
||||
|
||||
#repo-files-table {
|
||||
table-layout: fixed;
|
||||
|
||||
thead {
|
||||
th {
|
||||
padding-top: 8px;
|
||||
@ -2885,7 +2887,8 @@ tbody.commit-list {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
.message-wrapper {
|
||||
.message-wrapper,
|
||||
.author-wrapper {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: calc(100% - 50px);
|
||||
@ -2893,6 +2896,10 @@ tbody.commit-list {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.author-wrapper {
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
// in the commit list, messages can wrap so we can use inline
|
||||
.commit-list .message-wrapper {
|
||||
display: inline;
|
||||
@ -2912,6 +2919,10 @@ tbody.commit-list {
|
||||
display: block;
|
||||
max-width: calc(100vw - 70px);
|
||||
}
|
||||
|
||||
.author-wrapper {
|
||||
max-width: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
@media @mediaMd {
|
||||
@ -2920,7 +2931,7 @@ tbody.commit-list {
|
||||
}
|
||||
|
||||
th .message-wrapper {
|
||||
max-width: 280px;
|
||||
max-width: 120px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2930,7 +2941,7 @@ tbody.commit-list {
|
||||
}
|
||||
|
||||
th .message-wrapper {
|
||||
max-width: 490px;
|
||||
max-width: 350px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2940,7 +2951,7 @@ tbody.commit-list {
|
||||
}
|
||||
|
||||
th .message-wrapper {
|
||||
max-width: 680px;
|
||||
max-width: 525px;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user