summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
authorAsaad Mahmood <Unknowngi@live.com>2015-10-06 10:04:39 +0500
committerAsaad Mahmood <Unknowngi@live.com>2015-10-06 10:04:39 +0500
commit06fbb8b7dfbf03832163c75e84fb5e6899f2c655 (patch)
tree6f0cd0ece5a0514e1acb929dce3fa22cc1c03373 /web/react
parent8c7f4672eb6c0efb4b678866f1d0da286cfdd8ce (diff)
downloadchat-06fbb8b7dfbf03832163c75e84fb5e6899f2c655.tar.gz
chat-06fbb8b7dfbf03832163c75e84fb5e6899f2c655.tar.bz2
chat-06fbb8b7dfbf03832163c75e84fb5e6899f2c655.zip
Adding mention highlight setting and improving search highlight too
Diffstat (limited to 'web/react')
-rw-r--r--web/react/utils/constants.jsx19
-rw-r--r--web/react/utils/utils.jsx4
2 files changed, 17 insertions, 6 deletions
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index 0abdb4936..aba63b91c 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -138,7 +138,8 @@ module.exports = {
newMessageSeparator: '#FF8800',
linkColor: '#2389d7',
buttonBg: '#2389d7',
- buttonColor: '#FFFFFF'
+ buttonColor: '#FFFFFF',
+ mentionHighlightBg: '#fff2bb'
},
organization: {
type: 'Organization',
@@ -159,7 +160,8 @@ module.exports = {
newMessageSeparator: '#FF8800',
linkColor: '#2f81b7',
buttonBg: '#1dacfc',
- buttonColor: '#FFFFFF'
+ buttonColor: '#FFFFFF',
+ mentionHighlightBg: '#fff2bb'
},
mattermostDark: {
type: 'Mattermost Dark',
@@ -180,7 +182,8 @@ module.exports = {
newMessageSeparator: '#5de5da',
linkColor: '#A4FFEB',
buttonBg: '#4CBBA4',
- buttonColor: '#FFFFFF'
+ buttonColor: '#FFFFFF',
+ mentionHighlightBg: '#338886'
},
windows10: {
type: 'Windows Dark',
@@ -201,7 +204,8 @@ module.exports = {
newMessageSeparator: '#CC992D',
linkColor: '#0177e7',
buttonBg: '#0177e7',
- buttonColor: '#FFFFFF'
+ buttonColor: '#FFFFFF',
+ mentionHighlightBg: '#276198'
}
},
THEME_ELEMENTS: [
@@ -263,7 +267,7 @@ module.exports = {
},
{
id: 'newMessageSeparator',
- uiName: 'New message separator'
+ uiName: 'New Message Separator'
},
{
id: 'linkColor',
@@ -273,10 +277,13 @@ module.exports = {
id: 'buttonBg',
uiName: 'Button BG'
},
-
{
id: 'buttonColor',
uiName: 'Button Text'
+ },
+ {
+ id: 'mentionHighlightBg',
+ uiName: 'Mention Highlight BG'
}
]
};
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 750da59fc..0094ebcab 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -530,6 +530,10 @@ export function applyTheme(theme) {
if (theme.buttonColor) {
changeCss('.btn.btn-primary', 'color:' + theme.buttonColor, 2);
}
+
+ if (theme.mentionHighlightBg) {
+ changeCss('.mention-highlight, .search-highlight', 'background:' + theme.mentionHighlightBg, 1);
+ }
}
export function changeCss(className, classValue, classRepeat) {
// we need invisible container to store additional css definitions