Client: LDAP: show settings for paid
This commit is contained in:
parent
333e8ffbe9
commit
185ad608e1
@ -75,10 +75,7 @@ const LDAP = ({
|
||||
|
||||
if (!isLoaded && isLdapAvailable) return <LdapLoader />;
|
||||
return (
|
||||
<StyledLdapPage
|
||||
isSmallWindow={isSmallWindow}
|
||||
isSettingPaid={isLdapAvailable}
|
||||
>
|
||||
<StyledLdapPage isSmallWindow={isSmallWindow}>
|
||||
<Text className="intro-text settings_unavailable">{t("LdapIntro")}</Text>
|
||||
<Box marginProp="8px 0 24px 0">
|
||||
<Link
|
||||
|
@ -27,7 +27,6 @@
|
||||
import styled, { css } from "styled-components";
|
||||
import { Box } from "@docspace/shared/components/box";
|
||||
import { mobile } from "@docspace/shared/utils";
|
||||
import { UnavailableStyles } from "../../../../utils/commonSettingsStyles";
|
||||
|
||||
const StyledLdapPage = styled(Box)`
|
||||
max-width: ${(props) => (props.isSmallWindow ? "100%" : "700px")};
|
||||
@ -222,8 +221,6 @@ const StyledLdapPage = styled(Box)`
|
||||
margin-top: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
${(props) => !props.isSettingPaid && UnavailableStyles}
|
||||
`;
|
||||
|
||||
export default StyledLdapPage;
|
||||
|
@ -33,22 +33,14 @@ import { Text } from "@docspace/shared/components/text";
|
||||
|
||||
const HideButton = (props) => {
|
||||
const { t } = useTranslation("SingleSignOn");
|
||||
const {
|
||||
text,
|
||||
label,
|
||||
isAdditionalParameters,
|
||||
value,
|
||||
setIsSettingsShown,
|
||||
isDisabled,
|
||||
} = props;
|
||||
const { text, label, isAdditionalParameters, value, setIsSettingsShown } =
|
||||
props;
|
||||
const marginProp = isAdditionalParameters ? null : "24px 0";
|
||||
|
||||
const onClick = () => {
|
||||
setIsSettingsShown(!value);
|
||||
};
|
||||
|
||||
const onClickProp = isDisabled ? {} : { onClick: onClick };
|
||||
|
||||
return (
|
||||
<Box
|
||||
alignItems="center"
|
||||
@ -71,7 +63,7 @@ const HideButton = (props) => {
|
||||
<Link
|
||||
className="hide-button settings_unavailable"
|
||||
isHovered
|
||||
{...onClickProp}
|
||||
onClick={onClick}
|
||||
type="action"
|
||||
>
|
||||
{value
|
||||
|
@ -83,11 +83,7 @@ const SettingsContainer = ({
|
||||
const renderBody = () => (
|
||||
<>
|
||||
{!isMobileView && (
|
||||
<HideButton
|
||||
text={t("Settings:LDAP")}
|
||||
value={isSettingsShown}
|
||||
isDisabled={!isLdapAvailable}
|
||||
/>
|
||||
<HideButton text={t("Settings:LDAP")} value={isSettingsShown} />
|
||||
)}
|
||||
|
||||
{isMobileView && <ToggleLDAP />}
|
||||
|
Loading…
Reference in New Issue
Block a user