diff options
author | jaqra <48099350+jaqra@users.noreply.github.com> | 2020-02-08 14:48:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-08 12:48:17 +0100 |
commit | 7d8a2d05cf637fb290de01ab0f666e4d4ebce033 (patch) | |
tree | a755bfd168c7fb94fab25839915700e2ac444d9b /web_src/js/features | |
parent | 632df9b996522792ddcaf102c1e9921447484dc4 (diff) | |
download | gitea-7d8a2d05cf637fb290de01ab0f666e4d4ebce033.tar.gz gitea-7d8a2d05cf637fb290de01ab0f666e4d4ebce033.zip |
Allow emoji on popup label (#10166)
* allow emoji on popup label
* Make emojify work
* Remove unnecessary class
Co-Authored-By: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'web_src/js/features')
-rw-r--r-- | web_src/js/features/contextPopup.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/web_src/js/features/contextPopup.js b/web_src/js/features/contextPopup.js index 90b8493666..34b6d50357 100644 --- a/web_src/js/features/contextPopup.js +++ b/web_src/js/features/contextPopup.js @@ -20,6 +20,7 @@ function issuePopup(suburl, owner, repo, index, $element) { let labels = ''; for (let i = 0; i < issue.labels.length; i++) { const label = issue.labels[i]; + const labelName = emojify.replace(label.name); const red = parseInt(label.color.substring(0, 2), 16); const green = parseInt(label.color.substring(2, 4), 16); const blue = parseInt(label.color.substring(4, 6), 16); @@ -27,7 +28,7 @@ function issuePopup(suburl, owner, repo, index, $element) { if ((red * 0.299 + green * 0.587 + blue * 0.114) > 125) { color = '#000000'; } - labels += `<div class="ui label" style="color: ${color}; background-color:#${label.color};">${label.name}</div>`; + labels += `<div class="ui label" style="color: ${color}; background-color:#${label.color};">${labelName}</div>`; } if (labels.length > 0) { labels = `<p>${labels}</p>`; |