Merge pull request #953 from asaadmahmoodspin/plt-522

PLT-522 - Adding option for mentionHighlightLink for themes
This commit is contained in:
Christopher Speller
2015-10-07 08:43:24 -04:00
5 changed files with 23 additions and 25 deletions

View File

@@ -214,14 +214,14 @@ export default class UserSettingsAppearance extends React.Component {
<div className='divider-dark first'/>
{themeUI}
<div className='divider-dark'/>
<br/>
<a
className='theme'
onClick={this.handleImportModal}
>
{'Import theme colors from Slack'}
</a>
</div>
<br/>
<a
className='theme'
onClick={this.handleImportModal}
>
{'Import theme colors from Slack'}
</a>
</div>
);
}

View File

@@ -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'
}
]
};

View File

@@ -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

View File

@@ -57,11 +57,4 @@
.mention-highlight {
background-color:#fff2bb;
a {
color: inherit;
text-decoration: underline;
&:hover, &:active {
color: inherit;
}
}
}

View File

@@ -106,11 +106,4 @@
.search-highlight {
background-color: #FFF2BB;
a {
color: inherit;
text-decoration: underline;
&:hover, &:active {
color: inherit;
}
}
}