From 3423777ee30e1a99f30841123994dab594bd260a Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Thu, 18 Dec 2025 20:56:38 +0100 Subject: [PATCH] feat: gmail, outlook, yahoo links during email verification (#26038) * added gmail, outlook, yahoo links during email verification * added proton * enable for self-hosters too * undo i18n * Discard changes to companion/bun.lock * nit * refactor: code quality improvments --------- Co-authored-by: Dhairyashil --- apps/web/modules/auth/verify-email-view.tsx | 64 +++++++++--- apps/web/public/email-clients/gmail.svg | 7 ++ apps/web/public/email-clients/outlook.svg | 35 +++++++ apps/web/public/email-clients/proton.svg | 102 ++++++++++++++++++++ apps/web/public/email-clients/yahoo.svg | 1 + 5 files changed, 195 insertions(+), 14 deletions(-) create mode 100644 apps/web/public/email-clients/gmail.svg create mode 100644 apps/web/public/email-clients/outlook.svg create mode 100644 apps/web/public/email-clients/proton.svg create mode 100644 apps/web/public/email-clients/yahoo.svg diff --git a/apps/web/modules/auth/verify-email-view.tsx b/apps/web/modules/auth/verify-email-view.tsx index 0da43ceb68..590d113a72 100644 --- a/apps/web/modules/auth/verify-email-view.tsx +++ b/apps/web/modules/auth/verify-email-view.tsx @@ -2,17 +2,40 @@ import { useSession } from "next-auth/react"; import { useRouter } from "next/navigation"; -import { useEffect } from "react"; import posthog from "posthog-js"; +import { useEffect } from "react"; +import { useFlagMap } from "@calcom/features/flags/context/provider"; import { APP_NAME } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc"; import useEmailVerifyCheck from "@calcom/trpc/react/hooks/useEmailVerifyCheck"; -import { showToast } from "@calcom/ui/components/toast"; import { Button } from "@calcom/ui/components/button"; import { EmptyScreen } from "@calcom/ui/components/empty-screen"; -import { useFlagMap } from "@calcom/features/flags/context/provider"; +import { showToast } from "@calcom/ui/components/toast"; + +const EMAIL_CLIENTS = [ + { + name: "Gmail", + icon: "/email-clients/gmail.svg", + href: 'https://mail.google.com/mail/u/0/#search/%22api%2Fauth%2Fverify-email%22', + }, + { + name: "Outlook", + icon: "/email-clients/outlook.svg", + href: "https://outlook.live.com/mail/0/", + }, + { + name: "Yahoo", + icon: "/email-clients/yahoo.svg", + href: "https://mail.yahoo.com/d/search?p=Cal.com", + }, + { + name: "Proton", + icon: "/email-clients/proton.svg", + href: "https://mail.proton.me", + }, +] as const; function VerifyEmailPage() { const { data } = useEmailVerifyCheck(); @@ -47,17 +70,30 @@ function VerifyEmailPage() { description={t("verify_email_page_body", { email: session?.user?.email, appName: APP_NAME })} className="bg-default" buttonRaw={ - + <> +
+ {EMAIL_CLIENTS.map(({ name, icon, href }) => ( + + ))} +
+ + } /> diff --git a/apps/web/public/email-clients/gmail.svg b/apps/web/public/email-clients/gmail.svg new file mode 100644 index 0000000000..40b7175c11 --- /dev/null +++ b/apps/web/public/email-clients/gmail.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/apps/web/public/email-clients/outlook.svg b/apps/web/public/email-clients/outlook.svg new file mode 100644 index 0000000000..586f39ffb5 --- /dev/null +++ b/apps/web/public/email-clients/outlook.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/web/public/email-clients/proton.svg b/apps/web/public/email-clients/proton.svg new file mode 100644 index 0000000000..7756f8f044 --- /dev/null +++ b/apps/web/public/email-clients/proton.svg @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/web/public/email-clients/yahoo.svg b/apps/web/public/email-clients/yahoo.svg new file mode 100644 index 0000000000..6c2be965e8 --- /dev/null +++ b/apps/web/public/email-clients/yahoo.svg @@ -0,0 +1 @@ + \ No newline at end of file