Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-30 15:07:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-30 15:07:06 +0300
commit7aa22e9a103b049dd2da70045a5822c51164f7db (patch)
treef741dded2bd2965e9e9b7ce4c680e2ddaf0aa3d3 /app/assets/javascripts/awards_handler.js
parent5c229c2ebe3304a58afd1d40418410a8c3723ea5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/awards_handler.js')
-rw-r--r--app/assets/javascripts/awards_handler.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/awards_handler.js b/app/assets/javascripts/awards_handler.js
index 9ab1d6bfd80..1855fb9ed8c 100644
--- a/app/assets/javascripts/awards_handler.js
+++ b/app/assets/javascripts/awards_handler.js
@@ -2,7 +2,7 @@
import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils';
import $ from 'jquery';
-import { uniq } from 'lodash';
+import { uniq, escape } from 'lodash';
import { getEmojiScoreWithIntent } from '~/emoji/utils';
import { getCookie, setCookie, scrollToElement } from '~/lib/utils/common_utils';
import * as Emoji from '~/emoji';
@@ -149,7 +149,7 @@ export class AwardsHandler {
let frequentlyUsedCatgegory = '';
if (frequentlyUsedEmojis.length > 0) {
frequentlyUsedCatgegory = this.renderCategory('Frequently used', frequentlyUsedEmojis, {
- menuListClass: 'frequent-emojis',
+ frequentEmojis: true,
});
}
@@ -228,9 +228,9 @@ export class AwardsHandler {
renderCategory(name, emojiList, opts = {}) {
return `
<h5 class="emoji-menu-title">
- ${name}
+ ${escape(name)}
</h5>
- <ul class="clearfix emoji-menu-list ${opts.menuListClass || ''}">
+ <ul class="clearfix emoji-menu-list ${opts.frequentEmojis ? 'frequent-emojis' : ''}">
${emojiList
.map(
(emojiName) => `