Hide some parts from the self-deployed service
This commit is contained in:
parent
da94f06a81
commit
fc6562df01
|
@ -29,6 +29,7 @@
|
|||
__DEV__: true,
|
||||
SLACK_KEY: true,
|
||||
SLACK_REDIRECT_URI: true,
|
||||
DEPLOYMENT: true,
|
||||
|
||||
afterAll: true
|
||||
},
|
||||
|
|
|
@ -22,14 +22,18 @@ export default class Home extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const showLandingPageCopy = DEPLOYMENT === 'hosted';
|
||||
|
||||
return (
|
||||
<Flex auto>
|
||||
<Layout>
|
||||
<CenteredContent>
|
||||
<div className={ styles.intro }>
|
||||
<h1 className={ styles.title }>Simple, fast, markdown.</h1>
|
||||
<p className={ styles.copy }>We're building a modern wiki for engineering teams.</p>
|
||||
</div>
|
||||
{ showLandingPageCopy && (
|
||||
<div className={ styles.intro }>
|
||||
<h1 className={ styles.title }>Simple, fast, markdown.</h1>
|
||||
<p className={ styles.copy }>We're building a modern wiki for engineering teams.</p>
|
||||
</div>
|
||||
) }
|
||||
<div className={ styles.action }>
|
||||
<SlackAuthLink>
|
||||
<img
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -10,6 +10,7 @@ const definePlugin = new webpack.DefinePlugin({
|
|||
SLACK_REDIRECT_URI: JSON.stringify(process.env.SLACK_REDIRECT_URI),
|
||||
SLACK_KEY: JSON.stringify(process.env.SLACK_KEY),
|
||||
URL: JSON.stringify(process.env.URL),
|
||||
DEPLOYMENT: JSON.stringify(process.env.DEPLOYMENT || 'hosted'),
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
|
|
Reference in New Issue