2020-08-08 22:29:28 -07:00
|
|
|
import React from 'react';
|
2020-08-10 20:03:28 -07:00
|
|
|
import PropTypes from 'prop-types';
|
2020-08-08 22:29:28 -07:00
|
|
|
import Icon from 'soapbox/components/icon';
|
2020-08-09 12:37:02 -07:00
|
|
|
import { NavLink } from 'react-router-dom';
|
2020-08-10 20:03:28 -07:00
|
|
|
import { injectIntl, defineMessages } from 'react-intl';
|
2020-08-08 22:29:28 -07:00
|
|
|
|
2020-08-10 20:03:28 -07:00
|
|
|
const messages = defineMessages({
|
|
|
|
edit_profile: { id: 'account.edit_profile', defaultMessage: 'Edit Profile' },
|
|
|
|
preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },
|
|
|
|
security: { id: 'navigation_bar.security', defaultMessage: 'Security' },
|
|
|
|
lists: { id: 'column.lists', defaultMessage: 'Lists' },
|
|
|
|
bookmarks: { id: 'column.bookmarks', defaultMessage: 'Bookmarks' },
|
|
|
|
});
|
|
|
|
|
|
|
|
export default
|
|
|
|
@injectIntl
|
|
|
|
class FeaturesPanel extends React.PureComponent {
|
|
|
|
|
|
|
|
static propTypes = {
|
|
|
|
intl: PropTypes.object.isRequired,
|
|
|
|
};
|
2020-08-08 22:29:28 -07:00
|
|
|
|
|
|
|
render() {
|
2020-08-10 20:03:28 -07:00
|
|
|
const { intl } = this.props;
|
|
|
|
|
2020-08-08 22:29:28 -07:00
|
|
|
return (
|
|
|
|
<div className='wtf-panel promo-panel'>
|
|
|
|
<div className='promo-panel__container'>
|
|
|
|
|
|
|
|
<div className='promo-panel-item'>
|
2020-08-09 12:37:02 -07:00
|
|
|
<NavLink className='promo-panel-item__btn' to='/settings/profile'>
|
2020-08-08 22:29:28 -07:00
|
|
|
<Icon id='user' className='promo-panel-item__icon' fixedWidth />
|
2020-08-10 20:03:28 -07:00
|
|
|
{intl.formatMessage(messages.edit_profile)}
|
2020-08-09 12:37:02 -07:00
|
|
|
</NavLink>
|
2020-08-08 22:29:28 -07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className='promo-panel-item'>
|
2020-08-09 12:37:02 -07:00
|
|
|
<NavLink className='promo-panel-item__btn' to='/bookmarks'>
|
2020-08-08 22:29:28 -07:00
|
|
|
<Icon id='bookmark' className='promo-panel-item__icon' fixedWidth />
|
2020-08-10 20:03:28 -07:00
|
|
|
{intl.formatMessage(messages.bookmarks)}
|
2020-08-09 12:37:02 -07:00
|
|
|
</NavLink>
|
2020-08-08 22:29:28 -07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className='promo-panel-item'>
|
2020-08-09 12:37:02 -07:00
|
|
|
<NavLink className='promo-panel-item__btn' to='/lists'>
|
2020-08-08 22:29:28 -07:00
|
|
|
<Icon id='list' className='promo-panel-item__icon' fixedWidth />
|
2020-08-10 20:03:28 -07:00
|
|
|
{intl.formatMessage(messages.lists)}
|
2020-08-09 12:37:02 -07:00
|
|
|
</NavLink>
|
2020-08-08 22:29:28 -07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className='promo-panel-item'>
|
2020-08-09 12:37:02 -07:00
|
|
|
<NavLink className='promo-panel-item__btn' to='/auth/edit'>
|
2020-08-08 22:29:28 -07:00
|
|
|
<Icon id='lock' className='promo-panel-item__icon' fixedWidth />
|
2020-08-10 20:03:28 -07:00
|
|
|
{intl.formatMessage(messages.security)}
|
2020-08-09 12:37:02 -07:00
|
|
|
</NavLink>
|
2020-08-08 22:29:28 -07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className='promo-panel-item'>
|
2020-08-09 12:37:02 -07:00
|
|
|
<NavLink className='promo-panel-item__btn' to='/settings/preferences'>
|
2020-08-08 22:29:28 -07:00
|
|
|
<Icon id='cog' className='promo-panel-item__icon' fixedWidth />
|
2020-08-10 20:03:28 -07:00
|
|
|
{intl.formatMessage(messages.preferences)}
|
2020-08-09 12:37:02 -07:00
|
|
|
</NavLink>
|
2020-08-08 22:29:28 -07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|