diff options
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/constants.jsx | 7 | ||||
-rw-r--r-- | web/react/utils/utils.jsx | 10 |
2 files changed, 14 insertions, 3 deletions
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index b7703f7bc..170a16049 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -119,7 +119,9 @@ export default { POST_LOADING: 'loading', POST_FAILED: 'failed', POST_DELETED: 'deleted', - POST_TYPE_JOIN_LEAVE: 'join_leave', + POST_TYPE_JOIN_LEAVE: 'system_join_leave', + SYSTEM_MESSAGE_PREFIX: 'system_', + SYSTEM_MESSAGE_PROFILE_IMAGE: '/static/images/logo_compact.png', RESERVED_TEAM_NAMES: [ 'www', 'web', @@ -389,7 +391,8 @@ export default { BACKSPACE: 8, ENTER: 13, ESCAPE: 27, - SPACE: 32 + SPACE: 32, + TAB: 9 }, HighlightedLanguages: { diff: 'Diff', diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index f5e0cedf5..f80da8415 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -683,7 +683,11 @@ export function applyTheme(theme) { } if (theme.mentionHighlightBg) { - changeCss('.mention-highlight, .search-highlight', 'background:' + theme.mentionHighlightBg, 1); + changeCss('.mention-highlight, .search-highlight, #archive-link-home', 'background:' + theme.mentionHighlightBg, 1); + } + + if (theme.mentionHighlightBg) { + changeCss('.post.post--highlight, #archive-link-home', 'background:' + changeOpacity(theme.mentionHighlightBg, 0.5), 1); } if (theme.mentionHighlightLink) { @@ -1245,3 +1249,7 @@ export function getPostTerm(post) { export function isFeatureEnabled(feature) { return PreferenceStore.getPreference(Constants.Preferences.CATEGORY_ADVANCED_SETTINGS, Constants.FeatureTogglePrefix + feature.label, {value: 'false'}).value === 'true'; } + +export function isSystemMessage(post) { + return post.type && (post.type.lastIndexOf(Constants.SYSTEM_MESSAGE_PREFIX) === 0); +}
\ No newline at end of file |