From e9105ac281f8671142fdf74e46b45e6524c63e0a Mon Sep 17 00:00:00 2001 From: Giteabot Date: Mon, 19 Jun 2023 14:14:31 -0400 Subject: [PATCH] Fix label list divider (#25312) (#25372) Backport #25312 by @wxiaoguang We only needs 2 lines to hide the dividers. ``` $dropdownLabelFilter.dropdown('setting', {'hideDividers': 'empty'}); $dropdownLabelFilter.dropdown('refreshItems'); ``` Other code blocks are refactored by the way. ![image](https://github.com/go-gitea/gitea/assets/2114189/74989996-fcea-4df4-b534-b06f7957939a) ![image](https://github.com/go-gitea/gitea/assets/2114189/ee3b3761-b96e-4fb5-b646-e9d3117e5f40) Co-authored-by: wxiaoguang --- templates/repo/issue/list.tmpl | 3 ++- web_src/css/repo.css | 1 - web_src/js/features/repo-issue.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index a3b13604d6..023c32565a 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -102,12 +102,13 @@ {{.locale.Tr "repo.issues.filter_label_exclude" | Safe}} +
{{.locale.Tr "repo.issues.filter_label_select_no_label"}} {{.locale.Tr "repo.issues.filter_label_no_select"}} {{$previousExclusiveScope := "_no_scope"}} {{range .Labels}} {{$exclusiveScope := .ExclusiveScope}} - {{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}} + {{if and (ne $previousExclusiveScope $exclusiveScope)}}
{{end}} {{$previousExclusiveScope = $exclusiveScope}} diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 60a2f97a3f..152507f83b 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -149,7 +149,6 @@ .repository .filter.menu.labels .label-filter .menu .info { display: inline-block; padding: 0.5rem 0.25rem; - border-bottom: 1px solid var(--color-secondary); font-size: 12px; width: 100%; white-space: nowrap; diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js index 0dc5728f58..33d2112d5b 100644 --- a/web_src/js/features/repo-issue.js +++ b/web_src/js/features/repo-issue.js @@ -149,6 +149,7 @@ export function initRepoIssueSidebarList() { } } }); + $('.ui.dropdown.label-filter').dropdown('setting', {'hideDividers': 'empty'}).dropdown('refreshItems'); } export function initRepoIssueCommentDelete() {