2016-12-02 15:05:50 +01:00
|
|
|
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
2016-09-13 02:24:40 +02:00
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
2016-12-02 15:05:50 +01:00
|
|
|
import Avatar from '../../../components/avatar';
|
2016-11-16 17:20:52 +01:00
|
|
|
import IconButton from '../../../components/icon_button';
|
|
|
|
import DisplayName from '../../../components/display_name';
|
2016-12-02 15:05:50 +01:00
|
|
|
import Permalink from '../../../components/permalink';
|
2016-11-16 17:20:52 +01:00
|
|
|
import { FormattedMessage } from 'react-intl';
|
2016-12-02 15:05:50 +01:00
|
|
|
import { Link } from 'react-router';
|
2016-09-13 02:24:40 +02:00
|
|
|
|
|
|
|
const NavigationBar = React.createClass({
|
|
|
|
propTypes: {
|
|
|
|
account: ImmutablePropTypes.map.isRequired
|
|
|
|
},
|
|
|
|
|
|
|
|
mixins: [PureRenderMixin],
|
|
|
|
|
|
|
|
render () {
|
|
|
|
return (
|
2017-02-09 01:20:09 +01:00
|
|
|
<div className='navigation-bar'>
|
2016-12-02 15:05:50 +01:00
|
|
|
<Permalink href={this.props.account.get('url')} to={`/accounts/${this.props.account.get('id')}`} style={{ textDecoration: 'none' }}><Avatar src={this.props.account.get('avatar')} size={40} /></Permalink>
|
2016-09-13 02:24:40 +02:00
|
|
|
|
2017-02-09 01:20:09 +01:00
|
|
|
<div style={{ flex: '1 1 auto', marginLeft: '8px' }}>
|
|
|
|
<strong style={{ fontWeight: '500', display: 'block' }}>{this.props.account.get('acct')}</strong>
|
2017-01-06 22:09:55 +01:00
|
|
|
<a href='/settings/profile' style={{ color: 'inherit', textDecoration: 'none' }}><FormattedMessage id='navigation_bar.edit_profile' defaultMessage='Edit profile' /></a>
|
2016-09-13 02:24:40 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
export default NavigationBar;
|