Fixed leave direct channel button for users with a long username
Этот коммит содержится в:
@@ -345,15 +345,16 @@ export default class Sidebar extends React.Component {
|
|||||||
linkClass = 'active';
|
linkClass = 'active';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let rowClass = 'sidebar-channel';
|
||||||
|
|
||||||
var unread = false;
|
var unread = false;
|
||||||
if (channelMember) {
|
if (channelMember) {
|
||||||
msgCount = channel.total_msg_count - channelMember.msg_count;
|
msgCount = channel.total_msg_count - channelMember.msg_count;
|
||||||
unread = (msgCount > 0 && channelMember.notify_props.mark_unread !== 'mention') || channelMember.mention_count > 0;
|
unread = (msgCount > 0 && channelMember.notify_props.mark_unread !== 'mention') || channelMember.mention_count > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
var titleClass = '';
|
|
||||||
if (unread) {
|
if (unread) {
|
||||||
titleClass = 'unread-title';
|
rowClass += ' unread-title';
|
||||||
|
|
||||||
if (channel.id !== activeId) {
|
if (channel.id !== activeId) {
|
||||||
if (!this.firstUnreadChannel) {
|
if (!this.firstUnreadChannel) {
|
||||||
@@ -386,9 +387,8 @@ export default class Sidebar extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
var badgeClass;
|
|
||||||
if (msgCount > 0) {
|
if (msgCount > 0) {
|
||||||
badgeClass = 'has-badge';
|
rowClass += ' has-badge';
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up status icon for direct message channels
|
// set up status icon for direct message channels
|
||||||
@@ -458,12 +458,14 @@ export default class Sidebar extends React.Component {
|
|||||||
if (handleClose && !badge) {
|
if (handleClose && !badge) {
|
||||||
closeButton = (
|
closeButton = (
|
||||||
<span
|
<span
|
||||||
className='sidebar-channel__close pull-right'
|
className='close-btn pull-right small'
|
||||||
data-close='true'
|
data-close='true'
|
||||||
>
|
>
|
||||||
{'×'}
|
{'×'}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
rowClass = ' has-close';
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -473,7 +475,7 @@ export default class Sidebar extends React.Component {
|
|||||||
className={linkClass}
|
className={linkClass}
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
className={'sidebar-channel ' + titleClass + ' ' + badgeClass}
|
className={rowClass}
|
||||||
href={href}
|
href={href}
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -95,6 +95,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.close-btn {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.badge-notify {
|
.badge-notify {
|
||||||
background:red;
|
background:red;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -98,6 +98,9 @@
|
|||||||
&.has-badge {
|
&.has-badge {
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
}
|
}
|
||||||
|
&.has-close {
|
||||||
|
padding-right: 30px;
|
||||||
|
}
|
||||||
&.nav-more {
|
&.nav-more {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user