mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 03:29:19 +02:00
fix: duplicate warning not shown in admin, double-encoded in partage, no focus
- toast-fragment.php: 204 early-exit now also checks flash['warning']; previously the warning was consumed by consumeFlash() then silently dropped - partage/index.php: store warning as plain text; htmlspecialchars() applied once at render time — previously htmlspecialchars() was called inside the stored string then again at output, producing ' entities etc. - partage/index.php: flash-warning div gets id + tabindex=-1; inline JS scrolls it into view and focuses it on DOMContentLoaded - admin/footer.php: htmx:afterSettle listener focuses .toast--warning after HTMX injects the toast fragment into #toast-region
This commit is contained in:
@@ -186,6 +186,7 @@
|
||||
background: var(--bg-secondary);
|
||||
border-color: var(--warning);
|
||||
color: var(--text-primary);
|
||||
animation: toast-enter 0.35s ease-out; /* no fade-out — stays until dismissed */
|
||||
}
|
||||
|
||||
.toast--warning a {
|
||||
|
||||
@@ -360,6 +360,7 @@ label:has(+ div > input:required)::after {
|
||||
background: var(--warning-muted-bg, rgba(251,202,81,.12));
|
||||
border-color: var(--warning-muted-border, rgba(251,202,81,.35));
|
||||
color: var(--text-primary);
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
/* ── Share link badge ───────────────────────────────────────────────────── */
|
||||
|
||||
Reference in New Issue
Block a user