Merge pull request #678 from mattermost/mm-1589

PLT-171 MM-1589 New add channel modal using react-bootstrap.
Этот коммит содержится в:
Corey Hulen
2015-09-14 16:57:54 -07:00
родитель c447db6e78 0ea0233c50
Коммит bfebb41bc0
27 изменённых файлов: 18348 добавлений и 625 удалений

Просмотреть файл

@@ -1125,3 +1125,14 @@ export function importSlack(file, success, error) {
client.importSlack(formData, success, error);
}
export function getTeamURLFromAddressBar() {
return window.location.href.split('/channels')[0];
}
export function getShortenedTeamURL() {
const teamURL = getTeamURLFromAddressBar();
if (teamURL.length > 24) {
return teamURL.substring(0, 10) + '...' + teamURL.substring(teamURL.length - 12, teamURL.length - 1) + '/';
}
}