Skip to content

Commit bfab129

Browse files
authored
Fix label list divider (#25312)
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)
1 parent a5d0246 commit bfab129

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

templates/repo/issue/list.tmpl

+2-1
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,13 @@
102102
<input type="text" placeholder="{{.locale.Tr "repo.issues.filter_label"}}">
103103
</div>
104104
<span class="info">{{.locale.Tr "repo.issues.filter_label_exclude" | Safe}}</span>
105+
<div class="ui divider"></div>
105106
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels=0&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_select_no_label"}}</a>
106107
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_no_select"}}</a>
107108
{{$previousExclusiveScope := "_no_scope"}}
108109
{{range .Labels}}
109110
{{$exclusiveScope := .ExclusiveScope}}
110-
{{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
111+
{{if and (ne $previousExclusiveScope $exclusiveScope)}}
111112
<div class="ui divider"></div>
112113
{{end}}
113114
{{$previousExclusiveScope = $exclusiveScope}}

web_src/css/repo.css

-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@
149149
.repository .filter.menu.labels .label-filter .menu .info {
150150
display: inline-block;
151151
padding: 0.5rem 0.25rem;
152-
border-bottom: 1px solid var(--color-secondary);
153152
font-size: 12px;
154153
width: 100%;
155154
white-space: nowrap;

web_src/js/features/repo-issue.js

+1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ export function initRepoIssueSidebarList() {
149149
}
150150
}
151151
});
152+
$('.ui.dropdown.label-filter').dropdown('setting', {'hideDividers': 'empty'}).dropdown('refreshItems');
152153
}
153154

154155
export function initRepoIssueCommentDelete() {

0 commit comments

Comments
 (0)