diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx index a20c5cad5d..a0084ad30a 100644 --- a/web/react/components/more_channels.jsx +++ b/web/react/components/more_channels.jsx @@ -83,7 +83,7 @@ export default class MoreChannels extends React.Component { moreChannels = ; } else if (channels.length) { moreChannels = ( - +
{channels.map(function cMap(channel, index) { var joinButton; @@ -108,8 +108,8 @@ export default class MoreChannels extends React.Component { return ( + + + ); } + componentDidUpdate(prevProps) { + if (!prevProps.show && this.props.show) { + $(ReactDOM.findDOMNode(this.refs.userList)).css('max-height', $(window).height() - 300); + if ($(window).width() > 768) { + $(ReactDOM.findDOMNode(this.refs.userList)).perfectScrollbar(); + } + } + } + render() { if (!this.props.show) { return null; @@ -213,7 +220,7 @@ export default class MoreDirectChannels extends React.Component { const userEntries = users.map(this.createRowForUser); if (userEntries.length === 0) { - userEntries.push(
  • {'No users found :('}
  • ); + userEntries.push(); } let memberString = 'Member'; @@ -232,26 +239,35 @@ export default class MoreDirectChannels extends React.Component { - {'More Direct Messages'} + {'Team Directory'} -
    - - {count} +
    +
    + +
    +
    + {count} +
    +
    +
    +
    -

    {channel.display_name}

    -

    {channel.description}

    +

    {channel.display_name}

    +

    {channel.description}

    {joinButton} diff --git a/web/react/components/more_direct_channels.jsx b/web/react/components/more_direct_channels.jsx index 08b64de8be..1051990352 100644 --- a/web/react/components/more_direct_channels.jsx +++ b/web/react/components/more_direct_channels.jsx @@ -140,12 +140,12 @@ export default class MoreDirectChannels extends React.Component { if (user.nickname) { const separator = fullName ? ' - ' : ''; details.push( - {separator + user.nickname} - +

    ); } @@ -170,31 +170,38 @@ export default class MoreDirectChannels extends React.Component { } return ( -
  • -
    +
  • - -
    -
    +
    {user.username}
    -
    - {details} -
    -
    -
    + {details} +
    {joinButton} - - +
    {'No users found :('}
    + + {userEntries} + +
    -