You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.3 KiB

  1. import PureRenderMixin from 'react-addons-pure-render-mixin';
  2. import ImmutablePropTypes from 'react-immutable-proptypes';
  3. import Avatar from '../../../components/avatar';
  4. import IconButton from '../../../components/icon_button';
  5. import DisplayName from '../../../components/display_name';
  6. import Permalink from '../../../components/permalink';
  7. import { FormattedMessage } from 'react-intl';
  8. import { Link } from 'react-router';
  9. const NavigationBar = React.createClass({
  10. propTypes: {
  11. account: ImmutablePropTypes.map.isRequired
  12. },
  13. mixins: [PureRenderMixin],
  14. render () {
  15. return (
  16. <div style={{ padding: '10px', display: 'flex', flexShrink: '0', cursor: 'default' }}>
  17. <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>
  18. <div style={{ flex: '1 1 auto', marginLeft: '8px', color: '#9baec8' }}>
  19. <strong style={{ fontWeight: '500', display: 'block', color: '#fff' }}>{this.props.account.get('acct')}</strong>
  20. <a href='/settings/profile' style={{ color: 'inherit', textDecoration: 'none' }}><FormattedMessage id='navigation_bar.edit_profile' defaultMessage='Edit profile' /></a>
  21. </div>
  22. </div>
  23. );
  24. }
  25. });
  26. export default NavigationBar;