Skip to content

Commit 7d8a2d0

Browse files
jaqrasilverwind
andauthored
Allow emoji on popup label (#10166)
* allow emoji on popup label * Make emojify work * Remove unnecessary class Co-Authored-By: silverwind <[email protected]> Co-authored-by: silverwind <[email protected]>
1 parent 632df9b commit 7d8a2d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web_src/js/features/contextPopup.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ function issuePopup(suburl, owner, repo, index, $element) {
2020
let labels = '';
2121
for (let i = 0; i < issue.labels.length; i++) {
2222
const label = issue.labels[i];
23+
const labelName = emojify.replace(label.name);
2324
const red = parseInt(label.color.substring(0, 2), 16);
2425
const green = parseInt(label.color.substring(2, 4), 16);
2526
const blue = parseInt(label.color.substring(4, 6), 16);
2627
let color = '#ffffff';
2728
if ((red * 0.299 + green * 0.587 + blue * 0.114) > 125) {
2829
color = '#000000';
2930
}
30-
labels += `<div class="ui label" style="color: ${color}; background-color:#${label.color};">${label.name}</div>`;
31+
labels += `<div class="ui label" style="color: ${color}; background-color:#${label.color};">${labelName}</div>`;
3132
}
3233
if (labels.length > 0) {
3334
labels = `<p>${labels}</p>`;

0 commit comments

Comments
 (0)