New add channel modal using react-bootstrap.

Этот коммит содержится в:
Christopher Speller
2015-09-14 13:56:58 -04:00
родитель b2378f433e
Коммит 0ea0233c50
27 изменённых файлов: 18348 добавлений и 625 удалений

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

@@ -1127,3 +1127,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) + '/';
}
}