remove email pr

This commit is contained in:
Paul Werner 2024-09-16 07:13:00 +02:00
parent df6fc60d26
commit 3320efc35f
57 changed files with 863 additions and 1469 deletions

View file

@ -2,10 +2,8 @@
"$schema": "https://json.schemastore.org/package",
"name": "keywind",
"scripts": {
"build": "npm run build:email && npm run build:login",
"build:email": "vite-node scripts/build.email",
"build:login": "tsc && vite build",
"build:jar": "pnpm run build:email && pnpm run build:login && vite-node scripts/build",
"build": "tsc && vite build",
"build:jar": "pnpm run build && vite-node scripts/build",
"dev": "vite build --watch",
"test": "mvn test"
},
@ -20,12 +18,10 @@
"@types/node": "^20.6.5",
"archiver": "^6.0.1",
"autoprefixer": "^10.4.16",
"child-process-promise": "^2.2.1",
"mailwind": "^2.2.0",
"postcss": "^8.4.30",
"tailwindcss": "^3.3.3",
"typescript": "^5.2.2",
"vite": "^4.4.9",
"vite-node": "^0.34.5"
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,34 +0,0 @@
import { exec } from 'child-process-promise';
import * as path from 'node:path';
import { readdirSync, readFileSync, writeFileSync } from 'node:fs';
//BUILD:Head-Files
const directoryPath = path.join(__dirname, '../theme/keywind/email/html-src');
const directoryPathComponents = path.join(
__dirname,
'../theme/keywind/email/html-src/components/atoms'
);
const files = [
...readdirSync(directoryPath),
...readdirSync(directoryPathComponents).map((e) => `components/atoms/${e}`),
];
for (let file of files) {
if (file.includes('.ftl')) {
// Build using mailwind
await exec(
`mailwind --input-html ${path.join(
__dirname,
`../theme/keywind/email/html-src/${file}`
)} --output-html ${path.join(__dirname, `../theme/keywind/email/html/${file}`)}`
);
// fix: wrong build result for ftl-file exception
const data = readFileSync(path.join(__dirname, `../theme/keywind/email/html/${file}`));
const result = data
.toString()
.replaceAll('<!--@', '</@')
.replaceAll('<!--#', '</#')
.replaceAll('-->', '>');
writeFileSync(path.join(__dirname, `../theme/keywind/email/html/${file}`), result);
}
}

View file

@ -1,12 +0,0 @@
<#macro kw>
<table cellpadding="0" cellspacing="0" border="0"
class="fixed left-0 top-0 right-0 bottom-0 inset-0 z-10"
style="inset: 0; background-color: #ecf9ff; background-image: url('https://mailwind.blob.core.windows.net/website/blurred-background-transparency.jpg');"
>
<tr>
<td>
</td>
</tr>
</table>
</#macro>

View file

@ -1,9 +0,0 @@
<#macro kw>
<table cellpadding="0" cellspacing="0" border="0" align="center" class="text-left bg-white px-4 py-10 rounded-lg" style="box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);">
<tr>
<td align="center">
<#nested>
</td>
</tr>
</table>
</#macro>

View file

@ -1,9 +0,0 @@
<#macro kw>
<table cellpadding="0" cellspacing="0" border="0" align="center" class="relative z-20 py-10 px-4 max-w-[512px] mx-auto">
<tr>
<td align="center">
<#nested>
</td>
</tr>
</table>
</#macro>

View file

@ -1,9 +0,0 @@
<#macro kw>
<table cellpadding="0" cellspacing="0" border="0" align="right" class="w-full mt-4 text-right text-sm opacity-80">
<tr class="text-right text-sm opacity-80">
<td align="right" class="text-right text-sm opacity-80">
© ${.now?string('yyyy')} ${kcSanitize(realmName!"")}.
</td>
</tr>
</table>
</#macro>

View file

@ -1,15 +0,0 @@
<#macro kw>
<table cellpadding="0" cellspacing="0" border="0" align="center" class="text-center">
<tr class="text-center">
<td align="center" class="text-center">
<#if (properties.headingLogoUrl!"") != "">
<img class="h-10" src="${properties.headingLogoUrl}" alt="logo" />
<#else>
<h1 class="text-center text-4xl font-extrabold leading-none tracking-tight text-gray-900 md:text-5xl lg:text-6xl dark:text-white">
${kcSanitize(kcSanitize(realmName!""))}
</h1>
</#if>
</td>
</tr>
</table>
</#macro>

