diff options
author | Stas Vovk <stas@vovk.me> | 2015-10-16 14:21:51 +0300 |
---|---|---|
committer | Stas Vovk <stas@vovk.me> | 2015-10-16 14:21:51 +0300 |
commit | 79fcb9808421dd93342a9538d05dd2259f5dd14b (patch) | |
tree | 33a1a865144f280e37fde07a7c91ed8825c53801 /web/react/utils/utils.jsx | |
parent | 2bd81ff379acb347534e4d6a1a27624e0262deb0 (diff) | |
parent | 50a8e2bd4fa53c6bb2f12a03237be4fbaf259617 (diff) | |
download | chat-79fcb9808421dd93342a9538d05dd2259f5dd14b.tar.gz chat-79fcb9808421dd93342a9538d05dd2259f5dd14b.tar.bz2 chat-79fcb9808421dd93342a9538d05dd2259f5dd14b.zip |
Merge remote-tracking branch 'upstream/master' into PLT-637
Conflicts:
web/react/utils/constants.jsx
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r-- | web/react/utils/utils.jsx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 8f01b3e33..561c2c4c4 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -474,6 +474,10 @@ export function applyTheme(theme) { changeCss('.date-separator .separator__text, .new-separator .separator__text', 'background:' + theme.centerChannelBg, 1); changeCss('.post-image__column .post-image__details', 'background:' + theme.centerChannelBg, 1); changeCss('.sidebar--right, .dropdown-menu, .popover', 'background:' + theme.centerChannelBg, 1); + changeCss('.popover.bottom>.arrow:after', 'border-bottom-color:' + theme.centerChannelBg, 1); + changeCss('.popover.right>.arrow:after', 'border-right-color:' + theme.centerChannelBg, 1); + changeCss('.popover.left>.arrow:after', 'border-left-color:' + theme.centerChannelBg, 1); + changeCss('.popover.top>.arrow:after', 'border-top-color:' + theme.centerChannelBg, 1); changeCss('.search-bar__container .search__form .search-bar, .form-control', 'background:' + theme.centerChannelBg, 1); } @@ -918,6 +922,18 @@ export function isBrowserEdge() { return window.naviagtor && navigator.userAgent && navigator.userAgent.toLowerCase().indexOf('edge') > -1; } +export function getDirectChannelName(id, otherId) { + let handle; + + if (otherId > id) { + handle = id + '__' + otherId; + } else { + handle = otherId + '__' + id; + } + + return handle; +} + // Used to get the id of the other user from a DM channel export function getUserIdFromChannelName(channel) { var ids = channel.name.split('__'); |