mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-24 06:58:06 +01:00
0338da1699
* Add profile options on compose form * Remove unused imports to appease codeclimate * Play nicely with cancel button and use ellipsis-v instead of hamburger * Fix whitespace and quotes to appease codeclimate
53 lines
2.3 KiB
JavaScript
53 lines
2.3 KiB
JavaScript
import React from 'react';
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
import PropTypes from 'prop-types';
|
|
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
|
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
|
|
const messages = defineMessages({
|
|
edit_profile: { id: 'account.edit_profile', defaultMessage: 'Edit profile' },
|
|
pins: { id: 'navigation_bar.pins', defaultMessage: 'Pinned toots' },
|
|
preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },
|
|
follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },
|
|
favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' },
|
|
lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' },
|
|
blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' },
|
|
domain_blocks: { id: 'navigation_bar.domain_blocks', defaultMessage: 'Hidden domains' },
|
|
mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' },
|
|
});
|
|
|
|
@injectIntl
|
|
export default class ActionBar extends React.PureComponent {
|
|
|
|
static propTypes = {
|
|
account: ImmutablePropTypes.map.isRequired,
|
|
intl: PropTypes.object.isRequired,
|
|
};
|
|
|
|
render () {
|
|
const { intl } = this.props;
|
|
|
|
let menu = [];
|
|
|
|
menu.push({ text: intl.formatMessage(messages.edit_profile), href: '/settings/profile' });
|
|
menu.push({ text: intl.formatMessage(messages.preferences), href: '/settings/preferences' });
|
|
menu.push({ text: intl.formatMessage(messages.pins), to: '/pinned' });
|
|
menu.push(null);
|
|
menu.push({ text: intl.formatMessage(messages.follow_requests), to: '/follow_requests' });
|
|
menu.push({ text: intl.formatMessage(messages.favourites), to: '/favourites' });
|
|
menu.push({ text: intl.formatMessage(messages.lists), to: '/lists' });
|
|
menu.push(null);
|
|
menu.push({ text: intl.formatMessage(messages.mutes), to: '/mutes' });
|
|
menu.push({ text: intl.formatMessage(messages.blocks), to: '/blocks' });
|
|
menu.push({ text: intl.formatMessage(messages.domain_blocks), to: '/domain_blocks' });
|
|
|
|
return (
|
|
<div className='compose__action-bar'>
|
|
<div className='compose__action-bar-dropdown'>
|
|
<DropdownMenuContainer items={menu} icon='ellipsis-v' size={24} direction='right' />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
}
|