feat: reload the page with a flash when an htmx request fails

This commit is contained in:
fromme committed 2026-09-17 16:48:48 +02:00
1 parent 0be3c2ccde
commit a2e4035889
14 files changed
+205 -210

No files matched your search

@@ -0,0 +1,21 @@
{#
Symfony's error page for anything but a 404, adopted from myep-team. Only used with debug off;
dev keeps showing the exception page (preview at /_error/500).
Never reached by an htmx request: a failed one reloads its page instead (see assets/app.js).
#}
{% extends 'layout.html.twig' %}
{% block title %}Fehler · ephub{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Oops... Ein Fehler ist aufgetreten
</h1>
<p class="mb-8">
Wir haben uns ein paar Notizen dazu gemacht und werden das Problem so schnell wie möglich beseitigen.
</p>
<a class="button button--primary" href="{{ path('app_dashboard') }}">
nochmal von vorne
</a>
{% endblock %}
@@ -0,0 +1,16 @@
{# Symfony's 404 page, adopted from myep-team. Only used with debug off. #}
{% extends 'layout.html.twig' %}
{% block title %}Nicht gefunden · ephub{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Oops... Ein Fehler ist aufgetreten
</h1>
<p class="mb-8">
Die von dir aufgerufene Seite können wir leider nicht (mehr) finden.
</p>
<a class="button button--primary" href="{{ path('app_dashboard') }}">
nochmal von vorne
</a>
{% endblock %}
-9
View File
@@ -1,9 +0,0 @@
{% embed 'htmx_modal.html.twig' %}
{% block title %}Oops…{% endblock %}
{% block content %}
<div class="bg-red-600 text-gray-100 rounded px-4 py-3 text-sm">
Da ist etwas schiefgelaufen. Wir haben uns Notizen gemacht und kümmern uns
schnellstmöglich darum.
</div>
{% endblock %}
{% endembed %}