From efbc8cba17a680ac983b64236b030f814b27ab2c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 11 Mar 2024 09:57:23 +0100 Subject: [PATCH] [Glitch] Change dropdown menu icon to not be replaced by close icon when open in web UI Port 2347ea813e5be2ecf762c8a275373a3e2bea56e8 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/components/dropdown_menu.jsx | 3 +-- app/javascript/flavours/glitch/features/ui/index.jsx | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/javascript/flavours/glitch/components/dropdown_menu.jsx b/app/javascript/flavours/glitch/components/dropdown_menu.jsx index 4d9c34a762..26c828fd64 100644 --- a/app/javascript/flavours/glitch/components/dropdown_menu.jsx +++ b/app/javascript/flavours/glitch/components/dropdown_menu.jsx @@ -9,7 +9,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { supportsPassiveEvents } from 'detect-passive-events'; import Overlay from 'react-overlays/Overlay'; -import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { CircularProgress } from 'flavours/glitch/components/circular_progress'; import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router'; @@ -298,7 +297,7 @@ class Dropdown extends PureComponent { }) : ( ({ hasMediaAttachments: state.getIn(['compose', 'media_attachments']).size > 0, canUploadMore: !state.getIn(['compose', 'media_attachments']).some(x => ['audio', 'video'].includes(x.get('type'))) && state.getIn(['compose', 'media_attachments']).size < 4, isWide: state.getIn(['local_settings', 'stretch']), - dropdownMenuIsOpen: state.dropdownMenu.openId !== null, unreadNotifications: state.getIn(['notifications', 'unread']), showFaviconBadge: state.getIn(['local_settings', 'notifications', 'favicon_badge']), hicolorPrivacyIcons: state.getIn(['local_settings', 'hicolor_privacy_icons']), @@ -274,7 +273,6 @@ class UI extends PureComponent { hasMediaAttachments: PropTypes.bool, canUploadMore: PropTypes.bool, intl: PropTypes.object.isRequired, - dropdownMenuIsOpen: PropTypes.bool, unreadNotifications: PropTypes.number, showFaviconBadge: PropTypes.bool, hicolorPrivacyIcons: PropTypes.bool, @@ -600,7 +598,7 @@ class UI extends PureComponent { render () { const { draggingOver } = this.state; - const { children, isWide, location, dropdownMenuIsOpen, layout, moved } = this.props; + const { children, isWide, location, layout, moved } = this.props; const className = classNames('ui', { 'wide': isWide, @@ -632,7 +630,7 @@ class UI extends PureComponent { return ( -
+
{moved && (