diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2021-06-01 14:35:49 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-06-03 21:05:24 +0200 |
commit | d2c9f39c0bb71acb927b4bb75f7a98d5df733697 (patch) | |
tree | af4a1d256f1428c4a3cdec28fa3ff95c04ab5ef4 /app/javascript/flavours/glitch/features/emoji_picker | |
parent | 0157caacefe34838ff5d5093dc188f5491cb7b15 (diff) |
[Glitch] Add assets from Twemoji 13.1.0
Port abd7b4636a4bda2454f1d30e7f87843d0c06dcbe to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/emoji_picker')
-rw-r--r-- | app/javascript/flavours/glitch/features/emoji_picker/index.js | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/app/javascript/flavours/glitch/features/emoji_picker/index.js b/app/javascript/flavours/glitch/features/emoji_picker/index.js index 5fd904593..78f691c98 100644 --- a/app/javascript/flavours/glitch/features/emoji_picker/index.js +++ b/app/javascript/flavours/glitch/features/emoji_picker/index.js @@ -5,7 +5,7 @@ import { Map as ImmutableMap } from 'immutable'; import { useEmoji } from 'flavours/glitch/actions/emojis'; import React from 'react'; import PropTypes from 'prop-types'; -import { defineMessages, injectIntl } from 'react-intl'; +import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { EmojiPicker as EmojiPickerAsync } from 'flavours/glitch/util/async-components'; import Overlay from 'react-overlays/lib/Overlay'; import classNames from 'classnames'; @@ -18,7 +18,6 @@ import { assetHost } from 'flavours/glitch/util/config'; const messages = defineMessages({ emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' }, emoji_search: { id: 'emoji_button.search', defaultMessage: 'Search...' }, - emoji_not_found: { id: 'emoji_button.not_found', defaultMessage: 'No emojos!! (╯°□°)╯︵ ┻━┻' }, custom: { id: 'emoji_button.custom', defaultMessage: 'Custom' }, recent: { id: 'emoji_button.recent', defaultMessage: 'Frequently used' }, search_results: { id: 'emoji_button.search_results', defaultMessage: 'Search results' }, @@ -108,9 +107,26 @@ const mapDispatchToProps = (dispatch, { onPickEmoji }) => ({ let EmojiPicker, Emoji; // load asynchronously -const backgroundImageFn = () => `${assetHost}/emoji/sheet_10.png`; const listenerOptions = supportsPassiveEvents ? { passive: true } : false; +const backgroundImageFn = () => `${assetHost}/emoji/sheet_13.png`; + +const notFoundFn = () => ( + <div className='emoji-mart-no-results'> + <Emoji + emoji='sleuth_or_spy' + set='twitter' + size={32} + sheetSize={32} + backgroundImageFn={backgroundImageFn} + /> + + <div className='emoji-mart-no-results-label'> + <FormattedMessage id='emoji_button.not_found' defaultMessage='No matching emojis found' /> + </div> + </div> +); + class ModifierPickerMenu extends React.PureComponent { static propTypes = { @@ -262,7 +278,6 @@ class EmojiPickerMenu extends React.PureComponent { return { search: intl.formatMessage(messages.emoji_search), - notfound: intl.formatMessage(messages.emoji_not_found), categories: { search: intl.formatMessage(messages.search_results), recent: intl.formatMessage(messages.recent), @@ -343,7 +358,9 @@ class EmojiPickerMenu extends React.PureComponent { recent={frequentlyUsedEmojis} skin={skinTone} showPreview={false} + showSkinTones={false} backgroundImageFn={backgroundImageFn} + notFound={notFoundFn} autoFocus emojiTooltip native={useSystemEmojiFont} |