diff --git a/static/app-strings.json b/static/app-strings.json index 99b65f1ec..600ca762d 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -2239,5 +2239,85 @@ "A channel is required to repost on LBRY": "A channel is required to repost on LBRY", "Failed to view lbry://@gatogalactico#9/gato-galactico-e-as-estrelas-ninja-dos#1, please try again. If this problem persists, visit https://lbry.com/faq/support for support.": "Failed to view lbry://@gatogalactico#9/gato-galactico-e-as-estrelas-ninja-dos#1, please try again. If this problem persists, visit https://lbry.com/faq/support for support.", "Admin": "Admin", + ":ALIEN:": ":ALIEN:", + ":ANGRY_2:": ":ANGRY_2:", + ":ANGRY_3:": ":ANGRY_3:", + ":ANGRY_4:": ":ANGRY_4:", + ":ANGRY_1:": ":ANGRY_1:", + ":BLIND:": ":BLIND:", + ":BLOCK:": ":BLOCK:", + ":BOMB:": ":BOMB:", + ":BRAIN_CHIP:": ":BRAIN_CHIP:", + ":CONFIRM:": ":CONFIRM:", + ":CONFUSED_1:": ":CONFUSED_1:", + ":CONFUSED_2:": ":CONFUSED_2:", + ":COOKING_SOMETHING_NICE:": ":COOKING_SOMETHING_NICE:", + ":CRY_2:": ":CRY_2:", + ":CRY_3:": ":CRY_3:", + ":CRY_4:": ":CRY_4:", + ":CRY_5:": ":CRY_5:", + ":CRY_1:": ":CRY_1:", + ":SPACE_DOGE:": ":SPACE_DOGE:", + ":DONUT:": ":DONUT:", + ":EGGPLANT_WITH_CONDOM:": ":EGGPLANT_WITH_CONDOM:", + ":EGGPLANT:": ":EGGPLANT:", + ":FIRE_UP:": ":FIRE_UP:", + ":FLAT_EARTH:": ":FLAT_EARTH:", + ":FLYING_SAUCER:": ":FLYING_SAUCER:", + ":HEART_CHOPPER:": ":HEART_CHOPPER:", + ":HYPER_TROLL:": ":HYPER_TROLL:", + ":ICE_CREAM:": ":ICE_CREAM:", + ":IDK:": ":IDK:", + ":ILLUMINATI_1:": ":ILLUMINATI_1:", + ":ILLUMINATI_2:": ":ILLUMINATI_2:", + ":KISS_2:": ":KISS_2:", + ":KISS_1:": ":KISS_1:", + ":LASER_GUN:": ":LASER_GUN:", + ":LAUGHING_2:": ":LAUGHING_2:", + ":LAUGHING_1:": ":LAUGHING_1:", + ":LOLLIPOP:": ":LOLLIPOP:", + ":LOVE_2:": ":LOVE_2:", + ":LOVE_1:": ":LOVE_1:", + ":MONSTER:": ":MONSTER:", + ":MUSHROOM:": ":MUSHROOM:", + ":NAIL_IT:": ":NAIL_IT:", + ":NO:": ":NO:", + ":OUCH:": ":OUCH:", + ":PREACE:": ":PREACE:", + ":PIZZA:": ":PIZZA:", + ":RABBIT_HOLE:": ":RABBIT_HOLE:", + ":RAINBOW_PUKE_1:": ":RAINBOW_PUKE_1:", + ":RAINBOW_PUKE_2:": ":RAINBOW_PUKE_2:", + ":SPACE_RESITAS:": ":SPACE_RESITAS:", + ":ROCK:": ":ROCK:", + ":SAD:": ":SAD:", + ":SALTY:": ":SALTY:", + ":SCARY:": ":SCARY:", + ":SLEEP:": ":SLEEP:", + ":SLIME_DOWN:": ":SLIME_DOWN:", + ":SMELLY_SOCKS:": ":SMELLY_SOCKS:", + ":SMILE_2:": ":SMILE_2:", + ":SMILE_1:": ":SMILE_1:", + ":SPACE_CHAD:": ":SPACE_CHAD:", + ":SPACE_JULIAN:": ":SPACE_JULIAN:", + ":SPACE_TOM:": ":SPACE_TOM:", + ":SPACE_WOJAK_1:": ":SPACE_WOJAK_1:", + ":SPOCK:": ":SPOCK:", + ":STAR:": ":STAR:", + ":SUNNY_DAY:": ":SUNNY_DAY:", + ":SUPRISED:": ":SUPRISED:", + ":SWEET:": ":SWEET:", + ":THINKING_1:": ":THINKING_1:", + ":THINKING_2:": ":THINKING_2:", + ":THUMB_DOWN:": ":THUMB_DOWN:", + ":THUMB_UP_1:": ":THUMB_UP_1:", + ":THUMB_UP_2:": ":THUMB_UP_2:", + ":TINFOIL_HAT:": ":TINFOIL_HAT:", + ":TROLL_KING:": ":TROLL_KING:", + ":UFO:": ":UFO:", + ":WAITING:": ":WAITING:", + ":WHAT:": ":WHAT:", + ":WOODOO_DOLL:": ":WOODOO_DOLL:", + "Global Emotes": "Global Emotes", "--end--": "--end--" } diff --git a/ui/component/commentCreate/emote-selector.jsx b/ui/component/commentCreate/emote-selector.jsx new file mode 100644 index 000000000..1dc1a1bd6 --- /dev/null +++ b/ui/component/commentCreate/emote-selector.jsx @@ -0,0 +1,68 @@ +// @flow +import 'scss/component/_emote-selector.scss'; +import { EMOTES_24px as EMOTES } from 'constants/emotes'; +import * as ICONS from 'constants/icons'; +import Button from 'component/button'; +import EMOJIS from 'emoji-dictionary'; +import OptimizedImage from 'component/optimizedImage'; +import React from 'react'; + +const OLD_QUICK_EMOJIS = [ + EMOJIS.getUnicode('rocket'), + EMOJIS.getUnicode('jeans'), + EMOJIS.getUnicode('fire'), + EMOJIS.getUnicode('heart'), + EMOJIS.getUnicode('open_mouth'), +]; + +type Props = { commentValue: string, setCommentValue: (string) => void, closeSelector: () => void }; + +export default function EmoteSelector(props: Props) { + const { commentValue, setCommentValue, closeSelector } = props; + + function addEmoteToComment(emote: string) { + setCommentValue( + commentValue + (commentValue && commentValue.charAt(commentValue.length - 1) !== ' ' ? ` ${emote} ` : `${emote} `) + ); + } + + return ( +