From 4ebc85e05c3f45d2978c6fb8f9874b93658c3607 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Mon, 3 Apr 2017 22:38:15 +0500 Subject: Ui improvements (#5948) * PLT-5849 - Code block wrap on IOS * PLT-5972 - Comment has first line indented * PLT-6048 - Adjusting UI for link previews * PLT-5733 - Adding error text theme option --- webapp/utils/constants.jsx | 9 +++++++++ webapp/utils/utils.jsx | 4 ++++ 2 files changed, 13 insertions(+) (limited to 'webapp/utils') diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx index 61c418047..4f00a8559 100644 --- a/webapp/utils/constants.jsx +++ b/webapp/utils/constants.jsx @@ -449,6 +449,7 @@ export const Constants = { linkColor: '#2f81b7', buttonBg: '#1dacfc', buttonColor: '#FFFFFF', + errorTextColor: '#a94442', mentionHighlightBg: '#f3e197', mentionHighlightLink: '#2f81b7', codeTheme: 'github', @@ -474,6 +475,7 @@ export const Constants = { linkColor: '#2389d7', buttonBg: '#23A2FF', buttonColor: '#FFFFFF', + errorTextColor: '#a94442', mentionHighlightBg: '#f3e197', mentionHighlightLink: '#2f81b7', codeTheme: 'github', @@ -499,6 +501,7 @@ export const Constants = { linkColor: '#A4FFEB', buttonBg: '#4CBBA4', buttonColor: '#FFFFFF', + errorTextColor: '#ff6461', mentionHighlightBg: '#984063', mentionHighlightLink: '#A4FFEB', codeTheme: 'solarized-dark', @@ -524,6 +527,7 @@ export const Constants = { linkColor: '#0D93FF', buttonBg: '#0177e7', buttonColor: '#FFFFFF', + errorTextColor: '#ff6461', mentionHighlightBg: '#784098', mentionHighlightLink: '#A4FFEB', codeTheme: 'monokai', @@ -606,6 +610,11 @@ export const Constants = { id: 'newMessageSeparator', uiName: 'New Message Separator' }, + { + group: 'centerChannelElements', + id: 'errorTextColor', + uiName: 'Error Text Color' + }, { group: 'centerChannelElements', id: 'mentionHighlightBg', diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx index d2cebafa7..55ea72e8d 100644 --- a/webapp/utils/utils.jsx +++ b/webapp/utils/utils.jsx @@ -707,6 +707,10 @@ export function applyTheme(theme) { changeCss('.app__body .btn.btn-primary, .app__body .post__pinned-badge', 'color:' + theme.buttonColor); } + if (theme.errorTextColor) { + changeCss('.app__body .has-error .help-block, .app__body .has-error .control-label, .app__body .has-error .radio, .app__body .has-error .checkbox, .app__body .has-error .radio-inline, .app__body .has-error .checkbox-inline, .app__body .has-error.radio label, .app__body .has-error.checkbox label, .app__body .has-error.radio-inline label, .app__body .has-error.checkbox-inline label', 'color:' + theme.errorTextColor); + } + if (theme.mentionHighlightBg) { changeCss('.app__body .mention--highlight, .app__body .search-highlight', 'background:' + theme.mentionHighlightBg); changeCss('.app__body .post.post--comment .post__body.mention-comment', 'border-color:' + theme.mentionHighlightBg); -- cgit v1.2.3-1-g7c22