Merge pull request #1730 from mattermost/PLT-1404

PLT-1404 signal login to other tabs
Этот коммит содержится в:
Joram Wilander
2015-12-15 08:58:51 -05:00
родитель f6ca77b5d1 b94d025da4
Коммит 3850469462
3 изменённых файлов: 28 добавлений и 0 удалений

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

@@ -68,6 +68,16 @@
console.log('detected logout from a different tab');
window.location.href = '/' + window.mm_team.name;
}
if (e.originalEvent.key === '__login__' && e.originalEvent.storageArea === localStorage && e.originalEvent.newValue) {
// make sure it isn't this tab that is sending the logout signal (only necessary for IE11)
if (window.BrowserStore.isSignallingLogin(e.originalEvent.newValue)) {
return;
}
console.log('detected login from a different tab');
window.location.href = '/';
}
});
});
</script>