about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/compose
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-06-03 20:47:02 +0200
committerClaire <claire.github-309c@sitedethib.com>2021-06-03 20:47:02 +0200
commit0157caacefe34838ff5d5093dc188f5491cb7b15 (patch)
treea5b56590b7660b6ed3257f929bf209a26cb25a15 /app/javascript/mastodon/features/compose
parent02dffa8edd097014578774aed30249ed08d2f3a4 (diff)
parentf6088922c06f3da02e9051b39f3a7111f19298dd (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/javascript/mastodon/features/compose')
-rw-r--r--app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js25
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
         />