Feat - invite user to team flow improvements (#6725)
This commit is contained in:
1 parent
99e71054ff
commit
208fc2f0e4
14 files changed
+141
-39
No files matched your search
@@ -14,7 +14,7 @@ export const CallToAction = (props: { label: string; href: string; secondary?: b
|
||||
margin: 0,
|
||||
textDecoration: "none",
|
||||
textTransform: "none",
|
||||
padding: "10px 16px",
|
||||
padding: "16px 24px",
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
msoPaddingAlt: "0px",
|
||||
|
||||
@@ -26,8 +26,8 @@ export const V2BaseEmailHtml = (props: {
|
||||
return (
|
||||
<Html>
|
||||
<EmailHead title={props.subject} />
|
||||
<body style={{ wordSpacing: "normal", backgroundColor: "#F5F5F5" }}>
|
||||
<div style={{ backgroundColor: "#F5F5F5" }}>
|
||||
<body style={{ wordSpacing: "normal", backgroundColor: "#F3F4F6" }}>
|
||||
<div style={{ backgroundColor: "#F3F4F6" }}>
|
||||
<RawHtml
|
||||
html={`<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->`}
|
||||
/>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { TFunction } from "next-i18next";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
import { APP_NAME, BASE_URL, IS_PRODUCTION } from "@calcom/lib/constants";
|
||||
import { APP_NAME, WEBAPP_URL, IS_PRODUCTION } from "@calcom/lib/constants";
|
||||
|
||||
import { V2BaseEmailHtml, CallToAction } from "../components";
|
||||
|
||||
@@ -10,6 +11,7 @@ type TeamInvite = {
|
||||
to: string;
|
||||
teamName: string;
|
||||
joinLink: string;
|
||||
isCalcomMember: boolean;
|
||||
};
|
||||
|
||||
export const TeamInviteEmail = (
|
||||
@@ -22,39 +24,100 @@ export const TeamInviteEmail = (
|
||||
team: props.teamName,
|
||||
appName: APP_NAME,
|
||||
})}>
|
||||
<p style={{ fontSize: "24px", marginBottom: "16px", textAlign: "center" }}>
|
||||
<>{props.language("email_no_user_invite_heading", { appName: APP_NAME })}</>
|
||||
</p>
|
||||
<img
|
||||
height="64"
|
||||
style={{
|
||||
borderRadius: "16px",
|
||||
height: "270px",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
src={
|
||||
IS_PRODUCTION
|
||||
? BASE_URL + "/emails/teamCircle@2x.png"
|
||||
: "http://localhost:3000/emails/teamCircle@2x.png"
|
||||
? WEBAPP_URL + "/emails/calendar-email-hero.png"
|
||||
: "http://localhost:3000/emails/calendar-email-hero.png"
|
||||
}
|
||||
style={{
|
||||
border: "0",
|
||||
display: "block",
|
||||
outline: "none",
|
||||
textDecoration: "none",
|
||||
height: "64px",
|
||||
fontSize: "13px",
|
||||
marginBottom: "24px",
|
||||
}}
|
||||
width="64"
|
||||
alt=""
|
||||
/>
|
||||
<p style={{ fontSize: "24px", marginBottom: "16px" }}>
|
||||
<>
|
||||
{props.language("user_invited_you", {
|
||||
user: props.from,
|
||||
team: props.teamName,
|
||||
appName: APP_NAME,
|
||||
})}
|
||||
!
|
||||
</>
|
||||
<p
|
||||
style={{
|
||||
fontWeight: 400,
|
||||
lineHeight: "24px",
|
||||
marginBottom: "32px",
|
||||
marginTop: "32px",
|
||||
lineHeightStep: "24px",
|
||||
}}>
|
||||
<>{props.language("email_no_user_invite_subheading", { invitedBy: props.from, appName: APP_NAME })}</>
|
||||
</p>
|
||||
<p style={{ fontWeight: 400, lineHeight: "24px", marginBottom: "32px" }}>
|
||||
<>{props.language("calcom_explained", { appName: APP_NAME })}</>
|
||||
<div style={{ display: "flex", justifyContent: "center" }}>
|
||||
<CallToAction
|
||||
label={props.language(props.isCalcomMember ? "email_user_cta" : "email_no_user_cta")}
|
||||
href={props.joinLink}
|
||||
/>
|
||||
</div>
|
||||
<p
|
||||
style={{
|
||||
fontWeight: 400,
|
||||
lineHeight: "24px",
|
||||
marginBottom: "32px",
|
||||
marginTop: "48px",
|
||||
lineHeightStep: "24px",
|
||||
}}>
|
||||
<>{props.language("email_no_user_invite_steps_intro")}</>
|
||||
</p>
|
||||
<CallToAction label={props.language("accept_invitation")} href={props.joinLink} />
|
||||
|
||||
{!props.isCalcomMember && (
|
||||
<div style={{ display: "flex", flexDirection: "column", gap: "32px" }}>
|
||||
<EmailStep
|
||||
translationString={props.language("email_no_user_step_one")}
|
||||
iconsrc={
|
||||
IS_PRODUCTION
|
||||
? WEBAPP_URL + "/emails/[email protected]"
|
||||
: "http://localhost:3000/emails/[email protected]"
|
||||
}
|
||||
/>
|
||||
<EmailStep
|
||||
translationString={props.language("email_no_user_step_two")}
|
||||
iconsrc={
|
||||
IS_PRODUCTION
|
||||
? WEBAPP_URL + "/emails/[email protected]"
|
||||
: "http://localhost:3000/emails/[email protected]"
|
||||
}
|
||||
/>
|
||||
<EmailStep
|
||||
translationString={props.language("email_no_user_step_three")}
|
||||
iconsrc={
|
||||
IS_PRODUCTION
|
||||
? WEBAPP_URL + "/emails/[email protected]"
|
||||
: "http://localhost:3000/emails/[email protected]"
|
||||
}
|
||||
/>
|
||||
<EmailStep
|
||||
translationString={props.language("email_no_user_step_four", { teamName: props.teamName })}
|
||||
iconsrc={
|
||||
IS_PRODUCTION
|
||||
? WEBAPP_URL + "/emails/[email protected]"
|
||||
: "http://localhost:3000/emails/[email protected]"
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="">
|
||||
<p
|
||||
style={{
|
||||
fontWeight: 400,
|
||||
lineHeight: "24px",
|
||||
marginBottom: "32px",
|
||||
marginTop: "32px",
|
||||
lineHeightStep: "24px",
|
||||
}}>
|
||||
<>{props.language("email_no_user_signoff", { appName: APP_NAME })}</>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style={{ borderTop: "1px solid #E1E1E1", marginTop: "32px", paddingTop: "32px" }}>
|
||||
<p style={{ fontWeight: 400, margin: 0 }}>
|
||||
@@ -70,3 +133,34 @@ export const TeamInviteEmail = (
|
||||
</V2BaseEmailHtml>
|
||||
);
|
||||
};
|
||||
|
||||
const EmailStep = (props: { translationString: string; iconsrc: string }) => {
|
||||
return (
|
||||
<div style={{ display: "flex", alignItems: "center" }}>
|
||||
<div
|
||||
style={{
|
||||
backgroundColor: "#E5E7EB",
|
||||
borderRadius: "48px",
|
||||
height: "48px",
|
||||
width: "48px",
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
color: "white",
|
||||
marginRight: "16px",
|
||||
}}>
|
||||
<img src={props.iconsrc} alt="#" style={{ height: "24px", width: "auto" }} />
|
||||
</div>
|
||||
<p
|
||||
style={{
|
||||
fontStyle: "normal",
|
||||
fontWeight: 500,
|
||||
fontSize: "18px",
|
||||
lineHeight: "20px",
|
||||
color: "#black",
|
||||
}}>
|
||||
<>{props.translationString}</>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user