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}}
{{$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 @@
{{ctx.Locale.Tr "org.settings.name_confirm"}}
- {{.Org.Name}}
+ {{.Org.Name}}
@@ -125,7 +125,7 @@
{{ctx.Locale.Tr "org.settings.name_confirm"}}
- {{.Org.Name}}
+ {{.Org.Name}}
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}}
@@ -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}}
-
+
{{svg "octicon-reply"}}
@@ -250,7 +250,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 @@
{{ctx.Locale.Tr "repo.settings.transfer_form_title"}}
- {{.Repository.Name}}
+ {{.Repository.Name}}
@@ -920,7 +920,7 @@
{{ctx.Locale.Tr "repo.settings.transfer_form_title"}}
- {{.Repository.Name}}
+ {{.Repository.Name}}
@@ -952,7 +952,7 @@
{{ctx.Locale.Tr "repo.settings.transfer_form_title"}}
- {{.Repository.Name}}
+ {{.Repository.Name}}
@@ -989,7 +989,7 @@
{{ctx.Locale.Tr "repo.settings.transfer_form_title"}}
- {{.Repository.Name}}
+ {{.Repository.Name}}
@@ -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 @@
{{ctx.Locale.Tr "repo.settings.transfer_form_title"}}
- {{.Repository.Name}}
+ {{.Repository.Name}}
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}}
{{.UUID}}
-
+
{{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 @@