From 594b6e9d0c0565c27a67853994433d6003f203cc Mon Sep 17 00:00:00 2001 From: CirnoT <1447794+CirnoT@users.noreply.github.com> Date: Sun, 31 May 2020 23:15:42 +0200 Subject: [PATCH 1/5] Fix styling for commiter on diff view --- options/locale/locale_en-US.ini | 1 + templates/repo/commit_page.tmpl | 25 ++++++++++++++----------- web_src/less/_repository.less | 18 ++++++++++++++++++ 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 57ab4966a31e1..8fceebe0ef396 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1650,6 +1650,7 @@ diff.review.placeholder = Review comment diff.review.comment = Comment diff.review.approve = Approve diff.review.reject = Request changes +diff.commited_by = commited by releases.desc = Track project versions and downloads. release.releases = Releases diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index 7a91663ec830e..361496cbde0a7 100644 --- a/templates/repo/commit_page.tmpl +++ b/templates/repo/commit_page.tmpl @@ -33,7 +33,7 @@
-
+
{{if .Author}} {{if .Author.FullName}} @@ -45,19 +45,22 @@ {{.Commit.Author.Name}} {{end}} + {{TimeSince .Commit.Author.When $.Lang}} {{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}} - - {{if ne .Verification.CommittingUser.ID 0}} - - {{.Commit.Committer.Name}} <{{.Commit.Committer.Email}}> - {{else}} - - {{.Commit.Committer.Name}} - {{end}} +
+ {{svg "octicon-git-commit" 16}}{{.i18n.Tr "repo.diff.commited_by"}} + {{if ne .Verification.CommittingUser.ID 0}} + + {{.Commit.Committer.Name}} <{{.Commit.Committer.Email}}> + {{else}} + + {{.Commit.Committer.Name}} + {{end}} +
{{end}} - {{TimeSince .Commit.Author.When $.Lang}} +
-
+
{{if .Parents}}
diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index efb89d5adffaa..313632d3245ff 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -2375,6 +2375,24 @@ } } } + + &.diff .commited-by { + padding-top: .5rem; + + .ui.avatar { + width: 20px; + height: 20px; + } + + span { + margin-right: .25rem; + + svg { + vertical-align: text-bottom; + margin-right: 2px; + } + } + } } // End of .repository From e3c5a8dd48ef22d15241268f763e1f8c3d70c3e0 Mon Sep 17 00:00:00 2001 From: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Date: Tue, 2 Jun 2020 18:15:35 +0200 Subject: [PATCH 2/5] Update options/locale/locale_en-US.ini --- options/locale/locale_en-US.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 8fceebe0ef396..c72fbd3026d58 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1650,7 +1650,7 @@ diff.review.placeholder = Review comment diff.review.comment = Comment diff.review.approve = Approve diff.review.reject = Request changes -diff.commited_by = commited by +diff.commited_by = committed by releases.desc = Track project versions and downloads. release.releases = Releases From ba723c86e182d57c01d1bfac374f58e5145a1deb Mon Sep 17 00:00:00 2001 From: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Date: Tue, 2 Jun 2020 18:26:59 +0200 Subject: [PATCH 3/5] Update templates/repo/commit_page.tmpl Co-authored-by: silverwind --- templates/repo/commit_page.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index 361496cbde0a7..f38d27198a950 100644 --- a/templates/repo/commit_page.tmpl +++ b/templates/repo/commit_page.tmpl @@ -47,7 +47,7 @@ {{end}} {{TimeSince .Commit.Author.When $.Lang}} {{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}} -
+
{{svg "octicon-git-commit" 16}}{{.i18n.Tr "repo.diff.commited_by"}} {{if ne .Verification.CommittingUser.ID 0}} From 00c6240f80bd207931501151035124dd5d5d0af9 Mon Sep 17 00:00:00 2001 From: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Date: Tue, 2 Jun 2020 18:27:06 +0200 Subject: [PATCH 4/5] Update templates/repo/commit_page.tmpl Co-authored-by: silverwind --- templates/repo/commit_page.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index f38d27198a950..7a967ee55e53c 100644 --- a/templates/repo/commit_page.tmpl +++ b/templates/repo/commit_page.tmpl @@ -48,7 +48,7 @@ {{TimeSince .Commit.Author.When $.Lang}} {{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}}
- {{svg "octicon-git-commit" 16}}{{.i18n.Tr "repo.diff.commited_by"}} + {{svg "octicon-git-commit" 16}}{{.i18n.Tr "repo.diff.committed_by"}} {{if ne .Verification.CommittingUser.ID 0}} {{.Commit.Committer.Name}} <{{.Commit.Committer.Email}}> From 776d2ff92dfac11ba3acd808f823274930422d4a Mon Sep 17 00:00:00 2001 From: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Date: Tue, 2 Jun 2020 18:28:31 +0200 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: silverwind --- options/locale/locale_en-US.ini | 2 +- web_src/less/_repository.less | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index c72fbd3026d58..8eb4512f9f648 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1650,7 +1650,7 @@ diff.review.placeholder = Review comment diff.review.comment = Comment diff.review.approve = Approve diff.review.reject = Request changes -diff.commited_by = committed by +diff.committed_by = committed by releases.desc = Track project versions and downloads. release.releases = Releases diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index 313632d3245ff..05e363ef73254 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -2376,7 +2376,7 @@ } } - &.diff .commited-by { + &.diff .committed-by { padding-top: .5rem; .ui.avatar {