diff --git a/app/javascript/mastodon/features/ui/components/navigation_panel.jsx b/app/javascript/mastodon/features/ui/components/navigation_panel.jsx index b9aabb48c2..f3bf123415 100644 --- a/app/javascript/mastodon/features/ui/components/navigation_panel.jsx +++ b/app/javascript/mastodon/features/ui/components/navigation_panel.jsx @@ -1,10 +1,7 @@ import PropTypes from 'prop-types'; import { Component, useEffect } from 'react'; - import { defineMessages, injectIntl, useIntl } from 'react-intl'; - import { Link } from 'react-router-dom'; - import { useSelector, useDispatch } from 'react-redux'; import CirclesIcon from '@/material-icons/400-24px/account_circle-fill.svg?react'; @@ -33,6 +30,7 @@ import SettingsIcon from '@/material-icons/400-24px/settings.svg?react'; import StarActiveIcon from '@/material-icons/400-24px/star-fill.svg?react'; import StarIcon from '@/material-icons/400-24px/star.svg?react'; import AntennaIcon from '@/material-icons/400-24px/wifi.svg?react'; + import { fetchFollowRequests } from 'mastodon/actions/accounts'; import { IconWithBadge } from 'mastodon/components/icon_with_badge'; import { WordmarkLogo } from 'mastodon/components/logo'; @@ -75,7 +73,6 @@ const messages = defineMessages({ }); const NotificationsLink = () => { - const count = useSelector(selectUnreadNotificationGroupsCount); const intl = useIntl(); @@ -133,25 +130,20 @@ class NavigationPanel extends Component { const { intl } = this.props; const { signedIn, disabledAccountId, permissions } = this.props.identity; - const explorer = (trendsEnabled ? ( + const explorer = trendsEnabled ? ( ) : ( - )); - - let banner = undefined; + ); - if (transientSingleColumn) { - banner = ( -
- {intl.formatMessage(messages.openedInClassicInterface)} - {" "} - - {intl.formatMessage(messages.advancedInterface)} - -
- ); - } + const banner = transientSingleColumn ? ( +
+ {intl.formatMessage(messages.openedInClassicInterface)}{' '} + + {intl.formatMessage(messages.advancedInterface)} + +
+ ) : null; return (
@@ -159,125 +151,59 @@ class NavigationPanel extends Component {
- {banner && -
- {banner} -
- } + {banner &&
{banner}
}
{signedIn && ( <> - - )} - - {signedIn && enableLocalTimeline && ( - - )} - - {signedIn && enableDtlMenu && dtlTag && ( - - )} - - {!signedIn && explorer} - - {signedIn && ( - - )} - - {(!signedIn && timelinePreview) && ( - - )} - - {signedIn && ( - <> + {enableLocalTimeline && } + {enableDtlMenu && dtlTag && } +
- - )} - - {signedIn && ( - <> + + - - )} - - {signedIn && explorer} - - {signedIn && ( - <> + {explorer} - { !isHideItem('favourite_menu') && } + {!isHideItem('favourite_menu') && }
- - {canManageReports(permissions) && } {canViewAdminDashboard(permissions) && } )} {!signedIn && ( -
-
- { disabledAccountId ? : } -
+ <> + {explorer} + {(timelinePreview || enableLocalTimeline) && ( + + )} +
+
+ {disabledAccountId ? : } +
+ )} +
-
-
- - - - )} - - {signedIn && ( - <> - - - - - - - - - )} - - {signedIn && explorer} - - {signedIn && ( - <> - - { !isHideItem('favourite_menu') && } -
- - - - {canManageReports(permissions) && } - {canViewAdminDashboard(permissions) && } - - )} - - {!signedIn && ( -
-
- { disabledAccountId ? : } -
+
+
+
-
); } - } export default injectIntl(withIdentity(NavigationPanel));