diff --git a/app/javascript/mastodon/features/compose/components/action_bar.js b/app/javascript/mastodon/features/compose/components/action_bar.js index 11ab44335..ee584cb1b 100644 --- a/app/javascript/mastodon/features/compose/components/action_bar.js +++ b/app/javascript/mastodon/features/compose/components/action_bar.js @@ -7,38 +7,22 @@ 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 posts' }, - preferences: { - id: 'navigation_bar.preferences', - defaultMessage: 'Preferences', - }, - follow_requests: { - id: 'navigation_bar.follow_requests', - defaultMessage: 'Follow requests', - }, - activity_log: { - id: 'navigation_bar.activity_log', - defaultMessage: 'Activity log', - }, + 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' }, - followed_tags: { - id: 'navigation_bar.followed_tags', - defaultMessage: 'Followed hashtags', - }, + followed_tags: { id: 'navigation_bar.followed_tags', defaultMessage: 'Followed hashtags' }, blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' }, - domain_blocks: { - id: 'navigation_bar.domain_blocks', - defaultMessage: 'Hidden domains', - }, + domain_blocks: { id: 'navigation_bar.domain_blocks', defaultMessage: 'Hidden domains' }, mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' }, filters: { id: 'navigation_bar.filters', defaultMessage: 'Muted words' }, logout: { id: 'navigation_bar.logout', defaultMessage: 'Logout' }, bookmarks: { id: 'navigation_bar.bookmarks', defaultMessage: 'Bookmarks' }, }); -export default -@injectIntl +export default @injectIntl class ActionBar extends React.PureComponent { + static propTypes = { account: ImmutablePropTypes.map.isRequired, onLogout: PropTypes.func.isRequired, @@ -49,67 +33,35 @@ class ActionBar extends React.PureComponent { this.props.onLogout(); }; - render() { + 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.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.bookmarks), - to: '/bookmarks', - }); + 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.bookmarks), to: '/bookmarks' }); menu.push({ text: intl.formatMessage(messages.lists), to: '/lists' }); - menu.push({ - text: intl.formatMessage(messages.followed_tags), - to: '/followed_tags', - }); - menu.push({ - text: intl.formatMessage(messages.activity_log), - to: '/activity_log', - }); + menu.push({ text: intl.formatMessage(messages.followed_tags), to: '/followed_tags' }); 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', - }); + menu.push({ text: intl.formatMessage(messages.domain_blocks), to: '/domain_blocks' }); menu.push({ text: intl.formatMessage(messages.filters), href: '/filters' }); menu.push(null); - menu.push({ - text: intl.formatMessage(messages.logout), - action: this.handleLogout, - }); + menu.push({ text: intl.formatMessage(messages.logout), action: this.handleLogout }); return ( -
-
- +
+
+
); } + }