View file

@ -1,9 +0,0 @@
<#macro kw>
<table cellpadding="0" cellspacing="0" border="0" align="left" class="mt-10 text-left">
<tr>
<td align="left" class="text-left">
<#nested>
</td>
</tr>
</table>
</#macro>

View file

@ -1,13 +0,0 @@
<#macro kw script="">
<meta http-equiv="Content-Type" content="text/html charset=UTF-8" />
<meta name="robots" content="noindex, nofollow">
<meta name="x-apple-disable-message-reformatting">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no, url=no">
<#if properties.meta?has_content>
<#list properties.meta?split(" ") as meta>
<meta name="${meta?split('==')[0]}" content="${meta?split('==')[1]}">
</#list>
</#if>
</#macro>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("emailTestBodyHtml",realmName))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("emailUpdateConfirmationBodyHtml",link, newEmail, realmName, linkExpirationFormatter(linkExpiration)))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("emailVerificationBodyCodeHtml",code))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("emailVerificationBodyHtml",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration)))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("eventLoginErrorBodyHtml",event.date,event.ipAddress))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("eventRemoveTotpBodyHtml",event.date, event.ipAddress))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("eventUpdatePasswordBodyHtml",event.date, event.ipAddress))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("eventUpdateTotpBodyHtml",event.date, event.ipAddress))?no_esc}
</@layout.emailLayout>

View file

@ -1,12 +0,0 @@
<#outputformat "plainText">
<#assign requiredActionsText><#if requiredActions??><#list requiredActions><#items as reqActionItem>${msg("requiredAction.${reqActionItem}")}<#sep>, </#sep></#items></#list></#if></#assign>
</#outputformat>
<#import "template.ftl" as layout>
<@layout.emailLayout>
<#if requiredActions?seq_contains("invitation-required-action")>
${kcSanitize(msg("accountCreatedBodyHtml",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration)))?no_esc}
<#else>
${kcSanitize(msg("executeActionsBodyHtml",link, linkExpiration, realmName, requiredActionsText, linkExpirationFormatter(linkExpiration)))?no_esc}
</#if>
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("identityProviderLinkBodyHtml", identityProviderDisplayName, realmName, identityProviderContext.username, link, linkExpiration, linkExpirationFormatter(linkExpiration)))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("passwordResetBodyHtml",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration)))?no_esc}
</@layout.emailLayout>

View file

@ -1,28 +0,0 @@
<#import "document.ftl" as document>
<#import "components/atoms/background.ftl" as background>
<#import "components/atoms/card.ftl" as card>
<#import "components/atoms/container.ftl" as container>
<#import "components/atoms/footer.ftl" as footer>
<#import "components/atoms/header.ftl" as header>
<#import "components/atoms/main.ftl" as main>
<#macro emailLayout>
<!DOCTYPE html>
<html lang="${locale}" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<@document.kw script=script />
</head>
<body style="background-color: #ecf9ff; background-image: url('https://mailwind.blob.core.windows.net/website/blurred-background-transparency.jpg');">
<@background.kw />
<@container.kw>
<@card.kw>
<@header.kw />
<@main.kw>
<#nested>
</@main.kw>
</@card.kw>
<@footer.kw />
</@container.kw>
</body>
</html>
</#macro>

View file

@ -1,9 +0,0 @@
<#macro kw>
<table cellpadding="0" cellspacing="0" border="0" class="fixed left-0 top-0 right-0 bottom-0 inset-0 z-10" style="position: fixed; bottom: 0; left: 0; right: 0; top: 0; z-index: 10; inset: 0; background-color: #ecf9ff; background-image: url('https://mailwind.blob.core.windows.net/website/blurred-background-transparency.jpg');">
<tr>
<td>
</td>
</tr>
</table>
</#macro>

View file

@ -1,9 +0,0 @@
<#macro kw>
<table cellpadding="0" cellspacing="0" border="0" align="center" class="text-left bg-white px-4 py-10 rounded-lg" style="border-radius: 0.5rem; background-color: #fff; padding-left: 16px; padding-right: 16px; padding-top: 40px; padding-bottom: 40px; text-align: left; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);">
<tr>
<td align="center">
<#nested>
</td>
</tr>
</table>
</#macro>

