From 08027847441f02f8a626dc44128f85d9a18d2269 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 8 Mar 2024 22:02:05 +0100 Subject: [PATCH] Replace more gt- with tw- (#29678) This will conclude the trivial class replacements. (cherry picked from commit 82e102f8b09faf1ac2786ccad36d4a20fcb392b8) --- services/auth/source/oauth2/providers.go | 2 +- templates/repo/commit_statuses.tmpl | 2 +- .../repo/issue/view_content/comments.tmpl | 8 +++---- templates/repo/pulse.tmpl | 12 +++++----- templates/shared/issuelist.tmpl | 6 ++--- templates/user/dashboard/issues.tmpl | 2 +- templates/user/dashboard/milestones.tmpl | 2 +- web_src/css/helpers.css | 23 ------------------- 8 files changed, 17 insertions(+), 40 deletions(-) diff --git a/services/auth/source/oauth2/providers.go b/services/auth/source/oauth2/providers.go index ac32647839..c3edae4ab6 100644 --- a/services/auth/source/oauth2/providers.go +++ b/services/auth/source/oauth2/providers.go @@ -59,7 +59,7 @@ func (p *AuthSourceProvider) DisplayName() string { func (p *AuthSourceProvider) IconHTML(size int) template.HTML { if p.iconURL != "" { - img := fmt.Sprintf(`%s`, + img := fmt.Sprintf(`%s`, size, size, html.EscapeString(p.iconURL), html.EscapeString(p.DisplayName()), diff --git a/templates/repo/commit_statuses.tmpl b/templates/repo/commit_statuses.tmpl index 74c20a6a2c..b035e74c2f 100644 --- a/templates/repo/commit_statuses.tmpl +++ b/templates/repo/commit_statuses.tmpl @@ -1,6 +1,6 @@ {{if .Statuses}} {{if and (eq (len .Statuses) 1) .Status.TargetURL}} - + {{template "repo/commit_status" .Status}} {{else}} diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index bc2fd48e67..37ec98a3de 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -80,7 +80,7 @@ {{else if eq .Type 1}}
- {{svg "octicon-dot-fill"}} + {{svg "octicon-dot-fill"}} {{if not .OriginalAuthor}} {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} @@ -95,7 +95,7 @@
{{else if eq .Type 2}}
- {{svg "octicon-circle-slash"}} + {{svg "octicon-circle-slash"}} {{if not .OriginalAuthor}} {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} @@ -110,7 +110,7 @@
{{else if eq .Type 28}}
- {{svg "octicon-git-merge"}} + {{svg "octicon-git-merge"}} {{if not .OriginalAuthor}} {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} @@ -383,7 +383,7 @@ {{ctx.AvatarUtils.Avatar .Poster 40}} {{end}} - {{svg (printf "octicon-%s" .Review.Type.Icon)}} + {{svg (printf "octicon-%s" .Review.Type.Icon)}} {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} {{if eq .Review.Type 1}} diff --git a/templates/repo/pulse.tmpl b/templates/repo/pulse.tmpl index e6a59ea8c6..5943ae0434 100644 --- a/templates/repo/pulse.tmpl +++ b/templates/repo/pulse.tmpl @@ -108,7 +108,7 @@ {{end}} {{if gt .Activity.PublishedReleaseCount 0}} -

+

{{svg "octicon-tag" 16 "gt-mr-3"}} {{ctx.Locale.Tr "repo.activity.title.releases_published_by" (ctx.Locale.TrN .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n" .Activity.PublishedReleaseCount) @@ -130,7 +130,7 @@ {{end}} {{if gt .Activity.MergedPRCount 0}} -

+

{{svg "octicon-git-pull-request" 16 "gt-mr-3"}} {{ctx.Locale.Tr "repo.activity.title.prs_merged_by" (ctx.Locale.TrN .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.MergedPRCount) @@ -149,7 +149,7 @@ {{end}} {{if gt .Activity.OpenedPRCount 0}} -

+

{{svg "octicon-git-branch" 16 "gt-mr-3"}} {{ctx.Locale.Tr "repo.activity.title.prs_opened_by" (ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.OpenedPRCount) @@ -168,7 +168,7 @@ {{end}} {{if gt .Activity.ClosedIssueCount 0}} -

+

{{svg "octicon-issue-closed" 16 "gt-mr-3"}} {{ctx.Locale.Tr "repo.activity.title.issues_closed_from" (ctx.Locale.TrN .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.ClosedIssueCount) @@ -187,7 +187,7 @@ {{end}} {{if gt .Activity.OpenedIssueCount 0}} -

+

{{svg "octicon-issue-opened" 16 "gt-mr-3"}} {{ctx.Locale.Tr "repo.activity.title.issues_created_by" (ctx.Locale.TrN .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.OpenedIssueCount) @@ -206,7 +206,7 @@ {{end}} {{if gt .Activity.UnresolvedIssueCount 0}} -

+

{{svg "octicon-comment-discussion" 16 "gt-mr-3"}} {{ctx.Locale.TrN .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n" .Activity.UnresolvedIssueCount}}

diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl index e8a0079c1c..a90188297f 100644 --- a/templates/shared/issuelist.tmpl +++ b/templates/shared/issuelist.tmpl @@ -13,7 +13,7 @@
- {{RenderEmoji $.Context .Title | RenderCodeBlock}} + {{RenderEmoji $.Context .Title | RenderCodeBlock}} {{if .IsPull}} {{if (index $.CommitStatuses .PullRequest.ID)}} {{template "repo/commit_statuses" dict "Status" (index $.CommitLastStatus .PullRequest.ID) "Statuses" (index $.CommitStatuses .PullRequest.ID)}} @@ -36,7 +36,7 @@ {{if .Assignees}}
{{range .Assignees}} - + {{ctx.AvatarUtils.Avatar . 20}} {{end}} @@ -44,7 +44,7 @@ {{end}} {{if .NumComments}} diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl index fd5960c31e..7b7023cfaa 100644 --- a/templates/user/dashboard/issues.tmpl +++ b/templates/user/dashboard/issues.tmpl @@ -4,7 +4,7 @@
-