diff options
author | Joram Wilander <jwawilander@gmail.com> | 2015-10-13 22:53:36 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2015-10-13 22:53:36 -0400 |
commit | 888ab49e23b8f9dedba0870b63faff3e0e06efc7 (patch) | |
tree | 2a2295df5e39eda51b368bff9f1bfa1d6fd79dfd /web/react | |
parent | 52a87446ce75462d6f1c489d8b7fd487d759a19f (diff) | |
parent | 3f2b6bfa27fb8e4d2a56fa5f3ea625314f4f0e72 (diff) | |
download | chat-888ab49e23b8f9dedba0870b63faff3e0e06efc7.tar.gz chat-888ab49e23b8f9dedba0870b63faff3e0e06efc7.tar.bz2 chat-888ab49e23b8f9dedba0870b63faff3e0e06efc7.zip |
Merge pull request #1042 from hmhealey/plt322-followup
PLT-322 Fixed leave direct channel button for users with a long username
Diffstat (limited to 'web/react')
-rw-r--r-- | web/react/components/sidebar.jsx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx index 1caf4caa5..a1a5b64ba 100644 --- a/web/react/components/sidebar.jsx +++ b/web/react/components/sidebar.jsx @@ -345,15 +345,16 @@ export default class Sidebar extends React.Component { linkClass = 'active'; } + let rowClass = 'sidebar-channel'; + var unread = false; if (channelMember) { msgCount = channel.total_msg_count - channelMember.msg_count; unread = (msgCount > 0 && channelMember.notify_props.mark_unread !== 'mention') || channelMember.mention_count > 0; } - var titleClass = ''; if (unread) { - titleClass = 'unread-title'; + rowClass += ' unread-title'; if (channel.id !== activeId) { if (!this.firstUnreadChannel) { @@ -386,9 +387,8 @@ export default class Sidebar extends React.Component { ); } - var badgeClass; if (msgCount > 0) { - badgeClass = 'has-badge'; + rowClass += ' has-badge'; } // set up status icon for direct message channels @@ -458,12 +458,14 @@ export default class Sidebar extends React.Component { if (handleClose && !badge) { closeButton = ( <span - className='sidebar-channel__close pull-right' + className='close-btn pull-right small' data-close='true' > {'×'} </span> ); + + rowClass = ' has-close'; } return ( @@ -473,7 +475,7 @@ export default class Sidebar extends React.Component { className={linkClass} > <a - className={'sidebar-channel ' + titleClass + ' ' + badgeClass} + className={rowClass} href={href} onClick={handleClick} > |