mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-10 14:52:42 +02:00
feat: add dismiss button and improve hiding for htmx-error-handler
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
<script type="text/hyperscript">
|
<script type="text/hyperscript">
|
||||||
behavior htmx_error_handler
|
behavior htmx_error_handler
|
||||||
on htmx:responseError or htmx:afterRequest[detail.failed] remove .invisible .visually-hidden .swing-in-top-fwd from
|
on htmx:responseError or htmx:afterRequest[detail.failed] remove .tw-hidden from
|
||||||
#loading-error then log event
|
#loading-error then log event
|
||||||
on htmx:afterRequest[detail.successful] add .invisible .visually-hidden .swing-in-top-fwd to #loading-error
|
on htmx:afterRequest[detail.successful] add .tw-hidden to #loading-error
|
||||||
|
on click from #loading-error-close add .tw-hidden to #loading-error
|
||||||
end
|
end
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -27,9 +27,10 @@
|
|||||||
{% block body_hyperscript %}{% endblock %}">
|
{% block body_hyperscript %}{% endblock %}">
|
||||||
{% include 'includes/navbar.html' %}
|
{% include 'includes/navbar.html' %}
|
||||||
|
|
||||||
<div class="container invisible visually-hidden" id="loading-error">
|
<div class="container tw-hidden" id="loading-error">
|
||||||
<div class="alert alert-danger m-3" role="alert">
|
<div class="alert alert-danger m-3 alert-dismissible swing-in-top-fwd" role="alert">
|
||||||
{% translate 'Something went wrong loading your data. Try reloading the page or check the console for more information.' %}
|
{% translate 'Something went wrong loading your data. Try reloading the page or check the console for more information.' %}
|
||||||
|
<button type="button" class="btn-close" aria-label="Close" id="loading-error-close"></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user