From 8c1979465f39b65d298c771cfd7764ccfa398cd2 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 14 Oct 2021 21:37:04 -0700 Subject: [PATCH] fix: Slack integration should not display if not configured in self hosted fix: Alignment of Slack channels in settings closes #2553 --- app/components/List/Item.js | 5 ++--- app/components/Sidebar/Settings.js | 14 ++++++++------ app/routes/settings.js | 11 +++++++++-- app/scenes/Settings/Slack.js | 2 +- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/app/components/List/Item.js b/app/components/List/Item.js index ad149ba23..7098d9fe2 100644 --- a/app/components/List/Item.js +++ b/app/components/List/Item.js @@ -25,7 +25,7 @@ const ListItem = ( <> {image && {image}} @@ -90,8 +90,7 @@ const Heading = styled.p` margin: 0; `; -const Content = styled.div` - display: flex; +const Content = styled(Flex)` flex-direction: column; flex-grow: 1; color: ${(props) => (props.$selected ? props.theme.white : props.theme.text)}; diff --git a/app/components/Sidebar/Settings.js b/app/components/Sidebar/Settings.js index b0a95978f..903b39c96 100644 --- a/app/components/Sidebar/Settings.js +++ b/app/components/Sidebar/Settings.js @@ -130,14 +130,16 @@ function SettingsSidebar() { /> )} - {can.update && ( + {can.update && (env.SLACK_KEY || isHosted) && (
{t("Integrations")}
- } - label="Slack" - /> + {env.SLACK_KEY && ( + } + label="Slack" + /> + )} {isHosted && ( - - + {env.SLACK_KEY && ( + + )} + {isHosted && ( + + )} diff --git a/app/scenes/Settings/Slack.js b/app/scenes/Settings/Slack.js index 8d2e5a4a3..24b7b3197 100644 --- a/app/scenes/Settings/Slack.js +++ b/app/scenes/Settings/Slack.js @@ -103,7 +103,7 @@ function Slack() { /> } actions={ - }