Skip to content

Commit

Permalink
Fix layout
Browse files Browse the repository at this point in the history
  • Loading branch information
salyh committed Dec 26, 2024
1 parent bae483a commit 20e868f
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 53 deletions.
2 changes: 1 addition & 1 deletion emails/eliatra-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const EmailLayout = ({
<Img src={`${baseUrl}meod_logo_light.svg`} width="170" height="50" alt="Eliatra" style={logo} />
<Text style={paragraph}>
Hi {userFirstname} {userLastname},

<br/><br/>
{children}
</Text>
<Section style={btnContainer}>
Expand Down
10 changes: 5 additions & 5 deletions emails/templates/email-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ const { exp } = createVariablesHelper("email-test.ftl");

export const Template = ({ locale }: TemplateProps) => (
<EmailLayout
userFirstname={exp("user.firstName")}
userLastname={exp("user.lastName")}
userFirstname={"Keycloak"}
userLastname={"Admin"}
locale={locale}
buttonText={exp('realmName')}
buttonLink={""}
emailAddress={exp("user.email")}
preview={"This is a test message from {exp('realmName')"}>
<p>
This is a test message from {exp("realmName")}
</p>

This is a test message from {exp("realmName")}

</EmailLayout>
);

Expand Down
26 changes: 8 additions & 18 deletions emails/templates/email-update-confirmation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ import {
} from "keycloakify-emails";
interface TemplateProps extends Omit<GetTemplateProps, "plainText"> {}

const paragraph = {
color: "#777",
fontSize: "16px",
lineHeight: "24px",
textAlign: "left" as const,
};

export const previewProps: TemplateProps = {
locale: "en",
themeName: "vanilla",
Expand All @@ -29,20 +22,17 @@ export const Template = ({ locale }: TemplateProps) => (
userFirstname={exp("user.firstName")}
userLastname={exp("user.lastName")}
locale={locale}
buttonText={exp("link")}
buttonText={"Confirm email address update"}
buttonLink={exp("link")}
emailAddress={exp("user.email")}
preview={"Confirm email address update"}>
<p>
To update your {exp("realmName")} account with email address {exp("newEmail")},
click the link below
</p>
<p>
This link will expire within {exp("linkExpirationFormatter(linkExpiration)")}.
</p>
<p>
If you don't want to proceed with this modification, just ignore this message.
</p>

To update your MEOD account with email address {exp("newEmail")},
click the link below
<br/><br/>
This link will expire within {exp("linkExpirationFormatter(linkExpiration)")}.
<br/><br/>
If you don't want to proceed with this modification, just ignore this message.
</EmailLayout>
);

Expand Down
17 changes: 8 additions & 9 deletions emails/templates/email-verification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ export const Template = ({ locale }: TemplateProps) => (
buttonLink={exp("link")}
emailAddress={exp("user.email")}
preview={"Verify your email address"}>
<p>
Someone has created a {exp("user.firstName")} account with this email address. If
this was you, click the link below to verify your email address
</p>
<p>
The link will expire within {exp("linkExpirationFormatter(linkExpiration)")}.
If the link is already expired just try to login and a new verification link will be sent.
</p>
<p>If you didn't create this account, just ignore this message.</p>

Someone has created a {exp("user.firstName")} account with this email address. If
this was you, click the link below to verify your email address
<br/><br/>
The link will expire within {exp("linkExpirationFormatter(linkExpiration)")}.
If the link is already expired just try to login and a new verification link will be sent.
<br/><br/>
If you didn't create this account, just ignore this message.
</EmailLayout>
);

Expand Down
15 changes: 7 additions & 8 deletions emails/templates/org-invite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ export const Template = ({ locale }: TemplateProps) => (
buttonLink={exp("link")}
emailAddress={exp("user.email")}
preview={"You were invited to join an organization"}>
<p>
You were invited to join the {exp("organization.name")} organization. Click the
link below to join.{" "}
</p>
<p>
This link will expire within {exp("linkExpirationFormatter(linkExpiration)")}.
</p>
<p>If you don't want to join the organization, just ignore this message.</p>

You were invited to join the {exp("organization.name")} organization. Click the
link below to join.{" "}
<br/><br/>
This link will expire within {exp("linkExpirationFormatter(linkExpiration)")}.
<br/><br/>
If you don't want to join the organization, just ignore this message.
</EmailLayout>
);

Expand Down
20 changes: 9 additions & 11 deletions emails/templates/password-reset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,15 @@ export const Template = ({ locale }: TemplateProps) => (
buttonLink={exp("link")}
emailAddress={exp("user.email")}
preview={"Reset credentials"}>
<p>
Someone just requested to change your {exp("realmName")} account's credentials. If
this was you, click on the link below to reset them.
</p>
<p>
This link will expire within {exp("linkExpirationFormatter(linkExpiration)")}.
</p>
<p>
If you don't want to reset your credentials, just ignore this message and nothing
will be changed.
</p>

Someone just requested to change your {exp("realmName")} account's credentials. If
this was you, click on the link below to reset them.
<br/><br/>
This link will expire within {exp("linkExpirationFormatter(linkExpiration)")}.
<br/><br/>
If you don't want to reset your credentials, just ignore this message and nothing
will be changed.

</EmailLayout>
);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meod",
"version": "1.0.3",
"version": "1.0.4",
"description": "Keycloakify 11 template for meod",
"repository": {
"type": "git",
Expand Down

0 comments on commit 20e868f

Please sign in to comment.