From 19a1e1b20ee45f02908c915c8540baab1396899c Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 31 Aug 2023 10:29:59 +0800 Subject: [PATCH] Remove polluted `.ui.right` (#26825) Each change is tested manually line by line. There are too many changes so I can't share dozens of screenshots. In short: 1. `ui right` could be still used in `ui top attached header`, because there is a special case. 2. A lot of `ui right` are just no-op, so they can be removed safely. 3. Some of the `ui right` should be replaced by `gt-float-right` (to avoid breaking, leave them to the future). 4. A few of the `ui right` could be rewritten by flex. --- templates/admin/notice.tmpl | 2 +- templates/org/settings/labels.tmpl | 10 +++------ templates/org/team/repositories.tmpl | 2 +- templates/package/view.tmpl | 2 +- templates/repo/commits_list_small.tmpl | 2 +- templates/repo/diff/comment_form.tmpl | 2 +- templates/repo/issue/labels.tmpl | 4 +--- templates/repo/issue/milestones.tmpl | 4 +--- .../repo/issue/view_content/attachments.tmpl | 2 +- .../repo/issue/view_content/comments.tmpl | 6 ++--- .../view_content/comments_delete_time.tmpl | 2 +- templates/repo/projects/view.tmpl | 2 +- templates/repo/release/list.tmpl | 2 +- templates/repo/release/new.tmpl | 16 ++++++-------- templates/repo/release_tag_header.tmpl | 2 +- templates/repo/settings/githooks.tmpl | 2 +- templates/repo/settings/webhook/history.tmpl | 22 +++++++++---------- templates/repo/wiki/new.tmpl | 6 ++--- templates/repo/wiki/view.tmpl | 4 ++-- templates/user/dashboard/issues.tmpl | 12 +++++----- templates/user/dashboard/milestones.tmpl | 2 +- templates/user/settings/repos.tmpl | 2 +- web_src/css/base.css | 5 ----- web_src/css/repo/release-tag.css | 6 +---- .../js/components/RepoBranchTagSelector.vue | 2 +- 25 files changed, 51 insertions(+), 72 deletions(-) diff --git a/templates/admin/notice.tmpl b/templates/admin/notice.tmpl index ac5851f853..c9d3a552dc 100644 --- a/templates/admin/notice.tmpl +++ b/templates/admin/notice.tmpl @@ -31,7 +31,7 @@ -
+ {{.CsrfTokenHtml}}
diff --git a/templates/org/settings/labels.tmpl b/templates/org/settings/labels.tmpl index 2700c61bb6..81dde17455 100644 --- a/templates/org/settings/labels.tmpl +++ b/templates/org/settings/labels.tmpl @@ -1,14 +1,10 @@ {{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings labels")}}
-
-
+
+
{{$.locale.Tr "org.settings.labels_desc" | Str2html}}
-
-
- -
-
+
{{template "repo/issue/labels/label_new" .}} diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl index 65eb64cb54..71c9bb9563 100644 --- a/templates/org/team/repositories.tmpl +++ b/templates/org/team/repositories.tmpl @@ -41,7 +41,7 @@ {{if $canAddRemove}}
{{$.CsrfTokenHtml}} - +
{{end}}
diff --git a/templates/package/view.tmpl b/templates/package/view.tmpl index fe4214cbd2..2f22b4ec2a 100644 --- a/templates/package/view.tmpl +++ b/templates/package/view.tmpl @@ -87,7 +87,7 @@ {{end}}
{{.locale.Tr "packages.versions"}} ({{.TotalVersionCount}}) - {{.locale.Tr "packages.versions.view_all"}} + {{.locale.Tr "packages.versions.view_all"}}
{{range .LatestVersions}}
diff --git a/templates/repo/commits_list_small.tmpl b/templates/repo/commits_list_small.tmpl index ff65d02885..b5a7134294 100644 --- a/templates/repo/commits_list_small.tmpl +++ b/templates/repo/commits_list_small.tmpl @@ -13,7 +13,7 @@ {{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}} - + {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $.root}} {{$class := "ui sha label"}} {{if .Signature}} diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl index 8565deb168..5aad8d9590 100644 --- a/templates/repo/diff/comment_form.tmpl +++ b/templates/repo/diff/comment_form.tmpl @@ -22,7 +22,7 @@
{{if or $invalid $resolved}} - -