diff options
author | Chris Duarte <csduarte@users.noreply.github.com> | 2017-07-19 07:58:59 -0700 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-07-19 10:58:59 -0400 |
commit | ea6f37e68da6458ba91943ae56fe60760a35b736 (patch) | |
tree | 594542ec7058f7d556591fe6a1d42b4f4a2567aa /webapp/components/announcement_bar/announcement_bar.jsx | |
parent | d064f5eba364cba03198ab92a7588e34a9869b69 (diff) | |
download | chat-ea6f37e68da6458ba91943ae56fe60760a35b736.tar.gz chat-ea6f37e68da6458ba91943ae56fe60760a35b736.tar.bz2 chat-ea6f37e68da6458ba91943ae56fe60760a35b736.zip |
display BAR_ANNOUNCEMENT_TYPE with Markdown parser (#6981)
* display BAR_ANNOUNCEMENT_TYPE with Markdown parser
* fix code style
Diffstat (limited to 'webapp/components/announcement_bar/announcement_bar.jsx')
-rw-r--r-- | webapp/components/announcement_bar/announcement_bar.jsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/webapp/components/announcement_bar/announcement_bar.jsx b/webapp/components/announcement_bar/announcement_bar.jsx index 84061ec05..cd0cd0cb9 100644 --- a/webapp/components/announcement_bar/announcement_bar.jsx +++ b/webapp/components/announcement_bar/announcement_bar.jsx @@ -13,6 +13,7 @@ import * as AdminActions from 'actions/admin_actions.jsx'; import {ErrorBarTypes, StatTypes} from 'utils/constants.jsx'; import {isLicenseExpiring, isLicenseExpired, isLicensePastGracePeriod, displayExpiryDate} from 'utils/license_utils.jsx'; import * as Utils from 'utils/utils.jsx'; +import * as TextFormatting from 'utils/text_formatting.jsx'; const RENEWAL_LINK = 'https://licensing.mattermost.com/renew'; @@ -219,7 +220,13 @@ export default class AnnouncementBar extends React.PureComponent { const renewalLink = RENEWAL_LINK + '?id=' + global.window.mm_license.Id + '&user_count=' + this.state.totalUsers; let message = this.state.message; - if (message === ErrorBarTypes.PREVIEW_MODE) { + if (this.state.type === BAR_ANNOUNCEMENT_TYPE) { + message = ( + <span + dangerouslySetInnerHTML={{__html: TextFormatting.formatText(message, {singleline: true, mentionHighlight: false})}} + /> + ); + } else if (message === ErrorBarTypes.PREVIEW_MODE) { message = ( <FormattedMessage id={ErrorBarTypes.PREVIEW_MODE} |