Implement package limit notification system

This commit is contained in:
Codex Agent
2025-11-01 13:19:07 +01:00
parent 81cdee428e
commit 2c14493604
87 changed files with 4557 additions and 290 deletions

View File

@@ -14,8 +14,28 @@ class InviteLayoutSeeder extends Seeder
$reflection = new ReflectionClass(JoinTokenLayoutRegistry::class);
$layoutsConst = $reflection->getReflectionConstant('LAYOUTS');
$fallbackLayouts = $layoutsConst ? $layoutsConst->getValue() : [];
$qrSizeOverrides = [
'evergreen-vows' => 640,
'midnight-gala' => 640,
'garden-brunch' => 660,
'sparkler-soiree' => 680,
'confetti-bash' => 680,
];
$defaultQrSize = 640;
$targetSvgWidth = 1240;
$targetSvgHeight = 1754;
foreach ($fallbackLayouts as $layout) {
$layoutId = $layout['id'] ?? null;
$forcedQrSize = $qrSizeOverrides[$layoutId] ?? $defaultQrSize;
$existingQrSize = (int) ($layout['qr']['size_px'] ?? $layout['qr_size_px'] ?? 0);
$qrSize = max($existingQrSize, $forcedQrSize);
$existingSvgWidth = (int) ($layout['svg']['width'] ?? $layout['svg_width'] ?? 0);
$existingSvgHeight = (int) ($layout['svg']['height'] ?? $layout['svg_height'] ?? 0);
$svgWidth = max($existingSvgWidth, $targetSvgWidth);
$svgHeight = max($existingSvgHeight, $targetSvgHeight);
$preview = [
'background' => $layout['background'] ?? null,
'background_gradient' => $layout['background_gradient'] ?? null,
@@ -23,8 +43,8 @@ class InviteLayoutSeeder extends Seeder
'secondary' => $layout['secondary'] ?? null,
'text' => $layout['text'] ?? null,
'badge' => $layout['badge'] ?? null,
'qr' => $layout['qr'] ?? ['size_px' => 500],
'svg' => $layout['svg'] ?? ['width' => 1240, 'height' => 1754],
'qr' => ['size_px' => $qrSize],
'svg' => ['width' => $svgWidth, 'height' => $svgHeight],
];
$options = [