|
|
|
@ -7,16 +7,17 @@ import { Link } from 'react-router-dom';
|
|
|
|
|
|
|
|
|
|
import { useSelector, useDispatch } from 'react-redux';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import AlternateEmailIcon from '@/material-icons/400-24px/alternate_email.svg?react';
|
|
|
|
|
import BookmarksActiveIcon from '@/material-icons/400-24px/bookmarks-fill.svg?react';
|
|
|
|
|
import BookmarksIcon from '@/material-icons/400-24px/bookmarks.svg?react';
|
|
|
|
|
import ExploreActiveIcon from '@/material-icons/400-24px/explore-fill.svg?react';
|
|
|
|
|
import ExploreIcon from '@/material-icons/400-24px/explore.svg?react';
|
|
|
|
|
import ModerationIcon from '@/material-icons/400-24px/gavel.svg?react';
|
|
|
|
|
import HomeActiveIcon from '@/material-icons/400-24px/home-fill.svg?react';
|
|
|
|
|
import HomeIcon from '@/material-icons/400-24px/home.svg?react';
|
|
|
|
|
import ListAltActiveIcon from '@/material-icons/400-24px/list_alt-fill.svg?react';
|
|
|
|
|
import ListAltIcon from '@/material-icons/400-24px/list_alt.svg?react';
|
|
|
|
|
import AdministrationIcon from '@/material-icons/400-24px/manufacturing.svg?react';
|
|
|
|
|
import MoreHorizIcon from '@/material-icons/400-24px/more_horiz.svg?react';
|
|
|
|
|
import NotificationsActiveIcon from '@/material-icons/400-24px/notifications-fill.svg?react';
|
|
|
|
|
import NotificationsIcon from '@/material-icons/400-24px/notifications.svg?react';
|
|
|
|
@ -34,6 +35,7 @@ import { NavigationPortal } from 'mastodon/components/navigation_portal';
|
|
|
|
|
import { identityContextPropShape, withIdentity } from 'mastodon/identity_context';
|
|
|
|
|
import { timelinePreview, trendsEnabled } from 'mastodon/initial_state';
|
|
|
|
|
import { transientSingleColumn } from 'mastodon/is_mobile';
|
|
|
|
|
import { canManageReports, canViewAdminDashboard } from 'mastodon/permissions';
|
|
|
|
|
import { selectUnreadNotificationGroupsCount } from 'mastodon/selectors/notifications';
|
|
|
|
|
|
|
|
|
|
import ColumnLink from './column_link';
|
|
|
|
@ -51,6 +53,8 @@ const messages = defineMessages({
|
|
|
|
|
bookmarks: { id: 'navigation_bar.bookmarks', defaultMessage: 'Bookmarks' },
|
|
|
|
|
lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' },
|
|
|
|
|
preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },
|
|
|
|
|
administration: { id: 'navigation_bar.administration', defaultMessage: 'Administration' },
|
|
|
|
|
moderation: { id: 'navigation_bar.moderation', defaultMessage: 'Moderation' },
|
|
|
|
|
followsAndFollowers: { id: 'navigation_bar.follows_and_followers', defaultMessage: 'Follows and followers' },
|
|
|
|
|
about: { id: 'navigation_bar.about', defaultMessage: 'About' },
|
|
|
|
|
search: { id: 'navigation_bar.search', defaultMessage: 'Search' },
|
|
|
|
@ -114,7 +118,7 @@ class NavigationPanel extends Component {
|
|
|
|
|
|
|
|
|
|
render () {
|
|
|
|
|
const { intl } = this.props;
|
|
|
|
|
const { signedIn, disabledAccountId } = this.props.identity;
|
|
|
|
|
const { signedIn, disabledAccountId, permissions } = this.props.identity;
|
|
|
|
|
|
|
|
|
|
let banner = undefined;
|
|
|
|
|
|
|
|
|
@ -176,6 +180,9 @@ class NavigationPanel extends Component {
|
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
|
|
<ColumnLink transparent href='/settings/preferences' icon='cog' iconComponent={SettingsIcon} text={intl.formatMessage(messages.preferences)} />
|
|
|
|
|
|
|
|
|
|
{canManageReports(permissions) && <ColumnLink transparent href='/admin/reports' icon='flag' iconComponent={ModerationIcon} text={intl.formatMessage(messages.moderation)} />}
|
|
|
|
|
{canViewAdminDashboard(permissions) && <ColumnLink transparent href='/admin/dashboard' icon='tachometer' iconComponent={AdministrationIcon} text={intl.formatMessage(messages.administration)} />}
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|