View file

@ -1,9 +0,0 @@
<#macro kw>
<table cellpadding="0" cellspacing="0" border="0" align="center" class="relative z-20 py-10 px-4 max-w-[512px] mx-auto" style="position: relative; z-index: 20; margin-left: auto; margin-right: auto; max-width: 512px; padding-left: 16px; padding-right: 16px; padding-top: 40px; padding-bottom: 40px;">
<tr>
<td align="center">
<#nested>
</td>
</tr>
</table>
</#macro>

View file

@ -1,9 +0,0 @@
<#macro kw>
<table cellpadding="0" cellspacing="0" border="0" align="right" class="w-full mt-4 text-right text-sm opacity-80" style="margin-top: 16px; width: 100%; text-align: right; font-size: 14px; opacity: 0.8;">
<tr class="text-right text-sm opacity-80" style="text-align: right; font-size: 14px; opacity: 0.8;">
<td align="right" class="text-right text-sm opacity-80" style="text-align: right; font-size: 14px; opacity: 0.8;">
© ${.now?string('yyyy')} ${kcSanitize(realmName!"")}.
</td>
</tr>
</table>
</#macro>

View file

@ -1,15 +0,0 @@
<#macro kw>
<table cellpadding="0" cellspacing="0" border="0" align="center" class="text-center" style="text-align: center;">
<tr class="text-center" style="text-align: center;">
<td align="center" class="text-center" style="text-align: center;">
<#if (properties.headingLogoUrl!"") != "">
<img class="h-10" src="${properties.headingLogoUrl}" alt="logo" style="height: 40px;">
<#else>
<h1 class="text-center text-4xl font-extrabold leading-none tracking-tight text-gray-900 md:text-5xl lg:text-6xl dark:text-white" style="text-align: center; font-size: 36px; font-weight: 800; line-height: 1; letter-spacing: -0.025em; color: #111827;">
${kcSanitize(kcSanitize(realmName!""))}
</h1>
</#if>
</td>
</tr>
</table>
</#macro>

View file

@ -1,9 +0,0 @@
<#macro kw>
<table cellpadding="0" cellspacing="0" border="0" align="left" class="mt-10 text-left" style="margin-top: 40px; text-align: left;">
<tr>
<td align="left" class="text-left" style="text-align: left;">
<#nested>
</td>
</tr>
</table>
</#macro>

View file

@ -1,13 +0,0 @@
<#macro kw script="">
<meta http-equiv="Content-Type" content="text/html charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<meta name="x-apple-disable-message-reformatting">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no, url=no">
<#if properties.meta?has_content>
<#list properties.meta?split(" ") as meta>
<meta name="${meta?split('==')[0]}" content="${meta?split('==')[1]}">
</#list>
</#if>
</#macro>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("emailTestBodyHtml",realmName))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("emailUpdateConfirmationBodyHtml",link, newEmail, realmName, linkExpirationFormatter(linkExpiration)))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("emailVerificationBodyCodeHtml",code))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("emailVerificationBodyHtml",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration)))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("eventLoginErrorBodyHtml",event.date,event.ipAddress))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("eventRemoveTotpBodyHtml",event.date, event.ipAddress))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("eventUpdatePasswordBodyHtml",event.date, event.ipAddress))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("eventUpdateTotpBodyHtml",event.date, event.ipAddress))?no_esc}
</@layout.emailLayout>

View file

@ -1,12 +0,0 @@
<#outputformat "plainText">
<#assign requiredActionsText><#if requiredActions??><#list requiredActions><#items as reqActionItem>${msg("requiredAction.${reqActionItem}")}<#sep>, </#sep></#items></#list></#if></#assign>
</#outputformat>
<#import "template.ftl" as layout>
<@layout.emailLayout>
<#if requiredActions?seq_contains("invitation-required-action")>
${kcSanitize(msg("accountCreatedBodyHtml",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration)))?no_esc}
<#else>
${kcSanitize(msg("executeActionsBodyHtml",link, linkExpiration, realmName, requiredActionsText, linkExpirationFormatter(linkExpiration)))?no_esc}
</#if>
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("identityProviderLinkBodyHtml", identityProviderDisplayName, realmName, identityProviderContext.username, link, linkExpiration, linkExpirationFormatter(linkExpiration)))?no_esc}
</@layout.emailLayout>

