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