From 7c4f9bfed27be73e4faebe80fd5ecb3aa5c43fe6 Mon Sep 17 00:00:00 2001 From: Blender Defender Date: Wed, 29 May 2024 14:34:32 +0200 Subject: [PATCH 01/32] feat: De-emphasize signed commits Rework the signed commits UI to show a clickable badge for signed commits. Clicking this badge reveals further information about the trust status of the signature. --- templates/repo/commit_page.tmpl | 107 ++------------------ templates/repo/commits_list.tmpl | 131 +++++++++++-------------- templates/repo/commits_list_small.tmpl | 35 +++---- templates/repo/graph/commits.tmpl | 10 +- templates/repo/latest_commit.tmpl | 23 +++-- templates/repo/shabox_badge.tmpl | 15 --- templates/repo/signature_badge.tmpl | 91 +++++++++++++++++ 7 files changed, 187 insertions(+), 225 deletions(-) delete mode 100644 templates/repo/shabox_badge.tmpl create mode 100644 templates/repo/signature_badge.tmpl diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index b8195ac544983..8272d268b99f0 100644 --- a/templates/repo/commit_page.tmpl +++ b/templates/repo/commit_page.tmpl @@ -2,22 +2,7 @@
{{template "repo/header" .}}
- {{$class := ""}} - {{if .Commit.Signature}} - {{$class = (print $class " isSigned")}} - {{if .Verification.Verified}} - {{if eq .Verification.TrustStatus "trusted"}} - {{$class = (print $class " isVerified")}} - {{else if eq .Verification.TrustStatus "untrusted"}} - {{$class = (print $class " isVerifiedUntrusted")}} - {{else}} - {{$class = (print $class " isVerifiedUnmatched")}} - {{end}} - {{else if .Verification.Warning}} - {{$class = (print $class " isWarning")}} - {{end}} - {{end}} -
+

{{RenderCommitMessage $.Context .Commit.Message ($.Repository.ComposeMetas ctx)}}{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses}}

