From e05bcf98c2348d2c322665fa752350134d7c74bb Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Sun, 15 Jan 2023 18:54:52 +0100 Subject: [PATCH] readding sidebar tips for everyone, added 3 more features to teams empty screen (#6475) * readding sidebar tips for everyone * added 3 more features to teams plan * responsive fixes * responsive fixes * small responsive fix * CTA alignment fixed * Minor alignment fixes to Shell for event-types/[type] Co-authored-by: Alex van Andel --- .../common/components/v2/LicenseRequired.tsx | 10 +---- .../ee/teams/components/TeamsListing.tsx | 44 ++++++++++++++----- packages/features/shell/Shell.tsx | 16 +++---- 3 files changed, 41 insertions(+), 29 deletions(-) diff --git a/packages/features/ee/common/components/v2/LicenseRequired.tsx b/packages/features/ee/common/components/v2/LicenseRequired.tsx index 12339b700d..2b246003bb 100644 --- a/packages/features/ee/common/components/v2/LicenseRequired.tsx +++ b/packages/features/ee/common/components/v2/LicenseRequired.tsx @@ -11,15 +11,9 @@ type LicenseRequiredProps = { className?: string; role?: AriaRole | undefined; children: React.ReactNode; - toHide?: boolean; // if true, the component will be hidden instead of showing the empty screen }; -/** - * This component will only render it's children if the installation has a valid - * license. - * @param toHide - will hide the component with a license instead of showing the empty screen - */ -const LicenseRequired = ({ children, as = "", toHide = false, ...rest }: LicenseRequiredProps) => { +const LicenseRequired = ({ children, as = "", ...rest }: LicenseRequiredProps) => { const session = useSession(); const { t } = useLocale(); const Component = as || Fragment; @@ -28,8 +22,6 @@ const LicenseRequired = ({ children, as = "", toHide = false, ...rest }: License return ( {hasValidLicense === null || hasValidLicense ? ( - !toHide && children - ) : toHide ? ( children ) : ( , + title: t("sms_attendee_action"), + description: t("make_it_easy_to_book"), + }, + { + icon: , + title: "Cal Video" + " " + t("recordings_title"), + description: t("upgrade_to_access_recordings_description"), + }, + { + icon: , + title: t("disable_cal_branding", { appName: APP_NAME }), + description: t("disable_cal_branding_description", { appName: APP_NAME }), + }, ]; return ( @@ -52,8 +68,8 @@ export function TeamsListing() { {isLoading && } {!teams.length && !isLoading && ( <> - {isCalcom ? ( -
+ {!isCalcom ? ( +
-
+

{t("calcom_is_better_with_team")}

{t("add_your_team_members")}

- - + + + +
-
+
{features.map((feature) => ( -
+
{feature.icon}

{feature.title}

{feature.description}

diff --git a/packages/features/shell/Shell.tsx b/packages/features/shell/Shell.tsx index 48156d34b4..bee2ad7258 100644 --- a/packages/features/shell/Shell.tsx +++ b/packages/features/shell/Shell.tsx @@ -731,9 +731,7 @@ function SideBar() {
- - - +
@@ -754,7 +752,7 @@ export function ShellMain(props: LayoutProps) { const { isLocaleReady } = useLocale(); return ( <> -
+
{!!props.backPath && (
-
+
{props.children}