asdasd
This commit is contained in:
@@ -9,7 +9,10 @@ $flash = $app->flash()->get();
|
|||||||
?>
|
?>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="pill">env: <?= htmlspecialchars(defined('APP_ENV') ? APP_ENV : 'local', ENT_QUOTES) ?></div>
|
<div class="pill">env: <?= htmlspecialchars(defined('APP_ENV') ? APP_ENV : 'local', ENT_QUOTES) ?></div>
|
||||||
<h1 style="margin-top: .75rem;"><?= htmlspecialchars(t('common.title'), ENT_QUOTES) ?></h1>
|
<div style="display:flex; align-items:center; gap:.75rem; margin-top:.75rem;">
|
||||||
|
<img src="/assets/images/logo.png" alt="Nexus" style="height:40px; width:auto;">
|
||||||
|
<h1 style="margin:0;"><?= htmlspecialchars(t('common.title'), ENT_QUOTES) ?></h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p class="muted"><?= htmlspecialchars(t('common.intro'), ENT_QUOTES) ?></p>
|
<p class="muted"><?= htmlspecialchars(t('common.intro'), ENT_QUOTES) ?></p>
|
||||||
|
|
||||||
|
|||||||
BIN
public/assets/images/logo.png
Normal file
BIN
public/assets/images/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 247 KiB |
@@ -378,7 +378,7 @@ final class AccountPages
|
|||||||
$ctx = stream_context_create([
|
$ctx = stream_context_create([
|
||||||
'http' => [
|
'http' => [
|
||||||
'method' => 'GET',
|
'method' => 'GET',
|
||||||
'header' => "User-Agent: papa-kind-treff/1.0\r\nAccept-Language: de\r\n",
|
'header' => "User-Agent: nexus/1.0\r\nAccept-Language: de\r\n",
|
||||||
'timeout' => 6,
|
'timeout' => 6,
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -11,6 +11,18 @@ class Config
|
|||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function primaryUrl(): string
|
||||||
|
{
|
||||||
|
if (defined('APP_URL_PRIMARY') && APP_URL_PRIMARY !== '') {
|
||||||
|
return APP_URL_PRIMARY;
|
||||||
|
}
|
||||||
|
$domain = $this->cookieDomain();
|
||||||
|
if ($domain) {
|
||||||
|
return 'https://' . $domain;
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
public function cookiePrefix(): string
|
public function cookiePrefix(): string
|
||||||
{
|
{
|
||||||
if (defined('APP_PREFIX') && APP_PREFIX !== '') {
|
if (defined('APP_PREFIX') && APP_PREFIX !== '') {
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ final class I18n
|
|||||||
// Minimal example translations (normally load JSON/PHP arrays from disk)
|
// Minimal example translations (normally load JSON/PHP arrays from disk)
|
||||||
$this->fallback = [
|
$this->fallback = [
|
||||||
'common' => [
|
'common' => [
|
||||||
'title' => 'Papa-Kind-Treff',
|
'title' => 'Nexus',
|
||||||
'intro' => 'Väter vernetzen sich für Treffen mit und ohne Kinder.',
|
'intro' => 'Internal configuration editor',
|
||||||
],
|
],
|
||||||
'cta' => [
|
'cta' => [
|
||||||
'primary' => 'Weiter',
|
'primary' => 'Weiter',
|
||||||
@@ -48,7 +48,7 @@ final class I18n
|
|||||||
|
|
||||||
// Built-ins
|
// Built-ins
|
||||||
$val = str_replace('{year}', date('Y'), $val);
|
$val = str_replace('{year}', date('Y'), $val);
|
||||||
$val = str_replace('{{primary_url}}', $this->config->primaryUrl, $val);
|
$val = str_replace('{{primary_url}}', $this->config->primaryUrl(), $val);
|
||||||
|
|
||||||
foreach ($vars as $k => $v) {
|
foreach ($vars as $k => $v) {
|
||||||
$val = str_replace('{' . $k . '}', (string)$v, $val);
|
$val = str_replace('{' . $k . '}', (string)$v, $val);
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ final class Mailer
|
|||||||
$this->log('template_api_success', ['template' => $id, 'subject' => $decoded['subject'] ?? null, 'html_len' => strlen((string)$decoded['html'])]);
|
$this->log('template_api_success', ['template' => $id, 'subject' => $decoded['subject'] ?? null, 'html_len' => strlen((string)$decoded['html'])]);
|
||||||
return [
|
return [
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
'subject' => $decoded['subject'] ?? 'Papa-Kind-Treff',
|
'subject' => $decoded['subject'] ?? 'Nexus',
|
||||||
'html' => $decoded['html'],
|
'html' => $decoded['html'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -113,7 +113,7 @@ final class Mailer
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fallback: einfacher Text
|
// Fallback: einfacher Text
|
||||||
$subject = 'Papa-Kind-Treff';
|
$subject = 'Nexus';
|
||||||
$body = $id;
|
$body = $id;
|
||||||
foreach ($vars as $k => $v) {
|
foreach ($vars as $k => $v) {
|
||||||
$body = str_replace(['{' . $k . '}', '{{' . $k . '}}'], (string)$v, $body);
|
$body = str_replace(['{' . $k . '}', '{{' . $k . '}}'], (string)$v, $body);
|
||||||
@@ -134,7 +134,7 @@ final class Mailer
|
|||||||
|
|
||||||
$tpl = $this->renderTemplate($templateKey, $vars);
|
$tpl = $this->renderTemplate($templateKey, $vars);
|
||||||
$resolvedId = $tpl['id'] ?? $templateKey;
|
$resolvedId = $tpl['id'] ?? $templateKey;
|
||||||
$subject = $tpl['subject'] ?? 'Papa-Kind-Treff';
|
$subject = $tpl['subject'] ?? 'Nexus';
|
||||||
$html = $tpl['html'] ?? '';
|
$html = $tpl['html'] ?? '';
|
||||||
|
|
||||||
$this->log('mail_rendered_template', [
|
$this->log('mail_rendered_template', [
|
||||||
@@ -147,7 +147,7 @@ final class Mailer
|
|||||||
|
|
||||||
$transport = getenv('MAIL_TRANSPORT') ?: 'mail';
|
$transport = getenv('MAIL_TRANSPORT') ?: 'mail';
|
||||||
$fromEmail = getenv('MAIL_FROM') ?: 'no-reply@' . $this->app->config()->primaryDomain;
|
$fromEmail = getenv('MAIL_FROM') ?: 'no-reply@' . $this->app->config()->primaryDomain;
|
||||||
$fromName = getenv('MAIL_FROM_NAME') ?: 'Papa-Kind-Treff';
|
$fromName = getenv('MAIL_FROM_NAME') ?: 'Nexus';
|
||||||
|
|
||||||
$this->log('mail_send_start', [
|
$this->log('mail_send_start', [
|
||||||
'template_key' => $templateKey,
|
'template_key' => $templateKey,
|
||||||
|
|||||||
Reference in New Issue
Block a user