From fc6562df01a97fe1cfeae67532082dc709030edd Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Fri, 14 Oct 2016 13:08:25 -0700 Subject: [PATCH] Hide some parts from the self-deployed service --- .eslintrc | 1 + frontend/scenes/Home/Home.js | 12 +++++++---- frontend/scenes/Settings/Settings.js | 30 ++++++++++++++++------------ webpack.config.js | 1 + 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/.eslintrc b/.eslintrc index a5724c8d..a4d6dcb0 100644 --- a/.eslintrc +++ b/.eslintrc @@ -29,6 +29,7 @@ __DEV__: true, SLACK_KEY: true, SLACK_REDIRECT_URI: true, + DEPLOYMENT: true, afterAll: true }, diff --git a/frontend/scenes/Home/Home.js b/frontend/scenes/Home/Home.js index 057b38cf..308b955d 100644 --- a/frontend/scenes/Home/Home.js +++ b/frontend/scenes/Home/Home.js @@ -22,14 +22,18 @@ export default class Home extends React.Component { } render() { + const showLandingPageCopy = DEPLOYMENT === 'hosted'; + return ( -
-

Simple, fast, markdown.

-

We're building a modern wiki for engineering teams.

-
+ { showLandingPageCopy && ( +
+

Simple, fast, markdown.

+

We're building a modern wiki for engineering teams.

+
+ ) }
); + const showSlackSettings = DEPLOYMENT === 'hosted'; + return ( -
-

Slack

-

- Connect Atlas to your Slack to instantly search for your documents - using /atlas command. -

+ { showSlackSettings && ( +
+

Slack

+

+ Connect Atlas to your Slack to instantly search for your documents + using /atlas command. +

- - Add to Slack - -
+ + Add to Slack + +
+ ) }

API access

diff --git a/webpack.config.js b/webpack.config.js index 0816cf8b..58653fdb 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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 = {