From 16d1adf9908d15a956493b1cf7a73001e6a8108e Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Fri, 29 Dec 2023 18:08:36 +0000 Subject: [PATCH] fix: dark mode improvements for signup (#12965) * dark mode improvements * small changes * readded producthunt badges * only show social proof on cal.com --- apps/web/pages/signup.tsx | 125 ++++++++++++------ .../public/product-cards/trustpilot-dark.svg | 27 ++++ packages/lib/constants.ts | 2 + 3 files changed, 111 insertions(+), 43 deletions(-) create mode 100644 apps/web/public/product-cards/trustpilot-dark.svg diff --git a/apps/web/pages/signup.tsx b/apps/web/pages/signup.tsx index f7c558363e..7eae7d4463 100644 --- a/apps/web/pages/signup.tsx +++ b/apps/web/pages/signup.tsx @@ -19,7 +19,14 @@ import { isSAMLLoginEnabled } from "@calcom/features/ee/sso/lib/saml"; import { useFlagMap } from "@calcom/features/flags/context/provider"; import { getFeatureFlagMap } from "@calcom/features/flags/server/utils"; import { classNames } from "@calcom/lib"; -import { APP_NAME, IS_CALCOM, IS_SELF_HOSTED, WEBAPP_URL, WEBSITE_URL } from "@calcom/lib/constants"; +import { + APP_NAME, + URL_PROTOCOL_REGEX, + IS_CALCOM, + IS_SELF_HOSTED, + WEBAPP_URL, + WEBSITE_URL, +} from "@calcom/lib/constants"; import { fetchUsername } from "@calcom/lib/fetchUsername"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; import { useDebounce } from "@calcom/lib/hooks/useDebounce"; @@ -253,7 +260,7 @@ export default function Signup({
{/* Left side */} -
+
{/* Header */} {errors.apiError && ( @@ -273,7 +280,7 @@ export default function Signup({ )}
{/* Form Container */} -
+
setPremiumUsername(value)} addOnLeading={ orgSlug - ? `${getOrgFullOrigin(orgSlug, { protocol: true })}/` - : `${process.env.NEXT_PUBLIC_WEBSITE_URL}/` + ? `${getOrgFullOrigin(orgSlug, { protocol: true }).replace(URL_PROTOCOL_REGEX, "")}/` + : `${process.env.NEXT_PUBLIC_WEBSITE_URL.replace(URL_PROTOCOL_REGEX, "")}/` } /> ) : null} @@ -461,54 +468,86 @@ export default function Signup({
-
+
{IS_CALCOM && ( -
-
- # + <> +
+
+ Cal.com was Product of the Day at ProductHunt +
+
+ Cal.com was Product of the Week at ProductHunt +
+
+ Cal.com was Product of the Month at ProductHunt +
-
- # +
+
+ ProductHunt Rating of 5 Stars +
+
+ Trustpilot Rating of 4.7 Stars + Trustpilot Rating of 4.7 Stars +
+
+ G2 Rating of 4.7 Stars +
-
- # -
-
+ )}
- # + Cal.com Booking Page
-
- {!IS_CALCOM && - FEATURES.map((feature) => ( - <> -
-
- - {t(feature.title)} -
-
-

- {t( - feature.description, - feature.i18nOptions && { - ...feature.i18nOptions, - } - )} -

-
+
+ {FEATURES.map((feature) => ( + <> +
+
+ + {t(feature.title)}
- - ))} +
+

+ {t( + feature.description, + feature.i18nOptions && { + ...feature.i18nOptions, + } + )} +

+
+
+ + ))}
diff --git a/apps/web/public/product-cards/trustpilot-dark.svg b/apps/web/public/product-cards/trustpilot-dark.svg new file mode 100644 index 0000000000..c03dbf6358 --- /dev/null +++ b/apps/web/public/product-cards/trustpilot-dark.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/lib/constants.ts b/packages/lib/constants.ts index c1fa5a6381..acf6e4ce8c 100644 --- a/packages/lib/constants.ts +++ b/packages/lib/constants.ts @@ -124,3 +124,5 @@ export const IS_PREMIUM_USERNAME_ENABLED = // Max number of invites to join a team/org that can be sent at once export const MAX_NB_INVITES = 100; + +export const URL_PROTOCOL_REGEX = /(^\w+:|^)\/\//;