mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-22 14:58:16 +00:00
[Glitch] Add "More" to the sidebar menu with links to mutes, blocks, and so on
Port f53bb4cd7d to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -17,7 +17,6 @@ import BookmarksActiveIcon from '@/material-icons/400-24px/bookmarks-fill.svg?re
|
||||
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 InfoIcon from '@/material-icons/400-24px/info.svg?react';
|
||||
@@ -50,16 +49,13 @@ import {
|
||||
me,
|
||||
} from 'flavours/glitch/initial_state';
|
||||
import { transientSingleColumn } from 'flavours/glitch/is_mobile';
|
||||
import {
|
||||
canManageReports,
|
||||
canViewAdminDashboard,
|
||||
} from 'flavours/glitch/permissions';
|
||||
import { selectUnreadNotificationGroupsCount } from 'flavours/glitch/selectors/notifications';
|
||||
import { useAppSelector, useAppDispatch } from 'flavours/glitch/store';
|
||||
|
||||
import { ColumnLink } from './column_link';
|
||||
import DisabledAccountBanner from './disabled_account_banner';
|
||||
import { ListPanel } from './list_panel';
|
||||
import { MoreLink } from './more_link';
|
||||
import SignInBanner from './sign_in_banner';
|
||||
|
||||
const messages = defineMessages({
|
||||
@@ -77,11 +73,6 @@ const messages = defineMessages({
|
||||
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',
|
||||
@@ -250,7 +241,7 @@ const MENU_WIDTH = 284;
|
||||
|
||||
export const NavigationPanel: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
const { signedIn, disabledAccountId, permissions } = useIdentity();
|
||||
const { signedIn, disabledAccountId } = useIdentity();
|
||||
const open = useAppSelector((state) => state.navigation.open);
|
||||
const dispatch = useAppDispatch();
|
||||
const openable = useBreakpoint('openable');
|
||||
@@ -489,31 +480,13 @@ export const NavigationPanel: React.FC = () => {
|
||||
text={intl.formatMessage(messages.app_settings)}
|
||||
/>
|
||||
|
||||
{canManageReports(permissions) && (
|
||||
<ColumnLink
|
||||
optional
|
||||
transparent
|
||||
href='/admin/reports'
|
||||
icon='flag'
|
||||
iconComponent={ModerationIcon}
|
||||
text={intl.formatMessage(messages.moderation)}
|
||||
/>
|
||||
)}
|
||||
{canViewAdminDashboard(permissions) && (
|
||||
<ColumnLink
|
||||
optional
|
||||
transparent
|
||||
href='/admin/dashboard'
|
||||
icon='tachometer'
|
||||
iconComponent={AdministrationIcon}
|
||||
text={intl.formatMessage(messages.administration)}
|
||||
/>
|
||||
)}
|
||||
<MoreLink />
|
||||
</>
|
||||
)}
|
||||
|
||||
<div className='navigation-panel__legal'>
|
||||
<hr />
|
||||
|
||||
<ColumnLink
|
||||
transparent
|
||||
to='/about'
|
||||
|
||||
Reference in New Issue
Block a user