diff --git a/custom/options/locale/locale_en-US.ini b/custom/options/locale/locale_en-US.ini index 18d2027859..bb3f88f810 100644 --- a/custom/options/locale/locale_en-US.ini +++ b/custom/options/locale/locale_en-US.ini @@ -1112,7 +1112,7 @@ fork_article_confirm_yes = Yes, Fork article fork_article_confirm_cancel = Go back fork_article_confirm_body2 = If you'd like to collaborate on the article by making edits, return to the article, apply your changes, and submit. editor.edit_your_article = Edit Your Article -editor.edit_in_your_fork = Edit in Your Fork +editor.edit_in_your_fork = Fork editor.submit_changes = Submit Changes editor.submit_changes_tooltip = Submit your changes as a Change Request to the original article editor.submit_changes_confirm_title = Submit Changes @@ -2014,7 +2014,8 @@ pulls.blocked_by_official_review_requests = "This change request has official re pulls.blocked_by_outdated_branch = "This change request is blocked because it's outdated." pulls.blocked_by_changed_protected_files_1= "This change request is blocked because it changes a protected file:" pulls.blocked_by_changed_protected_files_n= "This change request is blocked because it changes protected files:" -pulls.can_auto_merge_desc = This change request can be merged automatically. +pulls.can_auto_merge_desc = This change request has no conflicts with the latest article. +pulls.can_auto_merge_desc_detail = Merging can be performed automatically. pulls.cannot_auto_merge_desc = This change request cannot be merged automatically due to conflicts. pulls.cannot_auto_merge_helper = Merge manually to resolve the conflicts. pulls.num_conflicting_files_1 = "%d conflicting file" diff --git a/custom/public/assets/css/base.custom.css b/custom/public/assets/css/base.custom.css index e12a88c48f..387a292ded 100644 --- a/custom/public/assets/css/base.custom.css +++ b/custom/public/assets/css/base.custom.css @@ -23,4 +23,52 @@ .ui.form .field > .ui.input > input, .ui.form .field > .ui.input > textarea { border-radius: var(--border-radius); +} + +.circle { + border-radius: 50% !important; + overflow: hidden; + width: 2rem; + height: 2rem; + display: flex; + align-items: center; + justify-content: center; +} + +.circle.small { + width: 1.5rem; + height: 1.5rem; +} + +.circle svg { + width: 18px; + height: 18px; +} + +.circle.small svg { + scale: .8; +} + +.circle.green-light-1{ + color: var(--color-white); + background-color: var(--color-green-light-1); + border: none !important; +} + +.circle.red{ + color: var(--color-white); + background-color: var(--color-red); + border: none !important; +} + +.circle.yellow{ + color: var(--color-white); + background-color: var(--color-yellow); + border: none !important; +} + +.circle.grey{ + color: var(--color-white); + background-color: var(--color-grey); + border: none !important; } \ No newline at end of file diff --git a/custom/public/assets/css/colors.custom.css b/custom/public/assets/css/colors.custom.css index 6246587e97..54726ca15f 100644 --- a/custom/public/assets/css/colors.custom.css +++ b/custom/public/assets/css/colors.custom.css @@ -31,6 +31,7 @@ gitea-theme-meta-info { /* Green colors */ --color-green: #1F883D; --color-green-light: #2DA44E; + --color-green-light-1: #1DD781; --color-green-dark-1: #1A7F37; --color-green-dark-2: #116329; @@ -85,5 +86,8 @@ gitea-theme-meta-info { /* Tab colors */ --color-tab-inactive: #969aa5; --color-tab-active-text: #555; + + --color-red: #CF222E; + --color-yellow: #EBB400; } diff --git a/custom/public/assets/css/repo.custom.css b/custom/public/assets/css/repo.custom.css index 9f2b994fd7..8173aae338 100644 --- a/custom/public/assets/css/repo.custom.css +++ b/custom/public/assets/css/repo.custom.css @@ -21,6 +21,25 @@ padding: 1rem; } +/* Merge section border colors */ +.merge-section.border-red { border-color: var(--color-red) !important; } +.merge-section.border-purple { border-color: var(--color-purple) !important; } +.merge-section.border-grey { border-color: var(--color-grey) !important; } +.merge-section.border-yellow { border-color: var(--color-yellow) !important; } +.merge-section.border-green { border-color: var(--color-green) !important; } +.merge-section.border-green-light-1 { border-color: var(--color-green-light-1) !important; } + +/* Smaller timeline avatars */ +.timeline-avatar { + width: 28px !important; + height: 28px !important; +} + +.timeline-avatar img { + width: 28px !important; + height: 28px !important; +} + @media (max-width: 767.98px) { .repository.view.issue .comment-list .comment .content .form .button:not(:last-child) { margin-bottom: 0 !important; @@ -193,6 +212,12 @@ overflow: hidden; } +.repository .comment-container .diff-file-box { + border-radius: 0 !important; + border: none !important; + border-bottom: 1px solid var(--color-border) !important; +} + /* Remove inner borders to prevent double-border */ .diff-file-box .ui.attached.table, .diff-file-box .ui.attached.header, diff --git a/custom/templates/repo/commits_list.tmpl b/custom/templates/repo/commits_list.tmpl new file mode 100644 index 0000000000..f7e6f703da --- /dev/null +++ b/custom/templates/repo/commits_list.tmpl @@ -0,0 +1,92 @@ +
| {{ctx.Locale.Tr "repo.commits.author"}} | +{{StringUtils.ToUpper $.Repository.ObjectFormatName}} | + +{{ctx.Locale.Tr "repo.commits.date"}} | ++ | |
|---|---|---|---|---|
|
+
+ {{$userName := .Author.Name}}
+ {{if .User}}
+ {{if and .User.FullName DefaultShowFullName}}
+ {{$userName = .User.FullName}}
+ {{end}}
+ {{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}{{$userName}}
+ {{else}}
+ {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}}
+
+ {{end}}
+
+ |
+ + {{$commitBaseLink := ""}} + {{if $.PageIsWiki}} + {{$commitBaseLink = printf "%s/wiki/commit" $commitRepoLink}} + {{else if $.PageIsPullCommits}} + {{$commitBaseLink = printf "%s/pulls/%d/commits" $commitRepoLink $.Issue.Index}} + {{else if $.Reponame}} + {{$commitBaseLink = printf "%s/commit" $commitRepoLink}} + {{end}} + {{template "repo/commit_sign_badge" dict "Commit" . "CommitBaseLink" $commitBaseLink "CommitSignVerification" .Verification}} + | + + {{if .Committer}} +{{DateUtils.TimeSince .Committer.When}} | + {{else}} +{{DateUtils.TimeSince .Author.When}} | + {{end}} ++ + {{/* at the moment, wiki doesn't support these "view" links like "view at history point" */}} + {{if not $.PageIsWiki}} + {{/* view single file diff */}} + {{if $.FileTreePath}} + {{svg "octicon-file-diff"}} + {{end}} + + {{/* view at history point */}} + {{$viewCommitLink := printf "%s/src/commit/%s" $commitRepoLink (PathEscape .ID.String)}} + {{if $.FileTreePath}}{{$viewCommitLink = printf "%s/%s" $viewCommitLink (PathEscapeSegments $.FileTreePath)}}{{end}} + {{svg "octicon-file-code"}} + {{end}} + | +
+ {{- ctx.RenderUtils.RenderCommitBody .Message $repoData -}}
+
+ {{end}}
+{{end}}
+