summaryrefslogtreecommitdiffstats
path: root/web/react/components/sidebar.jsx
diff options
context:
space:
mode:
authorAsaad Mahmood <Unknowngi@live.com>2015-09-30 19:30:45 +0500
committerAsaad Mahmood <Unknowngi@live.com>2015-09-30 19:30:45 +0500
commit296b93076888c9b26329938bd1cf1587397c7f51 (patch)
treea37a396752971c88e13fc97d88531357ca09542e /web/react/components/sidebar.jsx
parentfb285d7b32a6c5e559277bcb32b3b7ff6889af22 (diff)
parent13ebb5fe94bfee4e529f634f02d285fa7d8c0dfc (diff)
downloadchat-296b93076888c9b26329938bd1cf1587397c7f51.tar.gz
chat-296b93076888c9b26329938bd1cf1587397c7f51.tar.bz2
chat-296b93076888c9b26329938bd1cf1587397c7f51.zip
Merge branch 'master' of https://github.com/mattermost/platform into plt-383
Diffstat (limited to 'web/react/components/sidebar.jsx')
-rw-r--r--web/react/components/sidebar.jsx15
1 files changed, 10 insertions, 5 deletions
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index 14664ed4d..6033f200f 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -268,14 +268,19 @@ export default class Sidebar extends React.Component {
}
}
updateTitle() {
- var channel = ChannelStore.getCurrent();
+ const channel = ChannelStore.getCurrent();
if (channel) {
+ let currentSiteName = '';
+ if (global.window.config.SiteName != null) {
+ currentSiteName = global.window.config.SiteName;
+ }
+
+ let currentChannelName = channel.display_name;
if (channel.type === 'D') {
- var teammateUsername = Utils.getDirectTeammate(channel.id).username;
- document.title = teammateUsername + ' ' + document.title.substring(document.title.lastIndexOf('-'));
- } else {
- document.title = channel.display_name + ' ' + document.title.substring(document.title.lastIndexOf('-'));
+ currentChannelName = Utils.getDirectTeammate(channel.id).username;
}
+
+ document.title = currentChannelName + ' - ' + this.props.teamDisplayName + ' ' + currentSiteName;
}
}
onScroll() {