From b744325a56c13fecb390201844c5618875a0b76d Mon Sep 17 00:00:00 2001
From: yp05327 <576951401@qq.com>
Date: Tue, 26 Mar 2024 05:41:40 +0000
Subject: [PATCH 1/2] fix
---
templates/repo/commits_list.tmpl | 2 +-
templates/repo/graph/commits.tmpl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl
index aa7ca88931eb0..d6cd8d3d96b70 100644
--- a/templates/repo/commits_list.tmpl
+++ b/templates/repo/commits_list.tmpl
@@ -16,7 +16,7 @@
{{$userName := .Author.Name}}
{{if .User}}
- {{if .User.FullName}}
+ {{if and .User.FullName DefaultShowFullName}}
{{$userName = .User.FullName}}
{{end}}
{{ctx.AvatarUtils.Avatar .User 28 "tw-mr-1"}}{{$userName}}
diff --git a/templates/repo/graph/commits.tmpl b/templates/repo/graph/commits.tmpl
index 96d09072da05b..f141dbeada26e 100644
--- a/templates/repo/graph/commits.tmpl
+++ b/templates/repo/graph/commits.tmpl
@@ -61,7 +61,7 @@
{{$userName := $commit.Commit.Author.Name}}
{{if $commit.User}}
- {{if $commit.User.FullName}}
+ {{if and $commit.User.FullName DefaultShowFullName}}
{{$userName = $commit.User.FullName}}
{{end}}
{{ctx.AvatarUtils.Avatar $commit.User}}
From fedadd0312b8fc67e1b9f877689dd2518154c034 Mon Sep 17 00:00:00 2001
From: yp05327 <576951401@qq.com>
Date: Tue, 26 Mar 2024 06:31:21 +0000
Subject: [PATCH 2/2] fix
---
templates/repo/latest_commit.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/repo/latest_commit.tmpl b/templates/repo/latest_commit.tmpl
index f945e9dfa14e2..8bacb427bf324 100644
--- a/templates/repo/latest_commit.tmpl
+++ b/templates/repo/latest_commit.tmpl
@@ -3,7 +3,7 @@
{{else}}
{{if .LatestCommitUser}}
{{ctx.AvatarUtils.Avatar .LatestCommitUser 24 "tw-mr-1"}}
- {{if .LatestCommitUser.FullName}}
+ {{if and .LatestCommitUser.FullName DefaultShowFullName}}
{{.LatestCommitUser.FullName}}
{{else}}
{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}
|