View file

@ -1,4 +0,0 @@
<#import "template.ftl" as layout>
<@layout.emailLayout>
${kcSanitize(msg("passwordResetBodyHtml",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration)))?no_esc}
</@layout.emailLayout>

View file

@ -1,28 +0,0 @@
<#import "document.ftl" as document>
<#import "components/atoms/background.ftl" as background>
<#import "components/atoms/card.ftl" as card>
<#import "components/atoms/container.ftl" as container>
<#import "components/atoms/footer.ftl" as footer>
<#import "components/atoms/header.ftl" as header>
<#import "components/atoms/main.ftl" as main>
<#macro emailLayout>
<!DOCTYPE html>
<html lang="${locale}" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<@document.kw script=script />
</head>
<body style="background-color: #ecf9ff; background-image: url('https://mailwind.blob.core.windows.net/website/blurred-background-transparency.jpg');">
<@background.kw />
<@container.kw>
<@card.kw>
<@header.kw />
<@main.kw>
<#nested>
</@main.kw>
</@card.kw>
<@footer.kw />
</@container.kw>
</body>
</html>
</#macro>

View file

@ -1,2 +0,0 @@
<#ftl output_format="plainText">
${msg("emailTestBody", realmName)}

View file

@ -1,2 +0,0 @@
<#ftl output_format="plainText">
${msg("emailUpdateConfirmationBody",link, newEmail, realmName, linkExpirationFormatter(linkExpiration))}

View file

@ -1,2 +0,0 @@
<#ftl output_format="plainText">
${msg("emailVerificationBodyCode",code)}

View file

@ -1,2 +0,0 @@
<#ftl output_format="plainText">
${msg("emailVerificationBody",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration))}

View file

@ -1,2 +0,0 @@
<#ftl output_format="plainText">
${msg("eventLoginErrorBody",event.date,event.ipAddress)}

View file

@ -1,2 +0,0 @@
<#ftl output_format="plainText">
${msg("eventRemoveTotpBody",event.date, event.ipAddress)}

View file

@ -1,2 +0,0 @@
<#ftl output_format="plainText">
${msg("eventUpdatePasswordBody",event.date, event.ipAddress)}

View file

@ -1,2 +0,0 @@
<#ftl output_format="plainText">
${msg("eventUpdateTotpBody",event.date, event.ipAddress)}

View file

@ -1,8 +0,0 @@
<#ftl output_format="plainText">
<#assign requiredActionsText><#if requiredActions??><#list requiredActions><#items as reqActionItem>${msg("requiredAction.${reqActionItem}")}<#sep>, </#items></#list><#else></#if></#assign>
<#if link?ends_with("/welcome")>
${kcSanitize(msg("accountCreatedBody",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration)))}
<#else>
${kcSanitize(msg("executeActionsBody",link, linkExpiration, realmName, requiredActionsText, linkExpirationFormatter(linkExpiration)))}
</#if>

View file

@ -1,2 +0,0 @@
<#ftl output_format="plainText">
${msg("identityProviderLinkBody", identityProviderDisplayName, realmName, identityProviderContext.username, link, linkExpiration, linkExpirationFormatter(linkExpiration))}

View file

@ -1,2 +0,0 @@
<#ftl output_format="plainText">
${msg("passwordResetBody",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration))}

View file

@ -1,3 +0,0 @@
parent=base
headingLogoUrl=https://www.almig.de/typo3conf/ext/almig_package/Resources/Public/Images/almig-logo.png

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
import{m as o}from"./assets/module.esm-9a996e1c.js";window.Alpine=o;o.start();const t=window.location.hostname.includes("almig.de")&&!window.location.hostname.includes("dev.almig.de"),c=t?"https://static.almig.de/cookie-consent/cookie-consent-loader.js":"https://static.dev.almig.de/cookie-consent/cookie-consent-loader.js",e=document.createElement("script");e.src=c;e.async=!0;document.head.appendChild(e);
import{m as o}from"./assets/module.esm-9a996e1c.js";window.Alpine=o;o.start();