Hide some parts from the self-deployed service

This commit is contained in:
Jori Lallo
2016-10-14 13:08:25 -07:00
parent da94f06a81
commit fc6562df01
4 changed files with 27 additions and 17 deletions

View File

@@ -33,6 +33,8 @@ class Settings extends React.Component {
</Title>
);
const showSlackSettings = DEPLOYMENT === 'hosted';
return (
<Layout
title={ title }
@@ -41,20 +43,22 @@ class Settings extends React.Component {
loading={ this.store.isFetching }
>
<CenteredContent>
<div className={ styles.section }>
<h2 className={ styles.sectionHeader }>Slack</h2>
<p>
Connect Atlas to your Slack to instantly search for your documents
using <code>/atlas</code> command.
</p>
{ showSlackSettings && (
<div className={ styles.section }>
<h2 className={ styles.sectionHeader }>Slack</h2>
<p>
Connect Atlas to your Slack to instantly search for your documents
using <code>/atlas</code> command.
</p>
<SlackAuthLink
scopes={ ['commands'] }
redirectUri={ `${URL}/auth/slack/commands` }
>
<img alt="Add to Slack" height="40" width="139" src="https://platform.slack-edge.com/img/add_to_slack.png" srcSet="https://platform.slack-edge.com/img/add_to_slack.png 1x, https://platform.slack-edge.com/img/add_to_slack@2x.png 2x" />
</SlackAuthLink>
</div>
<SlackAuthLink
scopes={ ['commands'] }
redirectUri={ `${URL}/auth/slack/commands` }
>
<img alt="Add to Slack" height="40" width="139" src="https://platform.slack-edge.com/img/add_to_slack.png" srcSet="https://platform.slack-edge.com/img/add_to_slack.png 1x, https://platform.slack-edge.com/img/add_to_slack@2x.png 2x" />
</SlackAuthLink>
</div>
) }
<div className={ styles.section }>
<h2 className={ styles.sectionHeader }>API access</h2>