Skip to content

Commit aa8fc8e

Browse files
committed
Adding highlight and show hide to archive label
1 parent 64cc5c2 commit aa8fc8e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

templates/repo/issue/labels/label_list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
<ul class="issue-label-list">
4040
{{range .Labels}}
41-
<li class="item" {{if not .ArchivedUnix.IsZero}}data-archived-label{{end}}>
41+
<li class="item {{if not .ArchivedUnix.IsZero}}archived-label gt-hidden{{end}}">
4242
<div class="label-title">
4343
{{RenderLabel $.Context .}}
4444
{{if .Description}}<br><small class="desc">{{.Description | RenderEmoji $.Context}}</small>{{end}}

web_src/js/features/repo-issue-list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ export function initHighlightArchivedLabels() {
208208
if (!document.querySelectorAll('.show-archived-labels-checkbox').length) return;
209209
document.querySelector('.show-archived-labels-checkbox')
210210
.addEventListener('input', () => {
211-
for (const archivedLabel of document.querySelectorAll('[data-archived-label]')) {
212-
archivedLabel.classList.toggle('archived-label');
211+
for (const archivedLabel of document.querySelectorAll('.archived-label')) {
212+
archivedLabel.classList.toggle('gt-hidden');
213213
}
214214
});
215215
}

0 commit comments

Comments
 (0)