logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 02de0ed825667c5a40be5c18b86f71152198e77a
parent 8f4f02683f89129cf6f28f2059122cff7db02242
Author: Tusooa Zhu <tusooa@kazv.moe>
Date:   Sat,  8 Jan 2022 17:14:23 -0500

Add icons for unicode emoji groups

Diffstat:

Msrc/components/emoji_picker/emoji_picker.js36+++++++++++++++++++++++++++++++++---
1 file changed, 33 insertions(+), 3 deletions(-)

diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js @@ -6,16 +6,46 @@ import { library } from '@fortawesome/fontawesome-svg-core' import { faBoxOpen, faStickyNote, - faSmileBeam + faSmileBeam, + faSmile, + faUser, + faPaw, + faIceCream, + faBus, + faBasketballBall, + faLightbulb, + faCode, + faFlag } from '@fortawesome/free-solid-svg-icons' import { trim } from 'lodash' library.add( faBoxOpen, faStickyNote, - faSmileBeam + faSmileBeam, + faSmile, + faUser, + faPaw, + faIceCream, + faBus, + faBasketballBall, + faLightbulb, + faCode, + faFlag ) +const UNICODE_EMOJI_GROUP_ICON = { + 'smileys-and-emotion': 'smile', + 'people-and-body': 'user', + 'animals-and-nature': 'paw', + 'food-and-drink': 'ice-cream', + 'travel-and-places': 'bus', + 'activities': 'basketball-ball', + 'objects': 'lightbulb', + 'symbols': 'code', + 'flags': 'flag', +} + const filterByKeyword = (list, keyword = '') => { if (keyword === '') return list @@ -218,7 +248,7 @@ const EmojiPicker = { return this.$store.getters.standardEmojiGroupList.map(group => ({ id: `standard-${group.id}`, text: this.$t(`emoji.unicode_groups.${group.id}`), - icon: 'box-open', + icon: UNICODE_EMOJI_GROUP_ICON[group.id], emojis: group.emojis })) },