enhancement: line-through for closed issues

This commit is contained in:
Tim-Niclas Oelschläger 2024-02-10 11:13:59 +01:00 committed by Lunny Xiao
parent 586a42b640
commit 5b8d4aa865

View File

@ -236,8 +236,12 @@ func RenderDependencies(ctx context.Context, dependencies []*issues_model.Depend
if index != 0 {
htmlCode += `<span>,</span>`
}
htmlCode += fmt.Sprintf(`<a href="%s" data-tooltip-content="#%d %s" class="gt-ml-2">#%d</a>`,
dependency.Issue.Link(), dependency.Issue.Index, RenderEmoji(ctx, dependency.Issue.Title), dependency.Issue.Index)
anchorClasses := "gt-ml-2"
if dependency.Issue.IsClosed {
anchorClasses += " term-fg9"
}
htmlCode += fmt.Sprintf(`<a href="%s" data-tooltip-content="#%d %s" class="%s">#%d</a>`,
dependency.Issue.Link(), dependency.Issue.Index, RenderEmoji(ctx, dependency.Issue.Title), anchorClasses, dependency.Issue.Index)
}
return template.HTML(htmlCode + "</span>")