diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2021-06-01 14:35:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 14:35:49 +0200 |
commit | abd7b4636a4bda2454f1d30e7f87843d0c06dcbe (patch) | |
tree | 18242925539deec35f8411502077542ecf766f98 /app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js | |
parent | aafac8dc71221c9535adddc031bb8353f553505d (diff) |
Add assets from Twemoji 13.1.0 (#16345)
* Add assets from Twemoji 13.1.0 * Update emoji-mart
Diffstat (limited to 'app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js')
-rw-r--r-- | app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js b/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js index dc4f48060..4a87714e6 100644 --- a/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js +++ b/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js @@ -1,6 +1,6 @@ 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 '../../ui/util/async-components'; import Overlay from 'react-overlays/lib/Overlay'; import classNames from 'classnames'; @@ -12,7 +12,6 @@ import { assetHost } from 'mastodon/utils/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' }, @@ -28,9 +27,26 @@ const messages = defineMessages({ 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 = { @@ -182,7 +198,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), @@ -263,7 +278,9 @@ class EmojiPickerMenu extends React.PureComponent { recent={frequentlyUsedEmojis} skin={skinTone} showPreview={false} + showSkinTones={false} backgroundImageFn={backgroundImageFn} + notFound={notFoundFn} autoFocus emojiTooltip /> |