Füge E-Mail-Benachrichtigungen für Sperrungen und zeitlich begrenzte Sperrungen hinzu
This commit is contained in:
166
apps/hub-server/modules/mail-templates/Bann.tsx
Normal file
166
apps/hub-server/modules/mail-templates/Bann.tsx
Normal file
@@ -0,0 +1,166 @@
|
||||
import * as React from "react";
|
||||
import { User } from "@repo/db";
|
||||
import { Html, render } from "@react-email/components";
|
||||
import { EmailFooter } from "./EmailFooter";
|
||||
|
||||
const styles = `
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
a[x-apple-data-detectors] {
|
||||
color: inherit !important;
|
||||
text-decoration: inherit !important;
|
||||
}
|
||||
#MessageViewBody a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
p {
|
||||
line-height: inherit;
|
||||
}
|
||||
.desktop_hide,
|
||||
.desktop_hide table {
|
||||
mso-hide: all;
|
||||
display: none;
|
||||
max-height: 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.image_block img + div {
|
||||
display: none;
|
||||
}
|
||||
sup,
|
||||
sub {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
}
|
||||
.menu_block.desktop_hide .menu-links span {
|
||||
mso-hide: all;
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
.desktop_hide table.icons-inner {
|
||||
display: inline-block !important;
|
||||
}
|
||||
.icons-inner {
|
||||
text-align: center;
|
||||
}
|
||||
.icons-inner td {
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const PenaltyNoticeTemplate = ({ user, staffName }: { user: User; staffName: string }) => (
|
||||
<Html lang="de">
|
||||
<meta content="text/html; charset=utf-8" httpEquiv="Content-Type" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css?family=Montserrat"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<style>{styles}</style>
|
||||
<body style={{ backgroundColor: "#FFFFFF", margin: 0, padding: 0 }}>
|
||||
<table width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<table align="center" width="680" style={{ margin: "0 auto", color: "#000000" }}>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style={{ textAlign: "center", paddingTop: "30px" }}>
|
||||
<img
|
||||
src={`${process.env.NEXT_PUBLIC_HUB_URL}/mail/var_logo.png`}
|
||||
alt="Logo"
|
||||
width="80"
|
||||
style={{ display: "block", margin: "0 auto" }}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style={{
|
||||
textAlign: "center",
|
||||
fontSize: "24px",
|
||||
color: "#011936",
|
||||
padding: "20px 0",
|
||||
}}
|
||||
>
|
||||
<strong>Deine dauerhafte Sperrung bei Virtual Air Rescue</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style={{
|
||||
textAlign: "center",
|
||||
fontSize: "30px",
|
||||
color: "#011936",
|
||||
}}
|
||||
>
|
||||
Hallo {user.firstname},
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style={{
|
||||
textAlign: "center",
|
||||
fontSize: "18px",
|
||||
color: "#011936",
|
||||
padding: "20px",
|
||||
}}
|
||||
>
|
||||
wir möchten dich darüber informieren, dass dein Account dauerhaft von unserer
|
||||
Plattform Virtual Air Rescue ausgeschlossen wurde.
|
||||
<br />
|
||||
Grund hierfür ist ein Verstoß gegen unsere Richtlinien. Eine Rückkehr auf die
|
||||
Plattform ist leider nicht mehr möglich.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style={{
|
||||
textAlign: "center",
|
||||
fontSize: "16px",
|
||||
color: "#011936",
|
||||
padding: "10px 0",
|
||||
}}
|
||||
>
|
||||
Für Fragen oder Einsicht in die Entscheidung kannst du dich direkt an uns
|
||||
wenden.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style={{
|
||||
textAlign: "center",
|
||||
fontSize: "18px",
|
||||
color: "#011936",
|
||||
padding: "20px",
|
||||
}}
|
||||
>
|
||||
Mit freundlichen Grüßen
|
||||
<br />
|
||||
<strong>{staffName}</strong>
|
||||
<br />
|
||||
Virtual Air Rescue
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<EmailFooter />
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</Html>
|
||||
);
|
||||
|
||||
export function renderBannNotice({ user, staffName }: { user: User; staffName: string }) {
|
||||
return render(<PenaltyNoticeTemplate user={user} staffName={staffName} />);
|
||||
}
|
||||
168
apps/hub-server/modules/mail-templates/TimeBann.tsx
Normal file
168
apps/hub-server/modules/mail-templates/TimeBann.tsx
Normal file
@@ -0,0 +1,168 @@
|
||||
import * as React from "react";
|
||||
import { User } from "@repo/db";
|
||||
import { Html, render } from "@react-email/components";
|
||||
import { EmailFooter } from "./EmailFooter";
|
||||
|
||||
const styles = `
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
a[x-apple-data-detectors] {
|
||||
color: inherit !important;
|
||||
text-decoration: inherit !important;
|
||||
}
|
||||
#MessageViewBody a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
p {
|
||||
line-height: inherit;
|
||||
}
|
||||
.desktop_hide,
|
||||
.desktop_hide table {
|
||||
mso-hide: all;
|
||||
display: none;
|
||||
max-height: 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.image_block img + div {
|
||||
display: none;
|
||||
}
|
||||
sup,
|
||||
sub {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
}
|
||||
.menu_block.desktop_hide .menu-links span {
|
||||
mso-hide: all;
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
.desktop_hide table.icons-inner {
|
||||
display: inline-block !important;
|
||||
}
|
||||
.icons-inner {
|
||||
text-align: center;
|
||||
}
|
||||
.icons-inner td {
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const TimeBanTemplate = ({ user, staffName }: { user: User; staffName: string }) => (
|
||||
<Html lang="de">
|
||||
<meta content="text/html; charset=utf-8" httpEquiv="Content-Type" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css?family=Montserrat"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<style>{styles}</style>
|
||||
<body style={{ backgroundColor: "#FFFFFF", margin: 0, padding: 0 }}>
|
||||
<table width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<table align="center" width="680" style={{ margin: "0 auto", color: "#000000" }}>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style={{ textAlign: "center", paddingTop: "30px" }}>
|
||||
<img
|
||||
src={`${process.env.NEXT_PUBLIC_HUB_URL}/mail/var_logo.png`}
|
||||
alt="Logo"
|
||||
width="80"
|
||||
style={{ display: "block", margin: "0 auto" }}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style={{
|
||||
textAlign: "center",
|
||||
fontSize: "24px",
|
||||
color: "#011936",
|
||||
padding: "20px 0",
|
||||
}}
|
||||
>
|
||||
<strong>
|
||||
Zeitlich begrenzte Sperrung deines Accounts bei Virtual Air Rescue
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style={{
|
||||
textAlign: "center",
|
||||
fontSize: "30px",
|
||||
color: "#011936",
|
||||
}}
|
||||
>
|
||||
Hallo {user.firstname},
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style={{
|
||||
textAlign: "center",
|
||||
fontSize: "18px",
|
||||
color: "#011936",
|
||||
padding: "20px",
|
||||
}}
|
||||
>
|
||||
Aufgrund eines Regelverstoßes wurde dein Account bei Virtual Air Rescue
|
||||
zeitlich begrenzt gesperrt.
|
||||
<br />
|
||||
Die Sperre bleibt bis zum Ablauf der definierten Frist aktiv. Danach kannst du
|
||||
die Plattform wie gewohnt weiter nutzen.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style={{
|
||||
textAlign: "center",
|
||||
fontSize: "16px",
|
||||
color: "#011936",
|
||||
padding: "10px 0",
|
||||
}}
|
||||
>
|
||||
Wir empfehlen dir, unsere Verhaltensrichtlinien noch einmal durchzulesen, um
|
||||
zukünftige Sperren zu vermeiden.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
style={{
|
||||
textAlign: "center",
|
||||
fontSize: "18px",
|
||||
color: "#011936",
|
||||
padding: "20px",
|
||||
}}
|
||||
>
|
||||
Mit freundlichen Grüßen
|
||||
<br />
|
||||
<strong>{staffName}</strong>
|
||||
<br />
|
||||
Virtual Air Rescue
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<EmailFooter />
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</Html>
|
||||
);
|
||||
|
||||
export function renderTimeBanNotice({ user, staffName }: { user: User; staffName: string }) {
|
||||
return render(<TimeBanTemplate user={user} staffName={staffName} />);
|
||||
}
|
||||
Reference in New Issue
Block a user