kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Remove custom emojis from reaction picker
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>environments/review-update-emo-25jnc5/deployments/2714
rodzic
d6732955de
commit
277045c7a1
|
@ -69,7 +69,7 @@ const EmojiSelector: React.FC<IEmojiSelector> = ({
|
|||
const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);
|
||||
|
||||
const handleClickOutside = (event: MouseEvent) => {
|
||||
if ([referenceElement, popperElement].some(el => el?.contains(event.target as Node))) {
|
||||
if ([referenceElement, popperElement, document.querySelector('em-emoji-picker')].some(el => el?.contains(event.target as Node))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -141,6 +141,7 @@ const EmojiSelector: React.FC<IEmojiSelector> = ({
|
|||
visible={expanded}
|
||||
setVisible={setExpanded}
|
||||
update={update}
|
||||
withCustom={false}
|
||||
/>
|
||||
) : (
|
||||
<HStack
|
||||
|
|
|
@ -46,6 +46,7 @@ export const messages = defineMessages({
|
|||
export interface IEmojiPickerDropdown {
|
||||
onPickEmoji?: (emoji: Emoji) => void
|
||||
condensed?: boolean
|
||||
withCustom?: boolean
|
||||
visible: boolean
|
||||
setVisible: (value: boolean) => void
|
||||
update: (() => Promise<Partial<PopperState>>) | null
|
||||
|
@ -126,7 +127,7 @@ const RenderAfter = ({ children, update }: any) => {
|
|||
};
|
||||
|
||||
const EmojiPickerDropdown: React.FC<IEmojiPickerDropdown> = ({
|
||||
onPickEmoji, condensed, visible, setVisible, update,
|
||||
onPickEmoji, visible, setVisible, update, withCustom = true,
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
const dispatch = useAppDispatch();
|
||||
|
@ -235,7 +236,7 @@ const EmojiPickerDropdown: React.FC<IEmojiPickerDropdown> = ({
|
|||
<RenderAfter update={update}>
|
||||
{!loading && (
|
||||
<EmojiPicker
|
||||
custom={[{ emojis: buildCustomEmojis(customEmojis) }]}
|
||||
custom={withCustom ? [{ emojis: buildCustomEmojis(customEmojis) }] : undefined}
|
||||
title={title}
|
||||
onEmojiSelect={handlePick}
|
||||
recent={frequentlyUsedEmojis}
|
||||
|
|
|
@ -17,7 +17,7 @@ export const messages = defineMessages({
|
|||
});
|
||||
|
||||
const EmojiPickerDropdownContainer = (
|
||||
props: Pick<IEmojiPickerDropdown, 'onPickEmoji' | 'condensed'>,
|
||||
props: Pick<IEmojiPickerDropdown, 'onPickEmoji' | 'condensed' | 'withCustom'>,
|
||||
) => {
|
||||
const intl = useIntl();
|
||||
const title = intl.formatMessage(messages.emoji);
|
||||
|
|
|
@ -804,7 +804,6 @@
|
|||
"home.column_settings.show_replies": "Show replies",
|
||||
"icon_button.icons": "Icons",
|
||||
"icon_button.label": "Select icon",
|
||||
"icon_button.not_found": "No icons!! (╯°□°)╯︵ ┻━┻",
|
||||
"import_data.actions.import": "Import",
|
||||
"import_data.actions.import_blocks": "Import blocks",
|
||||
"import_data.actions.import_follows": "Import follows",
|
||||
|
|
Ładowanie…
Reference in New Issue