Better parsing of the website's title when viewing a channel
Этот коммит содержится в:
@@ -268,14 +268,19 @@ export default class Sidebar extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateTitle() {
|
updateTitle() {
|
||||||
var channel = ChannelStore.getCurrent();
|
const channel = ChannelStore.getCurrent();
|
||||||
if (channel) {
|
if (channel) {
|
||||||
if (channel.type === 'D') {
|
let currentSiteName = '';
|
||||||
var teammateUsername = Utils.getDirectTeammate(channel.id).username;
|
if (global.window.config.SiteName != null) {
|
||||||
document.title = teammateUsername + ' ' + document.title.substring(document.title.lastIndexOf('-'));
|
currentSiteName = global.window.config.SiteName;
|
||||||
} else {
|
|
||||||
document.title = channel.display_name + ' ' + document.title.substring(document.title.lastIndexOf('-'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let currentChannelName = channel.display_name;
|
||||||
|
if (channel.type === 'D') {
|
||||||
|
currentChannelName = Utils.getDirectTeammate(channel.id).username;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.title = currentChannelName + ' - ' + this.props.teamDisplayName + ' ' + currentSiteName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onScroll() {
|
onScroll() {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user