summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-03-09 10:00:16 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2016-03-10 14:51:18 -0500
commit521530a7f222366c455132110367d296f1d7d446 (patch)
treef821f3d33a89f8b9fe18441712ece57f00f06e74 /web
parentb305e03ab5428103b4990bcd723f54c4c779e7c2 (diff)
downloadchat-521530a7f222366c455132110367d296f1d7d446.tar.gz
chat-521530a7f222366c455132110367d296f1d7d446.tar.bz2
chat-521530a7f222366c455132110367d296f1d7d446.zip
Disabled embed toggle when it's disabled in user settings
Diffstat (limited to 'web')
-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;
}
}