From 51dc725794d2b5a847093a6c7f46ec6ab18ea7d5 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 19 Nov 2016 00:28:42 +0100 Subject: [PATCH] Graphic emoji in usernames in the "reblogged" string above status --- app/assets/javascripts/components/components/status.jsx | 6 +++++- app/assets/stylesheets/components.scss | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/components/components/status.jsx b/app/assets/javascripts/components/components/status.jsx index 8077308c..2d463b9d 100644 --- a/app/assets/javascripts/components/components/status.jsx +++ b/app/assets/javascripts/components/components/status.jsx @@ -8,6 +8,8 @@ import VideoPlayer from './video_player'; import StatusContent from './status_content'; import StatusActionBar from './status_action_bar'; import { FormattedMessage } from 'react-intl'; +import emojify from '../emoji'; +import escapeTextContentForBrowser from 'react/lib/escapeTextContentForBrowser'; const Status = React.createClass({ @@ -56,11 +58,13 @@ const Status = React.createClass({ displayName = status.getIn(['account', 'username']); } + const displayNameHTML = { __html: emojify(escapeTextContentForBrowser(displayName)) }; + return (
- {displayName} }} /> + }} />
diff --git a/app/assets/stylesheets/components.scss b/app/assets/stylesheets/components.scss index c15a827a..ba091c15 100644 --- a/app/assets/stylesheets/components.scss +++ b/app/assets/stylesheets/components.scss @@ -183,6 +183,12 @@ strong { color: #fff; } + + &.muted { + .emojione { + opacity: 0.5; + } + } } .status__display-name, .reply-indicator__display-name, .detailed-status__display-name, .account__display-name {