From 54d4ece7432a34a2ba24617851f04801e5a389d8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 3 Mar 2022 06:45:30 +0100 Subject: [PATCH] Remove profile directory link from main navigation panel (#17688) --- .../mastodon/features/getting_started/index.js | 17 +---------------- .../features/ui/components/link_footer.js | 3 ++- .../features/ui/components/navigation_panel.js | 3 +-- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/app/javascript/mastodon/features/getting_started/index.js b/app/javascript/mastodon/features/getting_started/index.js index 5508adb80..07572c530 100644 --- a/app/javascript/mastodon/features/getting_started/index.js +++ b/app/javascript/mastodon/features/getting_started/index.js @@ -7,7 +7,7 @@ import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { me, profile_directory, showTrends } from '../../initial_state'; +import { me, showTrends } from '../../initial_state'; import { fetchFollowRequests } from 'mastodon/actions/accounts'; import { List as ImmutableList } from 'immutable'; import NavigationContainer from '../compose/containers/navigation_container'; @@ -35,7 +35,6 @@ const messages = defineMessages({ personal: { id: 'navigation_bar.personal', defaultMessage: 'Personal' }, security: { id: 'navigation_bar.security', defaultMessage: 'Security' }, menu: { id: 'getting_started.heading', defaultMessage: 'Getting started' }, - profile_directory: { id: 'getting_started.directory', defaultMessage: 'Profile directory' }, }); const mapStateToProps = state => ({ @@ -104,25 +103,11 @@ class GettingStarted extends ImmutablePureComponent { height += 34 + 48*2; - if (profile_directory) { - navItems.push( - , - ); - - height += 48; - } - navItems.push( , ); height += 34; - } else if (profile_directory) { - navItems.push( - , - ); - - height += 48; } if (multiColumn && !columns.find(item => item.get('id') === 'HOME')) { diff --git a/app/javascript/mastodon/features/ui/components/link_footer.js b/app/javascript/mastodon/features/ui/components/link_footer.js index 4a9243c9e..edf1104c4 100644 --- a/app/javascript/mastodon/features/ui/components/link_footer.js +++ b/app/javascript/mastodon/features/ui/components/link_footer.js @@ -3,7 +3,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'; import { Link } from 'react-router-dom'; -import { invitesEnabled, limitedFederationMode, version, repository, source_url } from 'mastodon/initial_state'; +import { invitesEnabled, limitedFederationMode, version, repository, source_url, profile_directory as profileDirectory } from 'mastodon/initial_state'; import { logOut } from 'mastodon/utils/log_out'; import { openModal } from 'mastodon/actions/modal'; @@ -52,6 +52,7 @@ class LinkFooter extends React.PureComponent { {withHotkeys &&
  • ·
  • }
  • ·
  • {!limitedFederationMode &&
  • ·
  • } + {profileDirectory &&
  • ·
  • }
  • ·
  • ·
  • ·
  • diff --git a/app/javascript/mastodon/features/ui/components/navigation_panel.js b/app/javascript/mastodon/features/ui/components/navigation_panel.js index a70e5ab61..51a0757bc 100644 --- a/app/javascript/mastodon/features/ui/components/navigation_panel.js +++ b/app/javascript/mastodon/features/ui/components/navigation_panel.js @@ -2,7 +2,7 @@ import React from 'react'; import { NavLink, withRouter } from 'react-router-dom'; import { FormattedMessage } from 'react-intl'; import Icon from 'mastodon/components/icon'; -import { profile_directory, showTrends } from 'mastodon/initial_state'; +import { showTrends } from 'mastodon/initial_state'; import NotificationsCounterIcon from './notifications_counter_icon'; import FollowRequestsNavLink from './follow_requests_nav_link'; import ListPanel from './list_panel'; @@ -20,7 +20,6 @@ const NavigationPanel = () => ( - {profile_directory && }