Removed unused composer navigation bar component

• Removed:
- unused composer navigation bar component
This commit is contained in:
mgabdev 2020-05-25 15:54:52 -04:00
parent b031cf3ff1
commit 0b441ba63e
3 changed files with 0 additions and 138 deletions

View File

@ -1 +0,0 @@
export { default } from './navigation_bar'

View File

@ -1,48 +0,0 @@
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage } from 'react-intl';
import Avatar from '../../../../components/avatar';
import Button from '../../../../components/button'
import { me } from '../../../../initial_state';
const mapStateToProps = (state) => ({
account: state.getIn(['accounts', me]),
})
export default
@connect(mapStateToProps)
class NavigationBar extends ImmutablePureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,
onClose: PropTypes.func,
};
render () {
const { account } = this.props;
return (
<div className='navigation-bar'>
<Button href={account.get('url')} to={`/${account.get('acct')}`}>
<span style={{ display: 'none' }}>{account.get('acct')}</span>
<Avatar account={account} size={48} />
</Button>
<div className='navigation-bar__profile'>
<Button href={account.get('url')} to={`/${account.get('acct')}`}>
<strong className='navigation-bar__profile-account'>@{account.get('acct')}</strong>
</Button>
<a href='/settings/profile' className='navigation-bar__profile-edit'>
<FormattedMessage id='navigation_bar.edit_profile' defaultMessage='Edit profile' />
</a>
</div>
<div className='navigation-bar__actions'>
<Button className='close' title='' icon='close' onClick={this.props.onClose} />
</div>
</div>
);
}
}

View File

@ -1,89 +0,0 @@
.navigation-bar {
padding: 10px;
display: flex;
align-items: center;
flex-shrink: 0;
cursor: default;
color: $darker-text-color;
strong {
color: $secondary-text-color;
}
a {
color: inherit;
}
.permalink {
text-decoration: none;
}
&__actions {
position: relative;
.icon-button.close {
position: absolute;
pointer-events: none;
transform: scale(0.0, 1.0) translate(-100%, 0);
opacity: 0;
}
.compose__action-bar .icon-button {
pointer-events: auto;
transform: scale(1.0, 1.0) translate(0, 0);
opacity: 1;
}
}
&__profile {
flex: 1 1 auto;
margin-left: 8px;
line-height: 20px;
margin-top: -1px;
overflow: hidden;
}
&__profile-account {
display: block;
font-weight: 500;
@include text-overflow(nowrap);
}
&__profile-edit {
color: inherit;
text-decoration: none;
}
@media screen and (max-width: 630px) and (max-height: 400px) {
$duration: 400ms;
$delay: 100ms;
will-change: padding-bottom;
transition: padding-bottom $duration $delay;
&>a:first-child {
will-change: margin-top, margin-left, margin-right, width;
transition: margin-top $duration $delay, margin-left $duration ($duration + $delay), margin-right $duration ($duration + $delay);
}
&__profile-edit {
will-change: margin-top;
transition: margin-top $duration $delay;
}
&__actions {
>.icon-button.close {
will-change: opacity transform;
transition: opacity $duration * 0.5 $delay,
transform $duration $delay;
}
.compose__action-bar .icon-button {
will-change: opacity transform;
transition: opacity $duration * 0.5 $delay + $duration * 0.5,
transform $duration $delay;
}
}
}
}