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.
39 lines
1.5 KiB
39 lines
1.5 KiB
8 years ago
|
import React from 'react';
|
||
7 years ago
|
import PropTypes from 'prop-types';
|
||
8 years ago
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||
7 years ago
|
import Avatar from 'flavours/glitch/components/avatar';
|
||
|
import IconButton from 'flavours/glitch/components/icon_button';
|
||
|
import Permalink from 'flavours/glitch/components/permalink';
|
||
8 years ago
|
import { FormattedMessage } from 'react-intl';
|
||
8 years ago
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||
8 years ago
|
|
||
8 years ago
|
export default class NavigationBar extends ImmutablePureComponent {
|
||
8 years ago
|
|
||
8 years ago
|
static propTypes = {
|
||
8 years ago
|
account: ImmutablePropTypes.map.isRequired,
|
||
7 years ago
|
onClose: PropTypes.func.isRequired,
|
||
8 years ago
|
};
|
||
|
|
||
8 years ago
|
render () {
|
||
|
return (
|
||
8 years ago
|
<div className='navigation-bar'>
|
||
8 years ago
|
<Permalink href={this.props.account.get('url')} to={`/accounts/${this.props.account.get('id')}`}>
|
||
7 years ago
|
<span style={{ display: 'none' }}>{this.props.account.get('acct')}</span>
|
||
7 years ago
|
<Avatar account={this.props.account} size={40} />
|
||
8 years ago
|
</Permalink>
|
||
8 years ago
|
|
||
8 years ago
|
<div className='navigation-bar__profile'>
|
||
8 years ago
|
<Permalink href={this.props.account.get('url')} to={`/accounts/${this.props.account.get('id')}`}>
|
||
|
<strong className='navigation-bar__profile-account'>@{this.props.account.get('acct')}</strong>
|
||
|
</Permalink>
|
||
8 years ago
|
|
||
8 years ago
|
<a href='/settings/profile' className='navigation-bar__profile-edit'><FormattedMessage id='navigation_bar.edit_profile' defaultMessage='Edit profile' /></a>
|
||
8 years ago
|
</div>
|
||
7 years ago
|
|
||
|
<IconButton title='' icon='close' onClick={this.props.onClose} />
|
||
8 years ago
|
</div>
|
||
|
);
|
||
|
}
|
||
|
|
||
8 years ago
|
}
|