Hide some parts from the self-deployed service
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
__DEV__: true,
|
__DEV__: true,
|
||||||
SLACK_KEY: true,
|
SLACK_KEY: true,
|
||||||
SLACK_REDIRECT_URI: true,
|
SLACK_REDIRECT_URI: true,
|
||||||
|
DEPLOYMENT: true,
|
||||||
|
|
||||||
afterAll: true
|
afterAll: true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -22,14 +22,18 @@ export default class Home extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const showLandingPageCopy = DEPLOYMENT === 'hosted';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex auto>
|
<Flex auto>
|
||||||
<Layout>
|
<Layout>
|
||||||
<CenteredContent>
|
<CenteredContent>
|
||||||
<div className={ styles.intro }>
|
{ showLandingPageCopy && (
|
||||||
<h1 className={ styles.title }>Simple, fast, markdown.</h1>
|
<div className={ styles.intro }>
|
||||||
<p className={ styles.copy }>We're building a modern wiki for engineering teams.</p>
|
<h1 className={ styles.title }>Simple, fast, markdown.</h1>
|
||||||
</div>
|
<p className={ styles.copy }>We're building a modern wiki for engineering teams.</p>
|
||||||
|
</div>
|
||||||
|
) }
|
||||||
<div className={ styles.action }>
|
<div className={ styles.action }>
|
||||||
<SlackAuthLink>
|
<SlackAuthLink>
|
||||||
<img
|
<img
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ class Settings extends React.Component {
|
|||||||
</Title>
|
</Title>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const showSlackSettings = DEPLOYMENT === 'hosted';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout
|
<Layout
|
||||||
title={ title }
|
title={ title }
|
||||||
@@ -41,20 +43,22 @@ class Settings extends React.Component {
|
|||||||
loading={ this.store.isFetching }
|
loading={ this.store.isFetching }
|
||||||
>
|
>
|
||||||
<CenteredContent>
|
<CenteredContent>
|
||||||
<div className={ styles.section }>
|
{ showSlackSettings && (
|
||||||
<h2 className={ styles.sectionHeader }>Slack</h2>
|
<div className={ styles.section }>
|
||||||
<p>
|
<h2 className={ styles.sectionHeader }>Slack</h2>
|
||||||
Connect Atlas to your Slack to instantly search for your documents
|
<p>
|
||||||
using <code>/atlas</code> command.
|
Connect Atlas to your Slack to instantly search for your documents
|
||||||
</p>
|
using <code>/atlas</code> command.
|
||||||
|
</p>
|
||||||
|
|
||||||
<SlackAuthLink
|
<SlackAuthLink
|
||||||
scopes={ ['commands'] }
|
scopes={ ['commands'] }
|
||||||
redirectUri={ `${URL}/auth/slack/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" />
|
<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>
|
</SlackAuthLink>
|
||||||
</div>
|
</div>
|
||||||
|
) }
|
||||||
|
|
||||||
<div className={ styles.section }>
|
<div className={ styles.section }>
|
||||||
<h2 className={ styles.sectionHeader }>API access</h2>
|
<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_REDIRECT_URI: JSON.stringify(process.env.SLACK_REDIRECT_URI),
|
||||||
SLACK_KEY: JSON.stringify(process.env.SLACK_KEY),
|
SLACK_KEY: JSON.stringify(process.env.SLACK_KEY),
|
||||||
URL: JSON.stringify(process.env.URL),
|
URL: JSON.stringify(process.env.URL),
|
||||||
|
DEPLOYMENT: JSON.stringify(process.env.DEPLOYMENT || 'hosted'),
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
Reference in New Issue
Block a user