From 6e7991316c47cd061ec8de212bcb900e477b85b8 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 22 Feb 2026 23:56:33 +0100 Subject: [PATCH] Refactor text utility classes to Tailwind CSS (#36703) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace Fomantic/custom CSS text utility classes with their Tailwind equivalents: - `.text.` compound classes → `tw-text-` classes - `.text.small` (`font-size: 0.75em`) → `tw-text-xs` (11px) - `.text.truncate` (`overflow-x: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block`) → `tw-inline-block tw-truncate` Remove the now-unused CSS rules from `base.css` and `dashboard.css`. --------- Co-authored-by: Claude Opus 4.6 --- models/issues/review.go | 18 ++--- .../renderhelper_issueicontitle_test.go | 4 +- templates/admin/org/list.tmpl | 2 +- templates/admin/packages/list.tmpl | 4 +- templates/admin/repo/list.tmpl | 4 +- templates/admin/stacktrace-row.tmpl | 2 +- templates/devtest/flex-list.tmpl | 8 +-- templates/install.tmpl | 6 +- templates/org/header.tmpl | 2 +- templates/org/home.tmpl | 6 +- templates/org/member/members.tmpl | 2 +- .../org/settings/options_dangerzone.tmpl | 4 +- templates/org/team/members.tmpl | 2 +- templates/org/team/repositories.tmpl | 4 +- templates/org/team/sidebar.tmpl | 2 +- templates/org/team/teams.tmpl | 2 +- templates/package/content/maven.tmpl | 2 +- templates/package/shared/view.tmpl | 4 +- templates/projects/list.tmpl | 2 +- templates/repo/actions/list.tmpl | 2 +- templates/repo/actions/runs_list.tmpl | 2 +- templates/repo/actions/status.tmpl | 14 ++-- .../actions/workflow_dispatch_inputs.tmpl | 2 +- templates/repo/branch/list.tmpl | 4 +- templates/repo/commit_page.tmpl | 6 +- templates/repo/commit_status.tmpl | 12 ++-- templates/repo/diff/comments.tmpl | 6 +- templates/repo/diff/compare.tmpl | 8 +-- templates/repo/diff/conversation.tmpl | 2 +- .../repo/issue/branch_selector_field.tmpl | 4 +- templates/repo/issue/card.tmpl | 6 +- templates/repo/issue/milestone_issues.tmpl | 2 +- templates/repo/issue/milestones.tmpl | 4 +- templates/repo/issue/sidebar/due_date.tmpl | 2 +- .../issue/sidebar/issue_dependencies.tmpl | 6 +- .../repo/issue/sidebar/reviewer_list.tmpl | 4 +- templates/repo/issue/view_content.tmpl | 6 +- .../repo/issue/view_content/attachments.tmpl | 2 +- .../repo/issue/view_content/comments.tmpl | 4 +- .../view_content/comments_authorlink.tmpl | 2 +- .../repo/issue/view_content/conversation.tmpl | 4 +- .../issue/view_content/pull_merge_box.tmpl | 54 +++++++-------- templates/repo/migrate/migrating.tmpl | 2 +- templates/repo/pulls/status.tmpl | 4 +- templates/repo/pulse.tmpl | 12 ++-- templates/repo/release/list.tmpl | 2 +- templates/repo/release/new.tmpl | 2 +- templates/repo/settings/collaboration.tmpl | 2 +- templates/repo/settings/deploy_keys.tmpl | 4 +- templates/repo/settings/githooks.tmpl | 2 +- templates/repo/settings/lfs_file_find.tmpl | 2 +- templates/repo/settings/options.tmpl | 14 ++-- .../repo/settings/webhook/base_list.tmpl | 4 +- templates/repo/settings/webhook/history.tmpl | 8 +-- templates/repo/view_file.tmpl | 2 +- templates/repo/view_list.tmpl | 4 +- templates/shared/issueicon.tmpl | 14 ++-- templates/shared/issuelist.tmpl | 8 +-- templates/shared/repo/list.tmpl | 4 +- templates/shared/user/authorlink.tmpl | 2 +- templates/shared/user/block_user_dialog.tmpl | 2 +- templates/shared/user/org_profile_avatar.tmpl | 2 +- templates/shared/user/profile_big_avatar.tmpl | 6 +- templates/user/dashboard/feeds.tmpl | 18 ++--- templates/user/dashboard/milestones.tmpl | 4 +- .../user/notification/notification_div.tmpl | 6 +- templates/user/settings/applications.tmpl | 4 +- templates/user/settings/keys_gpg.tmpl | 2 +- templates/user/settings/keys_principal.tmpl | 2 +- templates/user/settings/keys_ssh.tmpl | 4 +- templates/user/settings/profile.tmpl | 8 +-- templates/user/settings/repos.tmpl | 6 +- .../user/settings/security/accountlinks.tmpl | 2 +- tests/integration/repo_commits_test.go | 10 +-- web_src/css/base.css | 68 ------------------- web_src/css/dashboard.css | 5 -- web_src/js/components/ActionRunStatus.vue | 14 ++-- web_src/js/components/ContextPopup.vue | 4 +- web_src/js/components/DashboardRepoList.vue | 20 +++--- web_src/js/components/DiffCommitSelector.vue | 8 +-- web_src/js/components/DiffFileTreeItem.vue | 14 ++-- web_src/js/components/RepoActionView.vue | 8 +-- .../js/components/RepoBranchTagSelector.vue | 2 +- web_src/js/components/RepoCodeFrequency.vue | 2 +- web_src/js/components/RepoContributors.vue | 6 +- web_src/js/components/RepoRecentCommits.vue | 2 +- web_src/js/features/comp/TextExpander.ts | 4 +- web_src/js/features/issue.ts | 16 ++--- web_src/js/features/repo-issue-content.ts | 2 +- 89 files changed, 254 insertions(+), 327 deletions(-) diff --git a/models/issues/review.go b/models/issues/review.go index 10e3fcd664..22e2e186d9 100644 --- a/models/issues/review.go +++ b/models/issues/review.go @@ -215,25 +215,25 @@ func (r *Review) LoadAttributes(ctx context.Context) (err error) { return err } -// HTMLTypeColorName returns the color used in the ui indicating the review -func (r *Review) HTMLTypeColorName() string { +// HTMLTypeColorClass returns the CSS class used in the ui indicating the review +func (r *Review) HTMLTypeColorClass() string { switch r.Type { case ReviewTypeApprove: if !r.Official { - return "grey" + return "tw-text-text-light" } if r.Stale { - return "yellow" + return "tw-text-yellow" } - return "green" + return "tw-text-green" case ReviewTypeComment: - return "grey" + return "tw-text-text-light" case ReviewTypeReject: - return "red" + return "tw-text-red" case ReviewTypeRequest: - return "yellow" + return "tw-text-yellow" } - return "grey" + return "tw-text-text-light" } // TooltipContent returns the locale string describing the review type diff --git a/services/markup/renderhelper_issueicontitle_test.go b/services/markup/renderhelper_issueicontitle_test.go index 25907f4b77..774c340d03 100644 --- a/services/markup/renderhelper_issueicontitle_test.go +++ b/services/markup/renderhelper_issueicontitle_test.go @@ -26,7 +26,7 @@ func TestRenderHelperIssueIconTitle(t *testing.T) { IssueIndex: 1, }) assert.NoError(t, err) - assert.Equal(t, `octicon-issue-opened(16/text green) issue1 (#1)`, string(htm)) + assert.Equal(t, `octicon-issue-opened(16/tw-text-green) issue1 (#1)`, string(htm)) ctx, _ = contexttest.MockContext(t, "/", contexttest.MockContextOption{Render: templates.PageRenderer()}) htm, err = renderRepoIssueIconTitle(ctx, markup.RenderIssueIconTitleOptions{ @@ -36,7 +36,7 @@ func TestRenderHelperIssueIconTitle(t *testing.T) { IssueIndex: 1, }) assert.NoError(t, err) - assert.Equal(t, `octicon-issue-opened(16/text green) issue1 (user2/repo1#1)`, string(htm)) + assert.Equal(t, `octicon-issue-opened(16/tw-text-green) issue1 (user2/repo1#1)`, string(htm)) ctx, _ = contexttest.MockContext(t, "/", contexttest.MockContextOption{Render: templates.PageRenderer()}) _, err = renderRepoIssueIconTitle(ctx, markup.RenderIssueIconTitleOptions{ diff --git a/templates/admin/org/list.tmpl b/templates/admin/org/list.tmpl index c2c0280e4c..a4317b8c4e 100644 --- a/templates/admin/org/list.tmpl +++ b/templates/admin/org/list.tmpl @@ -54,7 +54,7 @@ {{if and DefaultShowFullName .FullName}}{{.FullName}} ({{.Name}}){{else}}{{.Name}}{{end}} {{if .Visibility.IsPrivate}} - {{svg "octicon-lock"}} + {{svg "octicon-lock"}} {{end}} {{if eq .Type 3}}{{/* Reserved organization */}} {{ctx.Locale.Tr "admin.users.reserved"}} diff --git a/templates/admin/packages/list.tmpl b/templates/admin/packages/list.tmpl index 553130ae09..395c63053b 100644 --- a/templates/admin/packages/list.tmpl +++ b/templates/admin/packages/list.tmpl @@ -57,7 +57,7 @@ {{.Owner.Name}} {{if .Owner.Visibility.IsPrivate}} - {{svg "octicon-lock"}} + {{svg "octicon-lock"}} {{end}} {{.Package.Type.Name}} @@ -72,7 +72,7 @@ {{FileSize .CalculateBlobSize}} {{DateUtils.AbsoluteShort .Version.CreatedUnix}} - {{svg "octicon-trash"}} diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl index 0af9df2551..c72daba322 100644 --- a/templates/admin/repo/list.tmpl +++ b/templates/admin/repo/list.tmpl @@ -49,7 +49,7 @@ {{.Owner.Name}} {{if .Owner.Visibility.IsPrivate}} - {{svg "octicon-lock"}} + {{svg "octicon-lock"}} {{end}} @@ -85,7 +85,7 @@ {{DateUtils.AbsoluteShort .UpdatedUnix}} {{DateUtils.AbsoluteShort .CreatedUnix}} - {{svg "octicon-trash"}} diff --git a/templates/admin/stacktrace-row.tmpl b/templates/admin/stacktrace-row.tmpl index 356c517935..94c4212d88 100644 --- a/templates/admin/stacktrace-row.tmpl +++ b/templates/admin/stacktrace-row.tmpl @@ -20,7 +20,7 @@ {{svg "octicon-trash" 16 "text-red"}} + >{{svg "octicon-trash" 16 "tw-text-red"}} {{end}} diff --git a/templates/devtest/flex-list.tmpl b/templates/devtest/flex-list.tmpl index 0db84b0c59..c0863ba4f0 100644 --- a/templates/devtest/flex-list.tmpl +++ b/templates/devtest/flex-list.tmpl @@ -48,7 +48,7 @@
Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content - Truncate very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content + Truncate very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content
@@ -65,7 +65,7 @@
diff --git a/templates/install.tmpl b/templates/install.tmpl index 0aec52f27b..acfafd3cc7 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -160,7 +160,7 @@
- + {{ctx.Locale.Tr "install.email_title"}}
@@ -200,7 +200,7 @@
- + {{ctx.Locale.Tr "install.server_service_title"}}
@@ -298,7 +298,7 @@
- + {{ctx.Locale.Tr "install.admin_title"}}

{{ctx.Locale.Tr "install.admin_setting_desc"}}

diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl index 33850b55ba..040164ba86 100644 --- a/templates/org/header.tmpl +++ b/templates/org/header.tmpl @@ -19,7 +19,7 @@
{{if .RenderedDescription}}
{{.RenderedDescription}}
{{end}} -
+
{{if .Org.Location}}
{{svg "octicon-location"}} {{.Org.Location}}
{{end}} {{if .Org.Website}}
{{svg "octicon-link"}} {{.Org.Website}}
{{end}} {{if .IsSigned}} diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index 3cde3554c9..ea294980e0 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -49,7 +49,7 @@ {{if .NumMembers}}

{{ctx.Locale.Tr "org.members"}} - {{.NumMembers}} {{svg "octicon-chevron-right"}} + {{.NumMembers}} {{svg "octicon-chevron-right"}}

{{$isMember := .IsOrganizationMember}} @@ -63,13 +63,13 @@ {{if .IsOrganizationMember}}
{{range .Teams}}
{{.Name}} -

+

{{.NumMembers}} {{ctx.Locale.Tr "org.lower_members"}} · {{.NumRepos}} {{ctx.Locale.Tr "org.lower_repositories"}}

diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl index 2d0f4bc423..9b9f060770 100644 --- a/templates/org/member/members.tmpl +++ b/templates/org/member/members.tmpl @@ -28,7 +28,7 @@ {{ctx.Locale.Tr "admin.users.2fa"}} {{if index $.MembersTwoFaStatus .ID}} - {{svg "octicon-check"}} + {{svg "octicon-check"}} {{else}} {{svg "octicon-x"}} {{end}} diff --git a/templates/org/settings/options_dangerzone.tmpl b/templates/org/settings/options_dangerzone.tmpl index 036ddea230..df513c5525 100644 --- a/templates/org/settings/options_dangerzone.tmpl +++ b/templates/org/settings/options_dangerzone.tmpl @@ -87,7 +87,7 @@
@@ -125,7 +125,7 @@
diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index f7290b2f13..d2dd9d9ab9 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -45,7 +45,7 @@
{{else}}
- {{ctx.Locale.Tr "org.teams.members.none"}} + {{ctx.Locale.Tr "org.teams.members.none"}}
{{end}}
diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl index b7a816b852..7b576d85bc 100644 --- a/templates/org/team/repositories.tmpl +++ b/templates/org/team/repositories.tmpl @@ -32,7 +32,7 @@ {{template "repo/icon" .}}
@@ -46,7 +46,7 @@
{{else}}
- {{ctx.Locale.Tr "org.teams.repos.none"}} + {{ctx.Locale.Tr "org.teams.repos.none"}}
{{end}}
diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl index 00800a3d1f..01047722cd 100644 --- a/templates/org/team/sidebar.tmpl +++ b/templates/org/team/sidebar.tmpl @@ -21,7 +21,7 @@ {{if .Team.Description}} {{.Team.Description}} {{else}} - {{ctx.Locale.Tr "org.teams.no_desc"}} + {{ctx.Locale.Tr "org.teams.no_desc"}} {{end}}
{{if eq .Team.LowerName "owners"}} diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl index 50f4f7e97d..c27f34d09d 100644 --- a/templates/org/team/teams.tmpl +++ b/templates/org/team/teams.tmpl @@ -14,7 +14,7 @@ {{range .Teams}}
- {{.Name}} + {{.Name}}
{{ctx.Locale.Tr "view"}} {{if .IsMember ctx $.SignedUser.ID}} diff --git a/templates/package/content/maven.tmpl b/templates/package/content/maven.tmpl index e98fc53692..ea09023d59 100644 --- a/templates/package/content/maven.tmpl +++ b/templates/package/content/maven.tmpl @@ -65,7 +65,7 @@ {{svg "octicon-package-dependencies" 16 ""}}
{{.GroupID}}:{{.ArtifactID}}
-
{{.Version}}
+
{{.Version}}
{{end}} diff --git a/templates/package/shared/view.tmpl b/templates/package/shared/view.tmpl index 52673accf9..cfdc114e1b 100644 --- a/templates/package/shared/view.tmpl +++ b/templates/package/shared/view.tmpl @@ -76,7 +76,7 @@ {{range .PackageDescriptor.Files}}
{{.File.Name}} - {{FileSize .Blob.Size}} + {{FileSize .Blob.Size}}
{{end}}
@@ -88,7 +88,7 @@ {{range .LatestVersions}}
{{.Version}} - {{DateUtils.AbsoluteShort .CreatedUnix}} + {{DateUtils.AbsoluteShort .CreatedUnix}}
{{end}}
diff --git a/templates/projects/list.tmpl b/templates/projects/list.tmpl index c37f479fd0..7ff511e2de 100644 --- a/templates/projects/list.tmpl +++ b/templates/projects/list.tmpl @@ -67,7 +67,7 @@ {{else}} {{svg "octicon-skip" 14}}{{ctx.Locale.Tr "repo.projects.close"}} {{end}} - {{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}} + {{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}}
{{end}}
diff --git a/templates/repo/actions/list.tmpl b/templates/repo/actions/list.tmpl index fe8c26b523..8bbddebf3f 100644 --- a/templates/repo/actions/list.tmpl +++ b/templates/repo/actions/list.tmpl @@ -14,7 +14,7 @@ {{.Entry.Name}} {{if .ErrMsg}} - {{svg "octicon-alert" 16 "text red"}} + {{svg "octicon-alert" 16 "tw-text-red"}} {{end}} {{if $.ActionsConfig.IsWorkflowDisabled .Entry.Name}} diff --git a/templates/repo/actions/runs_list.tmpl b/templates/repo/actions/runs_list.tmpl index ed20039ebd..5c64a0f5ee 100644 --- a/templates/repo/actions/runs_list.tmpl +++ b/templates/repo/actions/runs_list.tmpl @@ -29,7 +29,7 @@ {{$errMsg := index $.RunErrors $run.ID}} {{if $errMsg}} - {{svg "octicon-alert" 16 "text red"}} + {{svg "octicon-alert" 16 "tw-text-red"}} {{end}}
diff --git a/templates/repo/actions/status.tmpl b/templates/repo/actions/status.tmpl index 1e5465a97f..f44245086e 100644 --- a/templates/repo/actions/status.tmpl +++ b/templates/repo/actions/status.tmpl @@ -6,18 +6,18 @@ {{- $className := Iif .className .className "" -}} {{if eq .status "success"}} - {{svg "octicon-check-circle-fill" $size (printf "text green %s" $className)}} + {{svg "octicon-check-circle-fill" $size (printf "tw-text-green %s" $className)}} {{else if eq .status "skipped"}} - {{svg "octicon-skip" $size (printf "text grey %s" $className)}} + {{svg "octicon-skip" $size (printf "tw-text-text-light %s" $className)}} {{else if eq .status "cancelled"}} - {{svg "octicon-stop" $size (printf "text grey %s" $className)}} + {{svg "octicon-stop" $size (printf "tw-text-text-light %s" $className)}} {{else if eq .status "waiting"}} - {{svg "octicon-circle" $size (printf "text grey %s" $className)}} + {{svg "octicon-circle" $size (printf "tw-text-text-light %s" $className)}} {{else if eq .status "blocked"}} - {{svg "octicon-blocked" $size (printf "text yellow %s" $className)}} + {{svg "octicon-blocked" $size (printf "tw-text-yellow %s" $className)}} {{else if eq .status "running"}} - {{svg "gitea-running" $size (printf "text yellow rotate-clockwise %s" $className)}} + {{svg "gitea-running" $size (printf "tw-text-yellow rotate-clockwise %s" $className)}} {{else}}{{/*failure, unknown*/}} - {{svg "octicon-x-circle-fill" $size (printf "text red %s" $className)}} + {{svg "octicon-x-circle-fill" $size (printf "tw-text-red %s" $className)}} {{end}} diff --git a/templates/repo/actions/workflow_dispatch_inputs.tmpl b/templates/repo/actions/workflow_dispatch_inputs.tmpl index 37538a318f..085fd553de 100644 --- a/templates/repo/actions/workflow_dispatch_inputs.tmpl +++ b/templates/repo/actions/workflow_dispatch_inputs.tmpl @@ -40,7 +40,7 @@ {{range .workflows}} {{if and .ErrMsg (eq .Entry.Name $.CurWorkflow)}}
-
{{svg "octicon-alert" 16 "text red"}} {{.ErrMsg}}
+
{{svg "octicon-alert" 16 "tw-text-red"}} {{.ErrMsg}}
{{end}} {{end}} diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index 5b56b3ed42..593b9d454d 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -192,7 +192,7 @@ {{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}} {{if .DBBranch.IsDeleted}} @@ -250,7 +250,7 @@
- {{ctx.Locale.Tr "repo.branch.warning_rename_default_branch"}} + {{ctx.Locale.Tr "repo.branch.warning_rename_default_branch"}}
diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index 20f3f59e90..179f6018d3 100644 --- a/templates/repo/commit_page.tmpl +++ b/templates/repo/commit_page.tmpl @@ -140,11 +140,11 @@ {{end}}
- {{DateUtils.TimeSince .Commit.Author.When}} + {{DateUtils.TimeSince .Commit.Author.When}}
{{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 and .Verification.CommittingUser .Verification.CommittingUser.ID}} {{ctx.AvatarUtils.Avatar .Verification.CommittingUser 20}} {{.Commit.Committer.Name}} @@ -192,7 +192,7 @@ {{else}} {{.NoteCommit.Author.Name}} {{end}} - {{DateUtils.TimeSince .NoteCommit.Author.When}} + {{DateUtils.TimeSince .NoteCommit.Author.When}}
{{.NoteRendered | SanitizeHTML}}
diff --git a/templates/repo/commit_status.tmpl b/templates/repo/commit_status.tmpl index 7184f5f8eb..c61d381e0e 100644 --- a/templates/repo/commit_status.tmpl +++ b/templates/repo/commit_status.tmpl @@ -1,19 +1,19 @@ {{if eq .State "pending"}} - {{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}} + {{svg "octicon-dot-fill" 18 "commit-status icon tw-text-yellow"}} {{end}} {{if eq .State "success"}} - {{svg "octicon-check" 18 "commit-status icon text green"}} + {{svg "octicon-check" 18 "commit-status icon tw-text-green"}} {{end}} {{if eq .State "error"}} - {{svg "gitea-exclamation" 18 "commit-status icon text red"}} + {{svg "gitea-exclamation" 18 "commit-status icon tw-text-red"}} {{end}} {{if eq .State "failure"}} - {{svg "octicon-x" 18 "commit-status icon text red"}} + {{svg "octicon-x" 18 "commit-status icon tw-text-red"}} {{end}} {{if eq .State "warning"}} - {{svg "gitea-exclamation" 18 "commit-status icon text yellow"}} + {{svg "gitea-exclamation" 18 "commit-status icon tw-text-yellow"}} {{end}} {{if eq .State "skipped"}} - {{svg "octicon-skip" 18 "commit-status icon text grey"}} + {{svg "octicon-skip" 18 "commit-status icon tw-text-text-light"}} {{end}} diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl index 22829fbf8a..f1907b7ff1 100644 --- a/templates/repo/diff/comments.tmpl +++ b/templates/repo/diff/comments.tmpl @@ -13,11 +13,11 @@
{{if .OriginalAuthor}} - + {{svg (MigrationIcon $.root.Repository.GetOriginalURLHostname)}} {{.OriginalAuthor}} - + {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}} @@ -26,7 +26,7 @@ {{end}} {{else}} - + {{template "shared/user/namelink" .Poster}} {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}} diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl index 41d0a198f4..87c783f446 100644 --- a/templates/repo/diff/compare.tmpl +++ b/templates/repo/diff/compare.tmpl @@ -46,12 +46,12 @@
- + {{svg "octicon-git-branch"}} {{ctx.Locale.Tr "repo.branches"}} - + {{svg "octicon-tag"}} {{ctx.Locale.Tr "repo.tags"}} @@ -117,12 +117,12 @@
- + {{svg "octicon-git-branch"}} {{ctx.Locale.Tr "repo.branches"}} - + {{svg "octicon-tag"}} {{ctx.Locale.Tr "repo.tags"}} diff --git a/templates/repo/diff/conversation.tmpl b/templates/repo/diff/conversation.tmpl index eb2abfa7e9..f601b62fb3 100644 --- a/templates/repo/diff/conversation.tmpl +++ b/templates/repo/diff/conversation.tmpl @@ -9,7 +9,7 @@
{{if $resolved}}
-
+
{{svg "octicon-check"}} {{$resolveDoer.Name}} {{ctx.Locale.Tr "repo.issues.review.resolved_by"}} {{if $invalid}} diff --git a/templates/repo/issue/branch_selector_field.tmpl b/templates/repo/issue/branch_selector_field.tmpl index dc77755349..2f3e792d64 100644 --- a/templates/repo/issue/branch_selector_field.tmpl +++ b/templates/repo/issue/branch_selector_field.tmpl @@ -39,7 +39,7 @@ Still needs to figure out:
- + {{if not $.Page.Repository}}{{.Repo.FullName}}{{end}}#{{.Index}} {{$timeStr := DateUtils.TimeSince .GetLastEventTimestamp}} {{if .OriginalAuthor}} @@ -46,8 +46,8 @@ {{range index $.Page.LinkedPRs .ID}} {{end}} diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl index 591820080f..03cadfd295 100644 --- a/templates/repo/issue/milestone_issues.tmpl +++ b/templates/repo/issue/milestone_issues.tmpl @@ -36,7 +36,7 @@ {{else}} {{if .Milestone.DeadlineString}} - + {{svg "octicon-calendar"}} {{DateUtils.AbsoluteShort (.Milestone.DeadlineString|DateUtils.ParseLegacy)}} diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl index 8805c709a0..90e2a8ae3b 100644 --- a/templates/repo/issue/milestones.tmpl +++ b/templates/repo/issue/milestones.tmpl @@ -57,7 +57,7 @@ {{ctx.Locale.Tr "repo.milestones.closed" $closedDate}} {{else}} {{if .DeadlineString}} - + {{svg "octicon-calendar" 14}} {{DateUtils.AbsoluteShort (.DeadlineString|DateUtils.ParseLegacy)}} @@ -76,7 +76,7 @@ {{else}} {{svg "octicon-x" 14}}{{ctx.Locale.Tr "repo.milestones.close"}} {{end}} - {{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}} + {{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}}
{{end}}
diff --git a/templates/repo/issue/sidebar/due_date.tmpl b/templates/repo/issue/sidebar/due_date.tmpl index 4209304115..0e3d57eb72 100644 --- a/templates/repo/issue/sidebar/due_date.tmpl +++ b/templates/repo/issue/sidebar/due_date.tmpl @@ -3,7 +3,7 @@
{{if .Issue.DeadlineUnix}}
-
+
{{svg "octicon-calendar"}} {{DateUtils.AbsoluteLong .Issue.DeadlineUnix}}
diff --git a/templates/repo/issue/sidebar/issue_dependencies.tmpl b/templates/repo/issue/sidebar/issue_dependencies.tmpl index 14d7bb8c65..0eb7f26c70 100644 --- a/templates/repo/issue/sidebar/issue_dependencies.tmpl +++ b/templates/repo/issue/sidebar/issue_dependencies.tmpl @@ -25,7 +25,7 @@ #{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}} -
+
{{.Repository.OwnerName}}/{{.Repository.Name}}
@@ -59,7 +59,7 @@ #{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}} -
+
{{.Repository.OwnerName}}/{{.Repository.Name}}
@@ -84,7 +84,7 @@ #{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}
-
+
{{.Repository.OwnerName}}/{{.Repository.Name}}
diff --git a/templates/repo/issue/sidebar/reviewer_list.tmpl b/templates/repo/issue/sidebar/reviewer_list.tmpl index e1fd88b79a..99e033bcfd 100644 --- a/templates/repo/issue/sidebar/reviewer_list.tmpl +++ b/templates/repo/issue/sidebar/reviewer_list.tmpl @@ -82,7 +82,7 @@ {{end}} {{end}} - {{svg (printf "octicon-%s" .Review.Type.Icon) 16 (printf "text %s" (.Review.HTMLTypeColorName))}} + {{svg (printf "octicon-%s" .Review.Type.Icon) 16 .Review.HTMLTypeColorClass}}
@@ -98,7 +98,7 @@
- {{svg (printf "octicon-%s" .Type.Icon) 16 (printf "text %s" (.HTMLTypeColorName))}} + {{svg (printf "octicon-%s" .Type.Icon) 16 .HTMLTypeColorClass}}
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index e1fa13e5ec..13e007ad95 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -16,11 +16,11 @@
{{if .Issue.OriginalAuthor}} - + {{svg (MigrationIcon .Repository.GetOriginalURLHostname)}} {{.Issue.OriginalAuthor}} - + {{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}} @@ -30,7 +30,7 @@ {{ctx.AvatarUtils.Avatar .Issue.Poster 24}} - + {{template "shared/user/authorlink" .Issue.Poster}} {{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}} diff --git a/templates/repo/issue/view_content/attachments.tmpl b/templates/repo/issue/view_content/attachments.tmpl index e7ee7663af..86be494366 100644 --- a/templates/repo/issue/view_content/attachments.tmpl +++ b/templates/repo/issue/view_content/attachments.tmpl @@ -19,7 +19,7 @@
- {{.Size | FileSize}} + {{.Size | FileSize}}
{{end -}} diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index e7b4c8758d..a019c4bf3d 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -29,7 +29,7 @@
{{if .OriginalAuthor}} - + {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{.OriginalAuthor}} @@ -403,7 +403,7 @@ {{end}} {{if .OriginalAuthor}} - + {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{.OriginalAuthor}} diff --git a/templates/repo/issue/view_content/comments_authorlink.tmpl b/templates/repo/issue/view_content/comments_authorlink.tmpl index f652a0bec3..fd07bd2b1c 100644 --- a/templates/repo/issue/view_content/comments_authorlink.tmpl +++ b/templates/repo/issue/view_content/comments_authorlink.tmpl @@ -1,5 +1,5 @@ {{if .comment.OriginalAuthor}} - + {{svg (MigrationIcon .ctxData.Repository.GetOriginalURLHostname)}} {{.comment.OriginalAuthor}} diff --git a/templates/repo/issue/view_content/conversation.tmpl b/templates/repo/issue/view_content/conversation.tmpl index 01261b0a56..dd515933db 100644 --- a/templates/repo/issue/view_content/conversation.tmpl +++ b/templates/repo/issue/view_content/conversation.tmpl @@ -69,9 +69,9 @@ The variables in "ctx.Data" are different in each case, making this template fra {{ctx.AvatarUtils.Avatar .Poster 20}} {{end}} - + {{if .OriginalAuthor}} - + {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{.OriginalAuthor}} diff --git a/templates/repo/issue/view_content/pull_merge_box.tmpl b/templates/repo/issue/view_content/pull_merge_box.tmpl index 2e145c670e..c4b8dc4448 100644 --- a/templates/repo/issue/view_content/pull_merge_box.tmpl +++ b/templates/repo/issue/view_content/pull_merge_box.tmpl @@ -10,23 +10,23 @@ > {{$statusCheckData := .StatusCheckData}} {{$requiredStatusCheckState := $statusCheckData.RequiredChecksState}} -
{{svg "octicon-git-merge" 40}}
+
{{svg "octicon-git-merge" 40}}
{{if .LatestCommitStatus}}
@@ -190,7 +190,7 @@ {{end}} {{if .WillSign}}
- {{svg "octicon-lock" 16 "text green"}} + {{svg "octicon-lock" 16 "tw-text-green"}} {{ctx.Locale.Tr "repo.signing.will_sign" .SigningKeyMergeDisplay}}
{{else if .IsSigned}} @@ -306,7 +306,7 @@ {{else}} {{/* no merge style was set in repo setting: not or ($prUnit.PullRequestsConfig.AllowMerge ...) */}}
-
+
{{svg "octicon-x"}} {{ctx.Locale.Tr "repo.pulls.no_merge_desc"}}
@@ -326,27 +326,27 @@ {{else}} {{/* Merge conflict without specific file. Suggest manual merge, only if all reviews and status checks OK. */}} {{if .IsBlockedByApprovals}} -
+
{{svg "octicon-x"}} {{ctx.Locale.Tr "repo.pulls.blocked_by_approvals" .GrantedApprovals .ProtectedBranch.RequiredApprovals}}
{{else if .IsBlockedByRejection}} -
+
{{svg "octicon-x"}} {{ctx.Locale.Tr "repo.pulls.blocked_by_rejection"}}
{{else if .IsBlockedByOfficialReviewRequests}} -
+
{{svg "octicon-x"}} {{ctx.Locale.Tr "repo.pulls.blocked_by_official_review_requests"}}
{{else if .IsBlockedByOutdatedBranch}} -
+
{{svg "octicon-x"}} {{ctx.Locale.Tr "repo.pulls.blocked_by_outdated_branch"}}
{{else if .IsBlockedByChangedProtectedFiles}} -
+
{{svg "octicon-x"}} {{ctx.Locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n"}}
@@ -356,17 +356,17 @@ {{end}} {{else if and .EnableStatusCheck (not $requiredStatusCheckState.IsSuccess)}} -
+
{{svg "octicon-x"}} {{ctx.Locale.Tr "repo.pulls.required_status_check_failed"}}
{{else if and .RequireSigned (not .WillSign)}} -
+
{{svg "octicon-x"}} {{ctx.Locale.Tr "repo.pulls.require_signed_wont_sign"}}
{{else}} -
+
{{svg "octicon-x"}} {{ctx.Locale.Tr "repo.pulls.cannot_auto_merge_desc"}}
diff --git a/templates/repo/migrate/migrating.tmpl b/templates/repo/migrate/migrating.tmpl index 4e0bc48a54..34145cf475 100644 --- a/templates/repo/migrate/migrating.tmpl +++ b/templates/repo/migrate/migrating.tmpl @@ -68,7 +68,7 @@
diff --git a/templates/repo/pulls/status.tmpl b/templates/repo/pulls/status.tmpl index 7962b2ffbf..ec71c84b66 100644 --- a/templates/repo/pulls/status.tmpl +++ b/templates/repo/pulls/status.tmpl @@ -40,7 +40,7 @@ {{range .CommitStatuses}}
{{template "repo/commit_status" .}} -
{{.Context}} {{.Description}}
+
{{.Context}} {{.Description}}
{{if and $statusCheckData $statusCheckData.IsContextRequired}} {{if (call $statusCheckData.IsContextRequired .Context)}}
{{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}
{{end}} @@ -52,7 +52,7 @@ {{if $statusCheckData}} {{range $statusCheckData.MissingRequiredChecks}}
- {{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}} + {{svg "octicon-dot-fill" 18 "commit-status icon tw-text-yellow"}}
{{.}}
{{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}
diff --git a/templates/repo/pulse.tmpl b/templates/repo/pulse.tmpl index cbafee9ba9..1550c7e8cf 100644 --- a/templates/repo/pulse.tmpl +++ b/templates/repo/pulse.tmpl @@ -59,21 +59,21 @@
{{if .Permission.CanRead ctx.Consts.RepoUnitTypePullRequests}} - {{svg "octicon-git-pull-request"}} {{.Activity.MergedPRCount}}
+ {{svg "octicon-git-pull-request"}} {{.Activity.MergedPRCount}}
{{ctx.Locale.TrN .Activity.MergedPRCount "repo.activity.merged_prs_count_1" "repo.activity.merged_prs_count_n"}}
- {{svg "octicon-git-branch"}} {{.Activity.OpenedPRCount}}
+ {{svg "octicon-git-branch"}} {{.Activity.OpenedPRCount}}
{{ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.opened_prs_count_1" "repo.activity.opened_prs_count_n"}}
{{end}} {{if .Permission.CanRead ctx.Consts.RepoUnitTypeIssues}} - {{svg "octicon-issue-closed"}} {{.Activity.ClosedIssueCount}}
+ {{svg "octicon-issue-closed"}} {{.Activity.ClosedIssueCount}}
{{ctx.Locale.TrN .Activity.ClosedIssueCount "repo.activity.closed_issues_count_1" "repo.activity.closed_issues_count_n"}}
- {{svg "octicon-issue-opened"}} {{.Activity.OpenedIssueCount}}
+ {{svg "octicon-issue-opened"}} {{.Activity.OpenedIssueCount}}
{{ctx.Locale.TrN .Activity.OpenedIssueCount "repo.activity.new_issues_count_1" "repo.activity.new_issues_count_n"}}
{{end}} @@ -100,9 +100,9 @@ {{ctx.Locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_file_1" "repo.activity.git_stats_file_n" .Activity.Code.ChangedFiles}} {{ctx.Locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_files_changed_1" "repo.activity.git_stats_files_changed_n"}} {{ctx.Locale.Tr "repo.activity.git_stats_additions"}} - {{ctx.Locale.TrN .Activity.Code.Additions "repo.activity.git_stats_addition_1" "repo.activity.git_stats_addition_n" .Activity.Code.Additions}} + {{ctx.Locale.TrN .Activity.Code.Additions "repo.activity.git_stats_addition_1" "repo.activity.git_stats_addition_n" .Activity.Code.Additions}} {{ctx.Locale.Tr "repo.activity.git_stats_and_deletions"}} - {{ctx.Locale.TrN .Activity.Code.Deletions "repo.activity.git_stats_deletion_1" "repo.activity.git_stats_deletion_n" .Activity.Code.Deletions}}. + {{ctx.Locale.TrN .Activity.Code.Deletions "repo.activity.git_stats_deletion_1" "repo.activity.git_stats_deletion_n" .Activity.Code.Deletions}}.
diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index b7a60a44ed..90ad32bcf0 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -44,7 +44,7 @@ {{end}}
-

+

{{if $release.OriginalAuthor}} {{svg (MigrationIcon $release.Repo.GetOriginalURLHostname) 20 "tw-mr-1"}}{{$release.OriginalAuthor}} diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl index 6f2a5c59af..ff0ec0acfd 100644 --- a/templates/repo/release/new.tmpl +++ b/templates/repo/release/new.tmpl @@ -83,7 +83,7 @@

- {{.Size | FileSize}} + {{.Size | FileSize}} {{svg "octicon-info"}} diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl index e142283b55..48c0269273 100644 --- a/templates/repo/settings/collaboration.tmpl +++ b/templates/repo/settings/collaboration.tmpl @@ -58,7 +58,7 @@ {{range $t, $team := .Teams}}
- + {{.Name}}
diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index 5975b198f3..481fabe4f9 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -46,7 +46,7 @@ {{range .Deploykeys}}
- {{svg "octicon-key" 32}} + {{svg "octicon-key" 32}}
{{.Name}}
@@ -54,7 +54,7 @@ {{.Fingerprint}}
- {{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateUtils.AbsoluteShort .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}} - {{ctx.Locale.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{ctx.Locale.Tr "settings.can_write_info"}} {{end}} + {{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateUtils.AbsoluteShort .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}} - {{ctx.Locale.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{ctx.Locale.Tr "settings.can_write_info"}} {{end}}
diff --git a/templates/repo/settings/githooks.tmpl b/templates/repo/settings/githooks.tmpl index 9b17af1406..cd4fd6f31f 100644 --- a/templates/repo/settings/githooks.tmpl +++ b/templates/repo/settings/githooks.tmpl @@ -8,7 +8,7 @@
{{ctx.Locale.Tr "repo.settings.githooks_desc"}}
{{range .Hooks}}
- {{svg "octicon-dot-fill" 22}} + {{svg "octicon-dot-fill" 22}} {{.Name}} {{svg "octicon-pencil"}}
diff --git a/templates/repo/settings/lfs_file_find.tmpl b/templates/repo/settings/lfs_file_find.tmpl index 59f1bb10cf..c19bd56e87 100644 --- a/templates/repo/settings/lfs_file_find.tmpl +++ b/templates/repo/settings/lfs_file_find.tmpl @@ -20,7 +20,7 @@ - {{svg "octicon-git-branch"}}{{.BranchName}} + {{svg "octicon-git-branch"}}{{.BranchName}} {{if .ParentHashes}} diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 30b5436dee..6cdcd54b18 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -105,7 +105,7 @@ -
{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}: {{ctx.Locale.Tr "error.occurred"}}
+
{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}: {{ctx.Locale.Tr "error.occurred"}}
@@ -890,7 +890,7 @@
@@ -920,7 +920,7 @@
@@ -952,7 +952,7 @@
@@ -989,7 +989,7 @@
@@ -1020,7 +1020,7 @@

{{ctx.Locale.Tr "repo.settings.visibility.private.bullet_title"}}

  • {{ctx.Locale.Tr "repo.settings.visibility.private.bullet_one"}}
  • -
  • {{ctx.Locale.Tr "repo.settings.visibility.private.bullet_two"}}{{if .Repository.NumForks}}{{ctx.Locale.Tr "repo.visibility_fork_helper"}}{{end}}
  • +
  • {{ctx.Locale.Tr "repo.settings.visibility.private.bullet_two"}}{{if .Repository.NumForks}}{{ctx.Locale.Tr "repo.visibility_fork_helper"}}{{end}}
{{end}}
@@ -1047,7 +1047,7 @@
diff --git a/templates/repo/settings/webhook/base_list.tmpl b/templates/repo/settings/webhook/base_list.tmpl index a808d4122f..67b8ba32a7 100644 --- a/templates/repo/settings/webhook/base_list.tmpl +++ b/templates/repo/settings/webhook/base_list.tmpl @@ -12,12 +12,12 @@
{{.Description}}
{{range .Webhooks}}
- {{svg "octicon-dot-fill" 22}} + {{svg "octicon-dot-fill" 22}} {{svg "octicon-pencil"}} - {{svg "octicon-trash"}} diff --git a/templates/repo/settings/webhook/history.tmpl b/templates/repo/settings/webhook/history.tmpl index fb23c7634f..c1ebd6117d 100644 --- a/templates/repo/settings/webhook/history.tmpl +++ b/templates/repo/settings/webhook/history.tmpl @@ -20,15 +20,15 @@
{{if .IsSucceed}} - {{svg "octicon-check"}} + {{svg "octicon-check"}} {{else if not .IsDelivered}} - {{svg "octicon-stopwatch"}} + {{svg "octicon-stopwatch"}} {{else}} - {{svg "octicon-alert"}} + {{svg "octicon-alert"}} {{end}}
- + {{DateUtils.TimeSince .Delivered}}
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 809b1e9677..d91235e0ea 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -17,7 +17,7 @@ {{template "repo/latest_commit" .}} {{if .LatestCommit}} {{if .LatestCommit.Committer}} -
+
{{DateUtils.TimeSince .LatestCommit.Committer.When}}
{{end}} diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 61443ac465..dae4ed5f5b 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -21,7 +21,7 @@ {{$submoduleLink := $submoduleFile.SubmoduleWebLinkTree ctx}} {{if $submoduleLink}} {{$entry.Name}} - @ {{ShortSha $submoduleFile.RefID}} + @ {{ShortSha $submoduleFile.RefID}} {{else}} {{$entry.Name}} @ {{ShortSha $submoduleFile.RefID}} @@ -36,7 +36,7 @@ {{$subJumpablePathName}} {{else}} {{$subJumpablePathPrefixes := slice $subJumpablePathFields 0 $subJumpablePathFieldLast}} - {{StringUtils.Join $subJumpablePathPrefixes "/"}}/{{index $subJumpablePathFields $subJumpablePathFieldLast}} + {{StringUtils.Join $subJumpablePathPrefixes "/"}}/{{index $subJumpablePathFields $subJumpablePathFieldLast}} {{end}} {{else}} diff --git a/templates/shared/issueicon.tmpl b/templates/shared/issueicon.tmpl index bb6247c708..53e077c951 100644 --- a/templates/shared/issueicon.tmpl +++ b/templates/shared/issueicon.tmpl @@ -1,26 +1,26 @@ -{{/* the logic should be kept the same as getIssueIcon/getIssueColor in JS code */}} +{{/* the logic should be kept the same as getIssueIcon/getIssueColorClass in JS code */}} {{- if .IsPull -}} {{- if not .PullRequest -}} No PullRequest {{- else -}} {{- if .IsClosed -}} {{- if .PullRequest.HasMerged -}} - {{- svg "octicon-git-merge" 16 "text purple" -}} + {{- svg "octicon-git-merge" 16 "tw-text-purple" -}} {{- else -}} - {{- svg "octicon-git-pull-request-closed" 16 "text red" -}} + {{- svg "octicon-git-pull-request-closed" 16 "tw-text-red" -}} {{- end -}} {{- else -}} {{- if .PullRequest.IsWorkInProgress ctx -}} - {{- svg "octicon-git-pull-request-draft" 16 "text grey" -}} + {{- svg "octicon-git-pull-request-draft" 16 "tw-text-text-light" -}} {{- else -}} - {{- svg "octicon-git-pull-request" 16 "text green" -}} + {{- svg "octicon-git-pull-request" 16 "tw-text-green" -}} {{- end -}} {{- end -}} {{- end -}} {{- else -}} {{- if .IsClosed -}} - {{- svg "octicon-issue-closed" 16 "text red" -}} + {{- svg "octicon-issue-closed" 16 "tw-text-red" -}} {{- else -}} - {{- svg "octicon-issue-opened" 16 "text green" -}} + {{- svg "octicon-issue-opened" 16 "tw-text-green" -}} {{- end -}} {{- end -}} diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl index 98c26b32dc..9f10663855 100644 --- a/templates/shared/issuelist.tmpl +++ b/templates/shared/issuelist.tmpl @@ -29,7 +29,7 @@
{{if .TotalTrackedTime}} -
+
{{svg "octicon-clock" 16}} {{.TotalTrackedTime | Sec2Hour}}
@@ -98,7 +98,7 @@ {{end}} {{if ne .DeadlineUnix 0}} - + {{svg "octicon-calendar" 14}} {{DateUtils.AbsoluteShort .DeadlineUnix}} @@ -138,7 +138,7 @@ {{if or .Assignees .NumComments}}
{{if .Assignees}} -
+ {{end}} {{if .NumComments}} -
+
{{svg "octicon-comment" 16}}{{.NumComments}} diff --git a/templates/shared/repo/list.tmpl b/templates/shared/repo/list.tmpl index 2c8af14f9c..89b4c55b1e 100644 --- a/templates/shared/repo/list.tmpl +++ b/templates/shared/repo/list.tmpl @@ -12,9 +12,9 @@
{{if and $.ShowRepoOwnerOnList .Owner}} - {{.Owner.Name}}/ + {{.Owner.Name}}/ {{end}} - {{.Name}} + {{.Name}} {{if .IsArchived}} {{ctx.Locale.Tr "repo.desc.archived"}} diff --git a/templates/shared/user/authorlink.tmpl b/templates/shared/user/authorlink.tmpl index 1db8643c5b..d42bf71ecd 100644 --- a/templates/shared/user/authorlink.tmpl +++ b/templates/shared/user/authorlink.tmpl @@ -1 +1 @@ -{{.GetDisplayName}}{{if .IsTypeBot}} bot{{end}} +{{.GetDisplayName}}{{if .IsTypeBot}} bot{{end}} diff --git a/templates/shared/user/block_user_dialog.tmpl b/templates/shared/user/block_user_dialog.tmpl index 64fd25bcd4..33b85eddae 100644 --- a/templates/shared/user/block_user_dialog.tmpl +++ b/templates/shared/user/block_user_dialog.tmpl @@ -6,7 +6,7 @@
- +
diff --git a/templates/shared/user/org_profile_avatar.tmpl b/templates/shared/user/org_profile_avatar.tmpl index c0abcabff1..dc7a5e0bd6 100644 --- a/templates/shared/user/org_profile_avatar.tmpl +++ b/templates/shared/user/org_profile_avatar.tmpl @@ -4,7 +4,7 @@
{{ctx.AvatarUtils.Avatar . 100}} - {{.DisplayName}} + {{.DisplayName}} {{if .Visibility.IsLimited}}
{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}
{{end}} {{if .Visibility.IsPrivate}}
{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}
{{end}} diff --git a/templates/shared/user/profile_big_avatar.tmpl b/templates/shared/user/profile_big_avatar.tmpl index 017bcaa005..2acdb479ee 100644 --- a/templates/shared/user/profile_big_avatar.tmpl +++ b/templates/shared/user/profile_big_avatar.tmpl @@ -21,16 +21,16 @@
    {{if .UserBlocking}} -
  • {{svg "octicon-circle-slash"}} {{ctx.Locale.Tr "user.block.blocked"}}
  • +
  • {{svg "octicon-circle-slash"}} {{ctx.Locale.Tr "user.block.blocked"}}
  • {{if .UserBlocking.Note}} -
  • {{ctx.Locale.Tr "user.block.note"}}: {{.UserBlocking.Note}}
  • +
  • {{ctx.Locale.Tr "user.block.note"}}: {{.UserBlocking.Note}}
  • {{end}} {{end}} {{if .ContextUser.Location}} diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl index c3c042dc38..c17fa2aa0d 100644 --- a/templates/user/dashboard/feeds.tmpl +++ b/templates/user/dashboard/feeds.tmpl @@ -93,7 +93,7 @@
    {{ShortSha .Sha1}} - + {{ctx.RenderUtils.RenderCommitMessage .Message $repo}}
    @@ -103,26 +103,26 @@ {{ctx.Locale.Tr "action.compare_commits" $push.Len}} » {{end}} {{else if .GetOpType.InActions "create_issue"}} - {{index .GetIssueInfos 1 | ctx.RenderUtils.RenderIssueSimpleTitle}} + {{index .GetIssueInfos 1 | ctx.RenderUtils.RenderIssueSimpleTitle}} {{else if .GetOpType.InActions "create_pull_request"}} - {{index .GetIssueInfos 1 | ctx.RenderUtils.RenderIssueSimpleTitle}} + {{index .GetIssueInfos 1 | ctx.RenderUtils.RenderIssueSimpleTitle}} {{else if .GetOpType.InActions "comment_issue" "approve_pull_request" "reject_pull_request" "comment_pull"}} - {{(.GetIssueTitle ctx) | ctx.RenderUtils.RenderIssueSimpleTitle}} + {{(.GetIssueTitle ctx) | ctx.RenderUtils.RenderIssueSimpleTitle}} {{$comment := index .GetIssueInfos 1}} {{if $comment}}
    {{ctx.RenderUtils.MarkdownToHtml $comment}}
    {{end}} {{else if .GetOpType.InActions "merge_pull_request"}} -
    {{index .GetIssueInfos 1 | ctx.RenderUtils.RenderIssueSimpleTitle}}
    +
    {{index .GetIssueInfos 1 | ctx.RenderUtils.RenderIssueSimpleTitle}}
    {{else if .GetOpType.InActions "close_issue" "reopen_issue" "close_pull_request" "reopen_pull_request"}} - {{(.GetIssueTitle ctx) | ctx.RenderUtils.RenderIssueSimpleTitle}} + {{(.GetIssueTitle ctx) | ctx.RenderUtils.RenderIssueSimpleTitle}} {{else if .GetOpType.InActions "pull_review_dismissed"}} -
    {{ctx.Locale.Tr "action.review_dismissed_reason"}}
    -
    {{index .GetIssueInfos 2 | ctx.RenderUtils.RenderEmoji}}
    +
    {{ctx.Locale.Tr "action.review_dismissed_reason"}}
    +
    {{index .GetIssueInfos 2 | ctx.RenderUtils.RenderEmoji}}
    {{end}}
- {{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32 "text grey tw-mr-1"}} + {{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32 "tw-text-text-light tw-mr-1"}}
{{end}} diff --git a/templates/user/dashboard/milestones.tmpl b/templates/user/dashboard/milestones.tmpl index 15b1b9e30b..d5dd64b1a3 100644 --- a/templates/user/dashboard/milestones.tmpl +++ b/templates/user/dashboard/milestones.tmpl @@ -26,7 +26,7 @@ {{- end -}} {{- end -}} ]&sort={{$.SortType}}&state={{$.State}}&q={{$.Keyword}}" title="{{.FullName}}"> - {{$Repo.FullName}} + {{$Repo.FullName}}
{{index $.Counts $Repo.ID}}
{{end}} @@ -116,7 +116,7 @@ {{ctx.Locale.Tr "repo.milestones.closed" $closedDate}} {{else}} {{if .DeadlineString}} - + {{svg "octicon-calendar" 14}} {{DateUtils.AbsoluteShort (.DeadlineString|DateUtils.ParseLegacy)}} diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl index 4f9d4c17a1..993975169b 100644 --- a/templates/user/notification/notification_div.tmpl +++ b/templates/user/notification/notification_div.tmpl @@ -28,14 +28,14 @@ {{if $one.Issue}} {{template "shared/issueicon" $one.Issue}} {{else}} - {{svg "octicon-repo" 16 "text grey"}} + {{svg "octicon-repo" 16 "tw-text-text-light"}} {{end}}
- {{$one.Repository.FullName}} {{if $one.Issue}}#{{$one.Issue.Index}}{{end}} + {{$one.Repository.FullName}} {{if $one.Issue}}#{{$one.Issue.Index}}{{end}} {{if eq $one.Status $statusPinned}} - {{svg "octicon-pin" 13 "text blue"}} + {{svg "octicon-pin" 13 "tw-text-blue"}} {{end}}
diff --git a/templates/user/settings/applications.tmpl b/templates/user/settings/applications.tmpl index b1cec48e1b..c02645dc76 100644 --- a/templates/user/settings/applications.tmpl +++ b/templates/user/settings/applications.tmpl @@ -11,7 +11,7 @@ {{range .Tokens}}
- + {{svg "fontawesome-send" 32}}
@@ -36,7 +36,7 @@
- {{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateUtils.AbsoluteShort .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}} + {{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateUtils.AbsoluteShort .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}
diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl index 1c85605648..87387d2802 100644 --- a/templates/user/settings/keys_gpg.tmpl +++ b/templates/user/settings/keys_gpg.tmpl @@ -48,7 +48,7 @@ {{range .GPGKeys}}
- {{svg "octicon-key" 32}} + {{svg "octicon-key" 32}}
{{if .Verified}} diff --git a/templates/user/settings/keys_principal.tmpl b/templates/user/settings/keys_principal.tmpl index 2b442338a6..2d06275c91 100644 --- a/templates/user/settings/keys_principal.tmpl +++ b/templates/user/settings/keys_principal.tmpl @@ -17,7 +17,7 @@ {{range .Principals}}
- {{svg "octicon-key" 32}} + {{svg "octicon-key" 32}}
{{.Name}}
diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl index f5aa25f4bd..9a32db0ee2 100644 --- a/templates/user/settings/keys_ssh.tmpl +++ b/templates/user/settings/keys_ssh.tmpl @@ -41,7 +41,7 @@ {{range $index, $key := .Keys}}
- {{svg "octicon-key" 32}} + {{svg "octicon-key" 32}}
{{if .Verified}} @@ -52,7 +52,7 @@ {{.Fingerprint}}
- {{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateUtils.AbsoluteShort .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}} + {{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateUtils.AbsoluteShort .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}
diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl index 4bef937b43..0f88f71275 100644 --- a/templates/user/settings/profile.tmpl +++ b/templates/user/settings/profile.tmpl @@ -8,19 +8,19 @@
{{if or (not .SignedUser.IsLocal) ($.UserDisabledFeatures.Contains "change_username") .IsReverseProxy}} -

{{ctx.Locale.Tr "settings.password_username_disabled"}}

+

{{ctx.Locale.Tr "settings.password_username_disabled"}}

{{end}}
{{if ($.UserDisabledFeatures.Contains "change_full_name")}} -

{{ctx.Locale.Tr "settings.password_full_name_disabled"}}

+

{{ctx.Locale.Tr "settings.password_full_name_disabled"}}

{{end}}
diff --git a/templates/user/settings/repos.tmpl b/templates/user/settings/repos.tmpl index 89c4400325..e6b7d99bd7 100644 --- a/templates/user/settings/repos.tmpl +++ b/templates/user/settings/repos.tmpl @@ -13,7 +13,7 @@
{{if $repo}} {{if $repo.IsPrivate}} - {{svg "octicon-lock"}} + {{svg "octicon-lock"}} {{else if $repo.IsFork}} {{svg "octicon-repo-forked"}} {{else if $repo.IsMirror}} @@ -24,7 +24,7 @@ {{svg "octicon-repo"}} {{end}} {{$repo.OwnerName}}/{{$repo.Name}} - {{FileSize $repo.Size}} + {{FileSize $repo.Size}} {{if $repo.IsFork}} {{ctx.Locale.Tr "repo.forked_from"}} {{$repo.BaseRepo.OwnerName}}/{{$repo.BaseRepo.Name}} @@ -84,7 +84,7 @@
{{if .IsPrivate}} - {{svg "octicon-lock" 16 "text gold"}} + {{svg "octicon-lock" 16 "tw-text-gold"}} {{else if .IsFork}} {{svg "octicon-repo-forked"}} {{else if .IsMirror}} diff --git a/templates/user/settings/security/accountlinks.tmpl b/templates/user/settings/security/accountlinks.tmpl index 0820844547..89228e1ae8 100644 --- a/templates/user/settings/security/accountlinks.tmpl +++ b/templates/user/settings/security/accountlinks.tmpl @@ -36,7 +36,7 @@ {{$loginSource.Name}} {{if $loginSource.IsActive}} - {{ctx.Locale.Tr "repo.settings.active"}} + {{ctx.Locale.Tr "repo.settings.active"}} {{end}}
diff --git a/tests/integration/repo_commits_test.go b/tests/integration/repo_commits_test.go index 1918067e38..461af0db64 100644 --- a/tests/integration/repo_commits_test.go +++ b/tests/integration/repo_commits_test.go @@ -145,11 +145,11 @@ func TestRepoCommitsWithStatus(t *testing.T) { testRepoCommitsWithStatus(t, "/api/v1/repos/user2/repo1/commits/v1.1/statuses", "/api/v1/repos/user2/repo1/commits/v1.1/status", state) } - t.Run("pending", func(t *testing.T) { testRefMaster(t, "pending", "octicon-dot-fill", "yellow") }) - t.Run("success", func(t *testing.T) { testRefMaster(t, "success", "octicon-check", "green") }) - t.Run("error", func(t *testing.T) { testRefMaster(t, "error", "gitea-exclamation", "red") }) - t.Run("failure", func(t *testing.T) { testRefMaster(t, "failure", "octicon-x", "red") }) - t.Run("warning", func(t *testing.T) { testRefMaster(t, "warning", "gitea-exclamation", "yellow") }) + t.Run("pending", func(t *testing.T) { testRefMaster(t, "pending", "octicon-dot-fill", "tw-text-yellow") }) + t.Run("success", func(t *testing.T) { testRefMaster(t, "success", "octicon-check", "tw-text-green") }) + t.Run("error", func(t *testing.T) { testRefMaster(t, "error", "gitea-exclamation", "tw-text-red") }) + t.Run("failure", func(t *testing.T) { testRefMaster(t, "failure", "octicon-x", "tw-text-red") }) + t.Run("warning", func(t *testing.T) { testRefMaster(t, "warning", "gitea-exclamation", "tw-text-yellow") }) t.Run("BranchWithSlash", func(t *testing.T) { _ = db.TruncateBeans(t.Context(), &git_model.CommitStatus{}) diff --git a/web_src/css/base.css b/web_src/css/base.css index 699043b45a..5a75aaaee6 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -553,67 +553,6 @@ img.ui.avatar, margin-top: calc(var(--page-spacing) - 1rem); } -.text.primary { - color: var(--color-primary) !important; -} - -.text.red { - color: var(--color-red) !important; -} - -.text.orange { - color: var(--color-orange) !important; -} - -.text.yellow { - color: var(--color-yellow) !important; -} - -.text.green { - color: var(--color-green) !important; -} - -.text.blue { - color: var(--color-blue) !important; -} - -.text.purple { - color: var(--color-purple) !important; -} - -/* it is different from tw-text-black: this one changes in dark theme */ -.text.black { - color: var(--color-text) !important; -} - -.text.grey { - color: var(--color-text-light) !important; -} - -.text.light { - color: var(--color-text-light) !important; -} - -.text.light-2 { - color: var(--color-text-light-2) !important; -} - -.text.light-3 { - color: var(--color-text-light-3) !important; -} - -.text.light.grey { - color: var(--color-grey-light) !important; -} - -.text.gold { - color: var(--color-gold) !important; -} - -.text.small { - font-size: 0.75em; -} - /* popover box shadows */ .ui.dropdown .menu, .ui.upward.dropdown > .menu, @@ -628,13 +567,6 @@ img.ui.avatar, box-shadow: 0 6px 18px var(--color-shadow) !important; } -.ui .text.truncate { - overflow-x: hidden; - text-overflow: ellipsis; - white-space: nowrap; - display: inline-block; -} - .ui .message.flash-message { text-align: center; } diff --git a/web_src/css/dashboard.css b/web_src/css/dashboard.css index 0962215ac6..128626b321 100644 --- a/web_src/css/dashboard.css +++ b/web_src/css/dashboard.css @@ -22,11 +22,6 @@ justify-content: space-between; } -.dashboard.feeds .filter.menu .item .text.truncate, -.dashboard.issues .filter.menu .item .text.truncate { - width: 75%; -} - /* Sort */ .dashboard.feeds .filter.menu .jump.item, .dashboard.issues .filter.menu .jump.item { diff --git a/web_src/js/components/ActionRunStatus.vue b/web_src/js/components/ActionRunStatus.vue index 24fae920a8..0069c5faf7 100644 --- a/web_src/js/components/ActionRunStatus.vue +++ b/web_src/js/components/ActionRunStatus.vue @@ -19,12 +19,12 @@ withDefaults(defineProps<{ diff --git a/web_src/js/components/ContextPopup.vue b/web_src/js/components/ContextPopup.vue index 733144aae1..12911aad40 100644 --- a/web_src/js/components/ContextPopup.vue +++ b/web_src/js/components/ContextPopup.vue @@ -1,7 +1,7 @@