fix: Slack integration should not display if not configured in self hosted
fix: Alignment of Slack channels in settings closes #2553
This commit is contained in:
@@ -25,7 +25,7 @@ const ListItem = (
|
|||||||
<>
|
<>
|
||||||
{image && <Image>{image}</Image>}
|
{image && <Image>{image}</Image>}
|
||||||
<Content
|
<Content
|
||||||
align={compact ? "center" : undefined}
|
justify={compact ? "center" : undefined}
|
||||||
column={!compact}
|
column={!compact}
|
||||||
$selected={selected}
|
$selected={selected}
|
||||||
>
|
>
|
||||||
@@ -90,8 +90,7 @@ const Heading = styled.p`
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Content = styled.div`
|
const Content = styled(Flex)`
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
color: ${(props) => (props.$selected ? props.theme.white : props.theme.text)};
|
color: ${(props) => (props.$selected ? props.theme.white : props.theme.text)};
|
||||||
|
|||||||
@@ -130,14 +130,16 @@ function SettingsSidebar() {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Section>
|
</Section>
|
||||||
{can.update && (
|
{can.update && (env.SLACK_KEY || isHosted) && (
|
||||||
<Section>
|
<Section>
|
||||||
<Header>{t("Integrations")}</Header>
|
<Header>{t("Integrations")}</Header>
|
||||||
<SidebarLink
|
{env.SLACK_KEY && (
|
||||||
to="/settings/integrations/slack"
|
<SidebarLink
|
||||||
icon={<SlackIcon color="currentColor" />}
|
to="/settings/integrations/slack"
|
||||||
label="Slack"
|
icon={<SlackIcon color="currentColor" />}
|
||||||
/>
|
label="Slack"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{isHosted && (
|
{isHosted && (
|
||||||
<SidebarLink
|
<SidebarLink
|
||||||
to="/settings/integrations/zapier"
|
to="/settings/integrations/zapier"
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ import Slack from "scenes/Settings/Slack";
|
|||||||
import Tokens from "scenes/Settings/Tokens";
|
import Tokens from "scenes/Settings/Tokens";
|
||||||
import Zapier from "scenes/Settings/Zapier";
|
import Zapier from "scenes/Settings/Zapier";
|
||||||
import Route from "components/ProfiledRoute";
|
import Route from "components/ProfiledRoute";
|
||||||
|
import env from "env";
|
||||||
|
|
||||||
|
const isHosted = env.DEPLOYMENT === "hosted";
|
||||||
|
|
||||||
export default function SettingsRoutes() {
|
export default function SettingsRoutes() {
|
||||||
return (
|
return (
|
||||||
@@ -27,8 +30,12 @@ export default function SettingsRoutes() {
|
|||||||
<Route exact path="/settings/shares" component={Shares} />
|
<Route exact path="/settings/shares" component={Shares} />
|
||||||
<Route exact path="/settings/tokens" component={Tokens} />
|
<Route exact path="/settings/tokens" component={Tokens} />
|
||||||
<Route exact path="/settings/notifications" component={Notifications} />
|
<Route exact path="/settings/notifications" component={Notifications} />
|
||||||
<Route exact path="/settings/integrations/slack" component={Slack} />
|
{env.SLACK_KEY && (
|
||||||
<Route exact path="/settings/integrations/zapier" component={Zapier} />
|
<Route exact path="/settings/integrations/slack" component={Slack} />
|
||||||
|
)}
|
||||||
|
{isHosted && (
|
||||||
|
<Route exact path="/settings/integrations/zapier" component={Zapier} />
|
||||||
|
)}
|
||||||
<Route exact path="/settings/import-export" component={ImportExport} />
|
<Route exact path="/settings/import-export" component={ImportExport} />
|
||||||
<Redirect from="/settings/people" to="/settings/members" />
|
<Redirect from="/settings/people" to="/settings/members" />
|
||||||
</Switch>
|
</Switch>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ function Slack() {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
actions={
|
actions={
|
||||||
<Button onClick={integration.delete}>
|
<Button onClick={integration.delete} neutral>
|
||||||
{t("Disconnect")}
|
{t("Disconnect")}
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user