summaryrefslogtreecommitdiffstats
path: root/web/react/components/channel_header.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-07-29 12:14:21 -0400
committerJoram Wilander <jwawilander@gmail.com>2015-07-29 12:14:21 -0400
commitbe5470c42298d59bfc3828510aa3d57e28adae9a (patch)
tree8ceb73336f87a2d6e7217b648eaf4c0fe3b45809 /web/react/components/channel_header.jsx
parent27dbcd8767426a60699d2acbeeb9b8a825d5b728 (diff)
parent908888c6853ce66aa11dff4f430781ab6686e096 (diff)
downloadchat-be5470c42298d59bfc3828510aa3d57e28adae9a.tar.gz
chat-be5470c42298d59bfc3828510aa3d57e28adae9a.tar.bz2
chat-be5470c42298d59bfc3828510aa3d57e28adae9a.zip
Merge pull request #256 from nickago/MM-1183
MM-1183 Allow channel descriptions on 1-1 channels
Diffstat (limited to 'web/react/components/channel_header.jsx')
-rw-r--r--web/react/components/channel_header.jsx12
1 files changed, 7 insertions, 5 deletions
diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx
index 7a129f200..76dbe370b 100644
--- a/web/react/components/channel_header.jsx
+++ b/web/react/components/channel_header.jsx
@@ -153,7 +153,7 @@ module.exports = React.createClass({
if (isDirect) {
if (this.state.users.length > 1) {
var contact = this.state.users[((this.state.users[0].id === currentId) ? 1 : 0)];
- channelTitle = <UserProfile userId={contact.id} overwriteName={contact.nickname || contact.username} />;
+ channelTitle = contact.nickname || contact.username;
}
}
@@ -161,13 +161,13 @@ module.exports = React.createClass({
<table className="channel-header alt">
<tr>
<th>
- { !isDirect ?
<div className="channel-header__info">
<div className="dropdown">
<a href="#" className="dropdown-toggle theme" type="button" id="channel_header_dropdown" data-toggle="dropdown" aria-expanded="true">
<strong className="heading">{channelTitle} </strong>
<span className="glyphicon glyphicon-chevron-down header-dropdown__icon"></span>
</a>
+ { !isDirect ?
<ul className="dropdown-menu" role="menu" aria-labelledby="channel_header_dropdown">
<li role="presentation"><a role="menuitem" data-toggle="modal" data-target="#channel_info" data-channelid={channel.id} href="#">View Info</a></li>
{ !ChannelStore.isDefault(channel) ?
@@ -193,12 +193,14 @@ module.exports = React.createClass({
: null
}
</ul>
+ :
+ <ul className="dropdown-menu" role="menu" aria-labelledby="channel_header_dropdown">
+ <li role="presentation"><a role="menuitem" href="#" data-toggle="modal" data-target="#edit_channel" data-desc={channel.description} data-title={channel.display_name} data-channelid={channel.id}>Set Channel Description...</a></li>
+ </ul>
+ }
</div>
<div data-toggle="popover" data-content={popoverContent} className="description">{description}</div>
</div>
- :
- <a href="#"><strong className="heading">{channelTitle}</strong></a>
- }
</th>
<th><PopoverListMembers members={this.state.users} channelId={channel.id} /></th>
<th className="search-bar__container"><NavbarSearchBox /></th>