summaryrefslogtreecommitdiffstats
path: root/web/react/components/sidebar_header.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/sidebar_header.jsx')
-rw-r--r--web/react/components/sidebar_header.jsx32
1 files changed, 17 insertions, 15 deletions
diff --git a/web/react/components/sidebar_header.jsx b/web/react/components/sidebar_header.jsx
index 45c9ca629..7a7e92854 100644
--- a/web/react/components/sidebar_header.jsx
+++ b/web/react/components/sidebar_header.jsx
@@ -61,19 +61,15 @@ var NavbarDropdown = React.createClass({
var teams = [];
+ teams.push(<li className="divider" key="div"></li>);
if (this.state.teams.length > 1) {
for (var i = 0; i < this.state.teams.length; i++) {
- var domain = this.state.teams[i];
+ var teamName = this.state.teams[i];
- if (domain == utils.getSubDomain())
- continue;
-
- if (teams.length == 0)
- teams.push(<li className="divider" key="div"></li>);
-
- teams.push(<li key={ domain }><a href={window.location.protocol + "//" + domain + "." + utils.getDomainWithOutSub() }>Switch to { domain }</a></li>);
+ teams.push(<li key={ teamName }><a href={window.location.origin + "/" + teamName }>Switch to { teamName }</a></li>);
}
}
+ teams.push(<li><a href={window.location.origin + "/signup_team" }>Create a New Team</a></li>);
return (
<ul className="nav navbar-nav navbar-right">
@@ -110,19 +106,25 @@ module.exports = React.createClass({
},
render: function() {
- var me = UserStore.getCurrentUser();
-
+ var teamDisplayName = this.props.teamDisplayName ? this.props.teamDisplayName : config.SiteName;
+ var me = UserStore.getCurrentUser()
if (!me) {
return null;
}
return (
<div className="team__header theme">
- <img className="user__picture" src={"/api/v1/users/" + me.id + "/image?time=" + me.update_at} />
- <div className="header__info">
- <div className="user__name">{'@' + me.username}</div>
- <a className="team__name" href="/channels/town-square">{this.props.teamName}</a>
- </div>
+ <a className="settings_link" href="#" data-toggle="modal" data-target="#user_settings1">
+ { me.last_picture_update ?
+ <img className="user__picture" src={"/api/v1/users/" + me.id + "/image?time=" + me.update_at} />
+ :
+ <div />
+ }
+ <div className="header__info">
+ <div className="user__name">{ '@' + me.username}</div>
+ <div className="team__name">{ teamDisplayName }</div>
+ </div>
+ </a>
<NavbarDropdown teamType={this.props.teamType} />
</div>
);