Phase 120 - Plan 01:
- Reusable PHP alert component (resources/views/components/alert.php)
with inline SVG icon per type, optional dismiss button.
- Missing .alert--info SCSS variant added (#eff6ff/#bfdbfe/#1e3a8a) -
fixes black-on-white alert after Fakturownia test connection.
- Flash::push(type, message) + Flash::all() with BC for set/get;
legacy key heuristic (error/.save/warning -> typed entries).
- Central flash renderer in 3 layouts (app/auth/public) iterating
Flash::all() through component (.alerts-stack wrap).
- Vanilla JS alert-dismiss.js with idempotent guard and delegated
click handler on [data-alert-dismiss].
- 36 views migrated off inline <div class="alert alert--TYPE">;
.flash--error/success removed from views (orders/show, shipments/prepare).
- SCSS rebuilt: public/assets/css/{app,login}.css.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
33 lines
1.5 KiB
PHP
33 lines
1.5 KiB
PHP
<!doctype html>
|
|
<html lang="pl">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title><?= $e($t('meta.title_pattern', ['title' => (string) ($title ?? $t('meta.default_login_title'))])) ?></title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="/assets/css/login.css?ver=<?= filemtime(dirname(__DIR__, 3) . '/public/assets/css/login.css') ?: 0 ?>">
|
|
</head>
|
|
<body>
|
|
<div class="bg-orb bg-orb-left" aria-hidden="true"></div>
|
|
<div class="bg-orb bg-orb-right" aria-hidden="true"></div>
|
|
|
|
<main class="login-page">
|
|
<?php $flashEntries = \App\Core\Support\Flash::all(); ?>
|
|
<?php if (!empty($flashEntries)): ?>
|
|
<div class="alerts-stack" data-flash-stack>
|
|
<?php foreach ($flashEntries as $flashEntry): ?>
|
|
<?php $type = (string) ($flashEntry['type'] ?? 'info'); ?>
|
|
<?php $message = (string) ($flashEntry['message'] ?? ''); ?>
|
|
<?php $dismissible = true; ?>
|
|
<?php include __DIR__ . '/../components/alert.php'; ?>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?= $content ?>
|
|
</main>
|
|
<script src="/assets/js/modules/alert-dismiss.js?ver=<?= filemtime(dirname(__DIR__, 3) . '/public/assets/js/modules/alert-dismiss.js') ?: 0 ?>"></script>
|
|
</body>
|
|
</html>
|