Client: LDAP: show settings for paid

This commit is contained in:
Viktor Fomin 2024-07-24 00:46:19 +03:00
parent 333e8ffbe9
commit 185ad608e1
4 changed files with 5 additions and 23 deletions

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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 />}