summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-03-11 08:53:25 -0500
committerChristopher Speller <crspeller@gmail.com>2016-03-11 08:53:25 -0500
commit7d7260273770a2e40fb01f1162228d598a28b7ce (patch)
treebe5917f8fce87f2c6235f595257cdfdbd58fbe5f /web/react
parent19f28e896d6d564e9c395ec90597d42709b2e3b8 (diff)
parent521530a7f222366c455132110367d296f1d7d446 (diff)
downloadchat-7d7260273770a2e40fb01f1162228d598a28b7ce.tar.gz
chat-7d7260273770a2e40fb01f1162228d598a28b7ce.tar.bz2
chat-7d7260273770a2e40fb01f1162228d598a28b7ce.zip
Merge pull request #2417 from hmhealey/plt2264
PLT-2264 Disabled embed toggle when it's disabled in user settings
Diffstat (limited to 'web/react')
-rw-r--r--web/react/components/post_body_additional_content.jsx20
1 files changed, 14 insertions, 6 deletions
diff --git a/web/react/components/post_body_additional_content.jsx b/web/react/components/post_body_additional_content.jsx
index c2a928f3b..70b3c8dbf 100644
--- a/web/react/components/post_body_additional_content.jsx
+++ b/web/react/components/post_body_additional_content.jsx
@@ -112,24 +112,32 @@ export default class PostBodyAdditionalContent extends React.Component {
}
render() {
- var generateEmbed = this.generateEmbed();
+ const generateEmbed = this.generateEmbed();
+
if (generateEmbed) {
- return (
- <div>
+ let toggle;
+ if (Utils.isFeatureEnabled(Constants.PRE_RELEASE_FEATURES.EMBED_TOGGLE)) {
+ toggle = (
<a className='post__embed-visibility'
data-expanded={this.state.embedVisible}
aria-label='Toggle Embed Visibility'
onClick={this.toggleEmbedVisibility}
- >
- </a>
+ />
+ );
+ }
+
+ return (
+ <div>
+ {toggle}
<div className='post__embed-container'
hidden={!this.state.embedVisible}
>
{generateEmbed}
</div>
</div>
- );
+ );
}
+
return null;
}
}