{{if not $.PageIsWiki}} @@ -139,7 +124,7 @@ {{end}} {{template "repo/commit_load_branches_and_tags" .}}
-
+
{{if .Author}} {{ctx.AvatarUtils.Avatar .Author 28 "tw-mr-2"}} @@ -152,17 +137,20 @@ {{ctx.AvatarUtils.AvatarByEmail .Commit.Author.Email .Commit.Author.Email 28 "tw-mr-2"}} {{.Commit.Author.Name}} {{end}} - {{TimeSince .Commit.Author.When ctx.Locale}} + {{TimeSince .Commit.Author.When ctx.Locale}} {{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}} - {{ctx.Locale.Tr "repo.diff.committed_by"}} + {{ctx.Locale.Tr "repo.diff.committed_by"}} {{if ne .Verification.CommittingUser.ID 0}} - {{ctx.AvatarUtils.Avatar .Verification.CommittingUser 28 "tw-mx-2"}} - {{.Commit.Committer.Name}} + {{ctx.AvatarUtils.Avatar .Verification.CommittingUser 28 "tw-mr-2"}} + {{.Commit.Committer.Name}} {{else}} {{ctx.AvatarUtils.AvatarByEmail .Commit.Committer.Email .Commit.Committer.Name 28 "tw-mr-2"}} - {{.Commit.Committer.Name}} + {{.Commit.Committer.Name}} {{end}} {{end}} + {{if .Commit.Signature}} + {{template "repo/signature_badge" dict "root" $ "verification" .Verification "shortsha" (ShortSha .Commit.ID.String)}} + {{end}}
{{if .Parents}} @@ -183,81 +171,6 @@
- {{if .Commit.Signature}} -
-
- {{if .Verification.Verified}} - {{if ne .Verification.SigningUser.ID 0}} - {{svg "gitea-lock" 16 "tw-mr-2"}} - {{if eq .Verification.TrustStatus "trusted"}} - {{ctx.Locale.Tr "repo.commits.signed_by"}}: - {{else if eq .Verification.TrustStatus "untrusted"}} - {{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user"}}: - {{else}} - {{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: - {{end}} - {{ctx.AvatarUtils.Avatar .Verification.SigningUser 28 "tw-mr-2"}} - {{.Verification.SigningUser.GetDisplayName}} - {{else}} - {{svg "gitea-lock-cog" 16 "tw-mr-2"}} - {{ctx.Locale.Tr "repo.commits.signed_by"}}: - {{ctx.AvatarUtils.AvatarByEmail .Verification.SigningEmail "" 28 "tw-mr-2"}} - {{.Verification.SigningUser.GetDisplayName}} - {{end}} - {{else}} - {{svg "gitea-unlock" 16 "tw-mr-2"}} - {{ctx.Locale.Tr .Verification.Reason}} - {{end}} -
-
- {{if .Verification.Verified}} - {{if ne .Verification.SigningUser.ID 0}} - {{svg "octicon-verified" 16 "tw-mr-2"}} - {{if .Verification.SigningSSHKey}} - {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: - {{.Verification.SigningSSHKey.Fingerprint}} - {{else}} - {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: - {{.Verification.SigningKey.PaddedKeyID}} - {{end}} - {{else}} - {{svg "octicon-unverified" 16 "tw-mr-2"}} - {{if .Verification.SigningSSHKey}} - {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: - {{.Verification.SigningSSHKey.Fingerprint}} - {{else}} - {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: - {{.Verification.SigningKey.PaddedKeyID}} - {{end}} - {{end}} - {{else if .Verification.Warning}} - {{svg "octicon-unverified" 16 "tw-mr-2"}} - {{if .Verification.SigningSSHKey}} - {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: - {{.Verification.SigningSSHKey.Fingerprint}} - {{else}} - {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: - {{.Verification.SigningKey.PaddedKeyID}} - {{end}} - {{else}} - {{if .Verification.SigningKey}} - {{if ne .Verification.SigningKey.KeyID ""}} - {{svg "octicon-verified" 16 "tw-mr-2"}} - {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: - {{.Verification.SigningKey.PaddedKeyID}} - {{end}} - {{end}} - {{if .Verification.SigningSSHKey}} - {{if ne .Verification.SigningSSHKey.Fingerprint ""}} - {{svg "octicon-verified" 16 "tw-mr-2"}} - {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: - {{.Verification.SigningSSHKey.Fingerprint}} - {{end}} - {{end}} - {{end}} -
-
- {{end}} {{if .NoteRendered}}
{{svg "octicon-note" 16 "tw-mr-2"}} diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index bb5d2a0394778..c8620a8eaed4f 100644 --- a/templates/repo/commits_list.tmpl +++ b/templates/repo/commits_list.tmpl @@ -1,62 +1,10 @@
- - - - - - - - - - - +
+
    {{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}} {{range .Commits}} -
- - - - {{if .Committer}} - - {{else}} - - {{end}} - + {{end}} + {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}} + + +
+ {{if .Signature}} + {{template "repo/signature_badge" dict "root" $ "verification" .Verification "shortsha" (ShortSha .ID.String)}} {{end}} - -
+
+ {{$class := "ui sha label"}} + {{$commitShaLink := ""}} + {{if $.PageIsWiki}} + {{$commitShaLink = (printf "%s/wiki/commit/%s" $commitRepoLink (PathEscape .ID.String))}} + {{else if $.PageIsPullCommits}} + {{$commitShaLink = (printf "%s/pulls/%d/commits/%s" $commitRepoLink $.Issue.Index (PathEscape .ID.String))}} + {{else if $.Reponame}} + {{$commitShaLink = (printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String))}} + {{end}} + + {{ShortSha .ID.String}} + +
+
+ + {{if not $.PageIsWiki}}{{/* at the moment, wiki doesn't support "view at history point*/}} + {{$viewCommitLink := printf "%s/src/commit/%s" $commitRepoLink (PathEscape .ID.String)}} + {{if $.FileName}}{{$viewCommitLink = printf "%s/%s" $viewCommitLink (PathEscapeSegments $.FileName)}}{{end}} + {{svg "octicon-file-code"}} + {{end}} +
+ + {{end}} - -
{{ctx.Locale.Tr "repo.commits.author"}}{{StringUtils.ToUpper $.Repository.ObjectFormatName}}{{ctx.Locale.Tr "repo.commits.message"}}{{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"}} - {{$userName}} - {{end}} -
-
- {{$class := "ui sha label"}} - {{if .Signature}} - {{$class = (print $class " isSigned")}} - {{if .Verification.Verified}} - {{if eq .Verification.TrustStatus "trusted"}} - {{$class = (print $class " isVerified")}} - {{else if eq .Verification.TrustStatus "untrusted"}} - {{$class = (print $class " isVerifiedUntrusted")}} - {{else}} - {{$class = (print $class " isVerifiedUnmatched")}} - {{end}} - {{else if .Verification.Warning}} - {{$class = (print $class " isWarning")}} - {{end}} - {{end}} - {{$commitShaLink := ""}} - {{if $.PageIsWiki}} - {{$commitShaLink = (printf "%s/wiki/commit/%s" $commitRepoLink (PathEscape .ID.String))}} - {{else if $.PageIsPullCommits}} - {{$commitShaLink = (printf "%s/pulls/%d/commits/%s" $commitRepoLink $.Issue.Index (PathEscape .ID.String))}} - {{else if $.Reponame}} - {{$commitShaLink = (printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String))}} - {{end}} - - {{ShortSha .ID.String}} - {{if .Signature}}{{template "repo/shabox_badge" dict "root" $ "verification" .Verification}}{{end}} - - +
  • +
    {{if $.PageIsWiki}} {{.Summary | RenderEmoji $.Context}} @@ -66,28 +14,61 @@ {{end}} {{if IsMultilineCommitMessage .Message}} - + {{end}} - {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}} {{if IsMultilineCommitMessage .Message}} -
    {{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}
    +
    {{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}
    {{end}} -
  • {{TimeSince .Committer.When ctx.Locale}}{{TimeSince .Author.When ctx.Locale}} - - {{if not $.PageIsWiki}}{{/* at the moment, wiki doesn't support "view at history point*/}} - {{$viewCommitLink := printf "%s/src/commit/%s" $commitRepoLink (PathEscape .ID.String)}} - {{if $.FileName}}{{$viewCommitLink = printf "%s/%s" $viewCommitLink (PathEscapeSegments $.FileName)}}{{end}} - {{svg "octicon-file-code"}} + +
    +
    + {{$userName := .Author.Name}} + {{if .User}} + {{if and .User.FullName DefaultShowFullName}} + {{$userName = .User.FullName}} + {{end}} + {{ctx.AvatarUtils.Avatar .User 20 "tw-mr-1"}}{{$userName}}, + {{else}} + {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 20 "tw-mr-1"}} + {{$userName}}, + {{end}} + {{if .Committer}} +
    {{TimeSince .Committer.When ctx.Locale}}
    + {{else}} +
    {{TimeSince .Author.When ctx.Locale}}
    + +
    diff --git a/templates/repo/commits_list_small.tmpl b/templates/repo/commits_list_small.tmpl index 4c67319b8c05a..ffdaa5888783e 100644 --- a/templates/repo/commits_list_small.tmpl +++ b/templates/repo/commits_list_small.tmpl @@ -13,36 +13,23 @@ {{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}} - - {{- RenderCommitMessageLinkSubject $.root.Context .Message $commitLink ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx) -}} - +
    + + {{- RenderCommitMessageLinkSubject $.root.Context .Message $commitLink ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx) -}} + - {{if IsMultilineCommitMessage .Message}} - - {{end}} + {{if IsMultilineCommitMessage .Message}} + + {{end}} +
    - + {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}} - {{$class := "ui sha label"}} {{if .Signature}} - {{$class = (print $class " isSigned")}} - {{if .Verification.Verified}} - {{if eq .Verification.TrustStatus "trusted"}} - {{$class = (print $class " isVerified")}} - {{else if eq .Verification.TrustStatus "untrusted"}} - {{$class = (print $class " isVerifiedUntrusted")}} - {{else}} - {{$class = (print $class " isVerifiedUnmatched")}} - {{end}} - {{else if .Verification.Warning}} - {{$class = (print $class " isWarning")}} - {{end}} + {{template "repo/signature_badge" dict "root" $.root "verification" .Verification}} {{end}} - + {{ShortSha .ID.String}} - {{if .Signature}} - {{template "repo/shabox_badge" dict "root" $.root "verification" .Verification}} - {{end}}
    diff --git a/templates/repo/graph/commits.tmpl b/templates/repo/graph/commits.tmpl index a90c5309b09bb..070a26f7ee7fb 100644 --- a/templates/repo/graph/commits.tmpl +++ b/templates/repo/graph/commits.tmpl @@ -21,13 +21,15 @@ {{$class = (print $class " isWarning")}} {{end}} {{end}} - + {{ShortSha $commit.Commit.ID.String}} - {{- if $commit.Commit.Signature -}} - {{template "repo/shabox_badge" dict "root" $ "verification" $commit.Verification}} - {{- end -}} + {{- if $commit.Commit.Signature -}} + + {{template "repo/signature_badge" dict "root" $ "verification" $commit.Verification "shortsha" (ShortSha $commit.Commit.ID.String)}} + + {{- end -}} {{RenderCommitMessage $.Context $commit.Subject ($.Repository.ComposeMetas ctx)}} diff --git a/templates/repo/latest_commit.tmpl b/templates/repo/latest_commit.tmpl index 8bacb427bf324..f78d65667e8b5 100644 --- a/templates/repo/latest_commit.tmpl +++ b/templates/repo/latest_commit.tmpl @@ -14,18 +14,21 @@ {{.LatestCommit.Author.Name}} {{end}} {{end}} - - {{ShortSha .LatestCommit.ID.String}} - {{if .LatestCommit.Signature}} - {{template "repo/shabox_badge" dict "root" $ "verification" .LatestCommitVerification}} - {{end}} - - {{template "repo/commit_statuses" dict "Status" .LatestCommitStatus "Statuses" .LatestCommitStatuses}} {{$commitLink:= printf "%s/commit/%s" .RepoLink (PathEscape .LatestCommit.ID.String)}} - {{RenderCommitMessageLinkSubject $.Context .LatestCommit.Message $commitLink ($.Repository.ComposeMetas ctx)}} + + {{RenderCommitMessageLinkSubject $.Context .LatestCommit.Message $commitLink ($.Repository.ComposeMetas ctx)}} {{if IsMultilineCommitMessage .LatestCommit.Message}} -
    {{RenderCommitBody $.Context .LatestCommit.Message ($.Repository.ComposeMetas ctx)}}
    + {{template "repo/commit_statuses" dict "Status" .LatestCommitStatus "Statuses" .LatestCommitStatuses}} +
    {{RenderCommitBody $.Context .LatestCommit.Message ($.Repository.ComposeMetas ctx)}}
    + {{else}} + {{template "repo/commit_statuses" dict "Status" .LatestCommitStatus "Statuses" .LatestCommitStatuses}} {{end}}
    -{{end}} + {{if .LatestCommit.Signature}} + {{template "repo/signature_badge" dict "root" $ "verification" .LatestCommitVerification "shortsha" (ShortSha .LatestCommit.ID.String)}} + {{end}} + + {{ShortSha .LatestCommit.ID.String}} + +{{end}} \ No newline at end of file diff --git a/templates/repo/shabox_badge.tmpl b/templates/repo/shabox_badge.tmpl deleted file mode 100644 index 939292ba914e1..0000000000000 --- a/templates/repo/shabox_badge.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -
    - {{if .verification.Verified}} -
    - {{if ne .verification.SigningUser.ID 0}} - {{svg "gitea-lock"}} - {{ctx.AvatarUtils.Avatar .verification.SigningUser 28 "signature"}} - {{else}} - {{svg "gitea-lock-cog"}} - {{ctx.AvatarUtils.AvatarByEmail .verification.SigningEmail "" 28 "signature"}} - {{end}} -
    - {{else}} - {{svg "gitea-unlock"}} - {{end}} -
    diff --git a/templates/repo/signature_badge.tmpl b/templates/repo/signature_badge.tmpl new file mode 100644 index 0000000000000..51963a274c4ba --- /dev/null +++ b/templates/repo/signature_badge.tmpl @@ -0,0 +1,91 @@ +{{$base_classes := "show-modal tw-cursor-pointer tw-rounded-full tw-border tw-px-2 tw-py-0"}} +{{$verified_colors := "tw-border-success-border tw-bg-success-bg tw-text-success-text"}} +{{$unverified_colors := "tw-border-warning-border tw-bg-warning-bg tw-text-warning-text"}} +{{if .verification.Verified}} + {{if eq .verification.TrustStatus "trusted"}} +
    Verified
    + {{else if eq .verification.TrustStatus "untrusted"}} +
    Unverified
    + {{else}} +
    Unverified
    + {{end}} +{{else}} +
    Unverified
    +{{end}} + \ No newline at end of file From e8163996a5c098053e1a40cb119927ef18b648a3 Mon Sep 17 00:00:00 2001 From: Blender Defender Date: Wed, 29 May 2024 15:02:20 +0200 Subject: [PATCH 02/32] fix: Change indentation to tabs instead of spaces --- templates/repo/latest_commit.tmpl | 2 +- templates/repo/signature_badge.tmpl | 168 ++++++++++++++-------------- 2 files changed, 85 insertions(+), 85 deletions(-) diff --git a/templates/repo/latest_commit.tmpl b/templates/repo/latest_commit.tmpl index f78d65667e8b5..70807b2d0df5a 100644 --- a/templates/repo/latest_commit.tmpl +++ b/templates/repo/latest_commit.tmpl @@ -31,4 +31,4 @@ {{ShortSha .LatestCommit.ID.String}} -{{end}} \ No newline at end of file +{{end}} diff --git a/templates/repo/signature_badge.tmpl b/templates/repo/signature_badge.tmpl index 51963a274c4ba..be4ce492b2dd3 100644 --- a/templates/repo/signature_badge.tmpl +++ b/templates/repo/signature_badge.tmpl @@ -2,90 +2,90 @@ {{$verified_colors := "tw-border-success-border tw-bg-success-bg tw-text-success-text"}} {{$unverified_colors := "tw-border-warning-border tw-bg-warning-bg tw-text-warning-text"}} {{if .verification.Verified}} - {{if eq .verification.TrustStatus "trusted"}} -
    Verified
    - {{else if eq .verification.TrustStatus "untrusted"}} -
    Unverified
    - {{else}} -
    Unverified
    - {{end}} + {{if eq .verification.TrustStatus "trusted"}} +
    Verified
    + {{else if eq .verification.TrustStatus "untrusted"}} +
    Unverified
    + {{else}} +
    Unverified
    + {{end}} {{else}} -
    Unverified
    +
    Unverified
    {{end}} \ No newline at end of file +
    + {{if and .verification.Verified (eq .verification.TrustStatus "trusted")}} + {{svg "octicon-verified" 20 "tw-mr-2"}} + Verified commit + {{else}} + {{svg "octicon-unverified" 20 "tw-mr-2"}} + Unverified commit + {{end}} +
    +
    +
    + {{if .verification.Verified}} + {{if ne .verification.SigningUser.ID 0}} + {{if eq .verification.TrustStatus "trusted"}} + {{ctx.Locale.Tr "repo.commits.signed_by"}}: + {{else if eq .verification.TrustStatus "untrusted"}} + {{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user"}}: + {{else}} + {{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: + {{end}} + {{ctx.AvatarUtils.Avatar .verification.SigningUser 16 "tw-mr-2"}} + {{.verification.SigningUser.GetDisplayName}} + {{else}} + {{svg "gitea-lock-cog" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.commits.signed_by"}}: + {{ctx.AvatarUtils.AvatarByEmail .verification.SigningEmail "" 16 "tw-mr-2"}} + {{.verification.SigningUser.GetDisplayName}} + {{end}} + {{else}} + {{ctx.Locale.Tr .verification.Reason}} + {{end}} +
    +
    + {{if .verification.Verified}} + {{if ne .verification.SigningUser.ID 0}} + {{if .verification.SigningSSHKey}} + {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: + {{.verification.SigningSSHKey.Fingerprint}} + {{else}} + {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: + {{.verification.SigningKey.PaddedKeyID}} + {{end}} + {{else}} + {{if .verification.SigningSSHKey}} + {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: + {{.verification.SigningSSHKey.Fingerprint}} + {{else}} + {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: + {{.verification.SigningKey.PaddedKeyID}} + {{end}} + {{end}} + {{else if .verification.Warning}} + {{if .verification.SigningSSHKey}} + {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: + {{.verification.SigningSSHKey.Fingerprint}} + {{else}} + {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: + {{.verification.SigningKey.PaddedKeyID}} + {{end}} + {{else}} + {{if .verification.SigningKey}} + {{if ne .verification.SigningKey.KeyID ""}} + {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: + {{.verification.SigningKey.PaddedKeyID}} + {{end}} + {{end}} + {{if .verification.SigningSSHKey}} + {{if ne .verification.SigningSSHKey.Fingerprint ""}} + {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: + {{.verification.SigningSSHKey.Fingerprint}} + {{end}} + {{end}} + {{end}} +
    +
    +
    From 95fe298fd59f61825f7c34a95fbc1127b799047a Mon Sep 17 00:00:00 2001 From: Blender Defender Date: Thu, 30 May 2024 21:57:00 +0200 Subject: [PATCH 03/32] refactor: Move the texts "Verified commit" and "Unverified commit" to the locale file --- options/locale/locale_en-US.ini | 3 +++ templates/repo/signature_badge.tmpl | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 539715b3f9c91..aea7da5b63fb8 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -159,6 +159,9 @@ filter.private = Private no_results_found = No results found. +verified_commit = Verified commit +unverified_commit = Unverified commit + [search] search = Search... type_tooltip = Search type diff --git a/templates/repo/signature_badge.tmpl b/templates/repo/signature_badge.tmpl index be4ce492b2dd3..99ffe74ab21b3 100644 --- a/templates/repo/signature_badge.tmpl +++ b/templates/repo/signature_badge.tmpl @@ -16,10 +16,10 @@
    {{if and .verification.Verified (eq .verification.TrustStatus "trusted")}} {{svg "octicon-verified" 20 "tw-mr-2"}} - Verified commit + {{ctx.Locale.Tr "verified_commit"}} {{else}} {{svg "octicon-unverified" 20 "tw-mr-2"}} - Unverified commit + {{ctx.Locale.Tr "unverified_commit"}} {{end}}
    From 682a1e66b1e8ce9a2a8027d287d688848a9819b6 Mon Sep 17 00:00:00 2001 From: Blender Defender Date: Thu, 30 May 2024 22:15:16 +0200 Subject: [PATCH 04/32] refactor: Remove classnames that don't have any effect This commit removes all classnames (like for example `ui text`) that don't have any effect on the elements they're applied to. --- templates/repo/commits_list.tmpl | 7 ++--- templates/repo/commits_list_small.tmpl | 4 +-- templates/repo/graph/commits.tmpl | 21 ++------------ templates/repo/latest_commit.tmpl | 2 +- templates/repo/signature_badge.tmpl | 40 ++++++++++++++------------ 5 files changed, 30 insertions(+), 44 deletions(-) diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index c8620a8eaed4f..0ad1199bd2185 100644 --- a/templates/repo/commits_list.tmpl +++ b/templates/repo/commits_list.tmpl @@ -3,7 +3,7 @@