Improve SidebarMenu design

profile-avatar-switcher
Alex Gleason 2021-09-12 18:36:52 -05:00
rodzic e0f97f4e99
commit 9a33215528
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 30 dodań i 12 usunięć

Wyświetl plik

@ -5,7 +5,7 @@ import { throttle } from 'lodash';
import { Link, NavLink } from 'react-router-dom';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { injectIntl, defineMessages, FormattedMessage } from 'react-intl';
import { injectIntl, defineMessages } from 'react-intl';
import classNames from 'classnames';
import Avatar from './avatar';
import IconButton from './icon_button';
@ -168,17 +168,10 @@ class SidebarMenu extends ImmutablePureComponent {
<div className={classes}>
<div className='sidebar-menu__wrapper' role='button' onClick={this.handleClose} />
<div className='sidebar-menu'>
<div className='sidebar-menu-header'>
<span className='sidebar-menu-header__title'>
<FormattedMessage id='tabs_bar.header' defaultMessage='Account Info' />
</span>
<IconButton title='close' onClick={this.handleClose} icon='close' className='sidebar-menu-header__btn' />
</div>
<div className='sidebar-menu__content'>
<div className='sidebar-menu-profile'>
<IconButton title='close' onClick={this.handleClose} icon='times' className='sidebar-menu__close' />
<div className='sidebar-menu-profile__avatar'>
<Link to={`/@${acct}`} title={acct} onClick={this.handleClose}>
<Avatar account={account} />
@ -284,6 +277,7 @@ class SidebarMenu extends ImmutablePureComponent {
<div className='sidebar-menu__section'>
<Link className='sidebar-menu-item' to='/auth/sign_out' onClick={onClickLogOut}>
<Icon id='sign-out' />
<span className='sidebar-menu-item__title'>{intl.formatMessage(messages.logout)}</span>
</Link>
</div>

Wyświetl plik

@ -29,6 +29,7 @@
}
&__content {
position: relative;
overflow-y: scroll;
overflow: auto;
height: 100%;
@ -84,6 +85,21 @@
}
}
.sidebar-menu__close {
position: absolute;
top: 22px;
right: 18px;
i.fa {
font-size: 20px;
}
.svg-icon {
width: 20px;
height: 20px;
}
}
.sidebar-menu-profile {
display: flex;
flex-direction: column;
@ -161,18 +177,26 @@
color: var(--primary-text-color--faint);
font-size: 15px;
font-weight: 400;
align-items: center;
&:hover {
background-color: hsla(var(--brand-color_hsl), 0.1);
color: var(--primary-text-color);
}
.fa {
width: 18px;
margin-right: 10px;
> .fa {
width: 24px;
font-size: 20px;
margin-right: 15px;
text-align: center;
}
> .svg-icon {
width: 24px;
height: 24px;
margin-right: 15px;
}
&:hover {
&__title {
color: var(--primary-text-color);