Email footer rework
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { User } from "@repo/db";
|
import { User } from "@repo/db";
|
||||||
import { Html, render } from "@react-email/components";
|
import { Html, render } from "@react-email/components";
|
||||||
|
import { EmailFooter } from "./EmailFooter";
|
||||||
|
|
||||||
const styles = `
|
const styles = `
|
||||||
* {
|
* {
|
||||||
@@ -183,43 +184,7 @@ const Template = ({ user, code }: { user: User; code: string }) => (
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style={{ textAlign: "center", paddingTop: "20px" }}>
|
<EmailFooter />
|
||||||
<a
|
|
||||||
href="https://your-platform.com"
|
|
||||||
style={{
|
|
||||||
padding: "10px",
|
|
||||||
textDecoration: "none",
|
|
||||||
borderRadius: "20px",
|
|
||||||
color: "#011936",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Impressum
|
|
||||||
</a>
|
|
||||||
<span style={{ margin: "0 10px" }}>|</span>
|
|
||||||
<a
|
|
||||||
href="https://your-platform.com"
|
|
||||||
style={{
|
|
||||||
padding: "10px",
|
|
||||||
textDecoration: "none",
|
|
||||||
borderRadius: "20px",
|
|
||||||
color: "#011936",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Datenschutzerklärung
|
|
||||||
</a>
|
|
||||||
<span style={{ margin: "0 10px" }}>|</span>
|
|
||||||
<a
|
|
||||||
href="https://your-platform.com"
|
|
||||||
style={{
|
|
||||||
padding: "10px",
|
|
||||||
textDecoration: "none",
|
|
||||||
borderRadius: "20px",
|
|
||||||
color: "#011936",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Knowledgebase
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import * as React from "react";
|
|||||||
import { Event, User } from "@repo/db";
|
import { Event, User } from "@repo/db";
|
||||||
import { Html, Button, render } from "@react-email/components";
|
import { Html, Button, render } from "@react-email/components";
|
||||||
import { Badge } from "./Badge";
|
import { Badge } from "./Badge";
|
||||||
|
import { EmailFooter } from "./EmailFooter";
|
||||||
|
|
||||||
const styles = `
|
const styles = `
|
||||||
* {
|
* {
|
||||||
@@ -132,43 +133,7 @@ const Template = ({ event, user }: { user: User; event: Event }) => (
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style={{ textAlign: "center", paddingTop: "20px" }}>
|
<EmailFooter />
|
||||||
<a
|
|
||||||
href="https://your-platform.com"
|
|
||||||
style={{
|
|
||||||
padding: "10px",
|
|
||||||
textDecoration: "none",
|
|
||||||
borderRadius: "20px",
|
|
||||||
color: "#011936",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Impressum
|
|
||||||
</a>
|
|
||||||
<span style={{ margin: "0 10px" }}>|</span>
|
|
||||||
<a
|
|
||||||
href="https://your-platform.com"
|
|
||||||
style={{
|
|
||||||
padding: "10px",
|
|
||||||
textDecoration: "none",
|
|
||||||
borderRadius: "20px",
|
|
||||||
color: "#011936",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Datenschutzerklärung
|
|
||||||
</a>
|
|
||||||
<span style={{ margin: "0 10px" }}>|</span>
|
|
||||||
<a
|
|
||||||
href="https://your-platform.com"
|
|
||||||
style={{
|
|
||||||
padding: "10px",
|
|
||||||
textDecoration: "none",
|
|
||||||
borderRadius: "20px",
|
|
||||||
color: "#011936",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Knowledgebase
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
41
apps/hub-server/modules/mail-templates/EmailFooter.tsx
Normal file
41
apps/hub-server/modules/mail-templates/EmailFooter.tsx
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
export const EmailFooter = () => {
|
||||||
|
return (
|
||||||
|
<td style={{ textAlign: "center", paddingTop: "20px" }}>
|
||||||
|
<a
|
||||||
|
href="https://virtualairrescue.com/impressum"
|
||||||
|
style={{
|
||||||
|
padding: "10px",
|
||||||
|
textDecoration: "none",
|
||||||
|
borderRadius: "20px",
|
||||||
|
color: "#011936",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Impressum
|
||||||
|
</a>
|
||||||
|
<span style={{ margin: "0 10px" }}>|</span>
|
||||||
|
<a
|
||||||
|
href="https://virtualairrescue.com/datenschutz"
|
||||||
|
style={{
|
||||||
|
padding: "10px",
|
||||||
|
textDecoration: "none",
|
||||||
|
borderRadius: "20px",
|
||||||
|
color: "#011936",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Datenschutzerklärung
|
||||||
|
</a>
|
||||||
|
<span style={{ margin: "0 10px" }}>|</span>
|
||||||
|
<a
|
||||||
|
href="https://docs.virtualairrescue.com/"
|
||||||
|
style={{
|
||||||
|
padding: "10px",
|
||||||
|
textDecoration: "none",
|
||||||
|
borderRadius: "20px",
|
||||||
|
color: "#011936",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Knowledgebase
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { User } from "@repo/db";
|
import { User } from "@repo/db";
|
||||||
import { Html, render } from "@react-email/components";
|
import { Html, render } from "@react-email/components";
|
||||||
|
import { EmailFooter } from "./EmailFooter";
|
||||||
|
|
||||||
const styles = `
|
const styles = `
|
||||||
* {
|
* {
|
||||||
@@ -138,43 +139,7 @@ const Template = ({ user, password }: { user: User; password: string }) => (
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style={{ textAlign: "center", paddingTop: "20px" }}>
|
<EmailFooter />
|
||||||
<a
|
|
||||||
href="https://your-platform.com"
|
|
||||||
style={{
|
|
||||||
padding: "10px",
|
|
||||||
textDecoration: "none",
|
|
||||||
borderRadius: "20px",
|
|
||||||
color: "#011936",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Impressum
|
|
||||||
</a>
|
|
||||||
<span style={{ margin: "0 10px" }}>|</span>
|
|
||||||
<a
|
|
||||||
href="https://your-platform.com"
|
|
||||||
style={{
|
|
||||||
padding: "10px",
|
|
||||||
textDecoration: "none",
|
|
||||||
borderRadius: "20px",
|
|
||||||
color: "#011936",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Datenschutzerklärung
|
|
||||||
</a>
|
|
||||||
<span style={{ margin: "0 10px" }}>|</span>
|
|
||||||
<a
|
|
||||||
href="https://your-platform.com"
|
|
||||||
style={{
|
|
||||||
padding: "10px",
|
|
||||||
textDecoration: "none",
|
|
||||||
borderRadius: "20px",
|
|
||||||
color: "#011936",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Knowledgebase
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"allowImportingTsExtensions": false,
|
"allowImportingTsExtensions": false,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"jsx": "react"
|
"jsx": "react-jsx"
|
||||||
},
|
},
|
||||||
"include": ["**/*.ts", "./index.ts", "modules/mail-templates/VerificationCode.tsx"],
|
"include": ["**/*.ts", "./index.ts", "modules/mail-templates/VerificationCode.tsx"],
|
||||||
"exclude": ["node_modules", "dist"]
|
"exclude": ["node_modules", "dist"]
|
||||||
|
|||||||
@@ -69,15 +69,7 @@ export const options: AuthOptions = {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (!dbUser) {
|
if (!dbUser) {
|
||||||
return {
|
return null as any;
|
||||||
...session,
|
|
||||||
user: {
|
|
||||||
name: null,
|
|
||||||
email: null,
|
|
||||||
image: null,
|
|
||||||
},
|
|
||||||
expires: new Date().toISOString(),
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
...session,
|
...session,
|
||||||
|
|||||||
Reference in New Issue
Block a user