summaryrefslogtreecommitdiffstats
path: root/web/react/utils
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-10-07 08:43:24 -0400
committerChristopher Speller <crspeller@gmail.com>2015-10-07 08:43:24 -0400
commit4263c08c55f7bc4b18cadeaed44f9ed8126ba70e (patch)
treec25d1230ed6f75afd4b41b11ca22d9500e68debb /web/react/utils
parentdfaef4bd7227391e21890c720f9668acb3a64c28 (diff)
parent698ca63d991f4246060223642116a78302a5af32 (diff)
downloadchat-4263c08c55f7bc4b18cadeaed44f9ed8126ba70e.tar.gz
chat-4263c08c55f7bc4b18cadeaed44f9ed8126ba70e.tar.bz2
chat-4263c08c55f7bc4b18cadeaed44f9ed8126ba70e.zip
Merge pull request #953 from asaadmahmoodspin/plt-522
PLT-522 - Adding option for mentionHighlightLink for themes
Diffstat (limited to 'web/react/utils')
-rw-r--r--web/react/utils/constants.jsx16
-rw-r--r--web/react/utils/utils.jsx4
2 files changed, 16 insertions, 4 deletions
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index 8fe1a5884..8fd0ab79b 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -138,7 +138,8 @@ module.exports = {
linkColor: '#2389d7',
buttonBg: '#2389d7',
buttonColor: '#FFFFFF',
- mentionHighlightBg: '#fff2bb'
+ mentionHighlightBg: '#fff2bb',
+ mentionHighlightLink: '#2f81b7'
},
organization: {
type: 'Organization',
@@ -159,7 +160,8 @@ module.exports = {
linkColor: '#2f81b7',
buttonBg: '#1dacfc',
buttonColor: '#FFFFFF',
- mentionHighlightBg: '#fff2bb'
+ mentionHighlightBg: '#fff2bb',
+ mentionHighlightLink: '#2f81b7'
},
mattermostDark: {
type: 'Mattermost Dark',
@@ -180,7 +182,8 @@ module.exports = {
linkColor: '#A4FFEB',
buttonBg: '#4CBBA4',
buttonColor: '#FFFFFF',
- mentionHighlightBg: '#338886'
+ mentionHighlightBg: '#984063',
+ mentionHighlightLink: '#A4FFEB'
},
windows10: {
type: 'Windows Dark',
@@ -201,7 +204,8 @@ module.exports = {
linkColor: '#0177e7',
buttonBg: '#0177e7',
buttonColor: '#FFFFFF',
- mentionHighlightBg: '#276198'
+ mentionHighlightBg: '#784098',
+ mentionHighlightLink: '#A4FFEB'
}
},
THEME_ELEMENTS: [
@@ -276,6 +280,10 @@ module.exports = {
{
id: 'mentionHighlightBg',
uiName: 'Mention Highlight BG'
+ },
+ {
+ id: 'mentionHighlightLink',
+ uiName: 'Mention Highlight Link'
}
]
};
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 8431e56bc..f79f3492f 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -531,6 +531,10 @@ export function applyTheme(theme) {
if (theme.mentionHighlightBg) {
changeCss('.mention-highlight, .search-highlight', 'background:' + theme.mentionHighlightBg, 1);
}
+
+ if (theme.mentionHighlightLink) {
+ changeCss('.mention-highlight .mention-link', 'color:' + theme.mentionHighlightLink, 1);
+ }
}
export function changeCss(className, classValue, classRepeat) {
// we need invisible container to store additional css definitions