diff --git a/app/templates/base.html.j2 b/app/templates/base.html.j2 index 251b6d86..3b717a8b 100644 --- a/app/templates/base.html.j2 +++ b/app/templates/base.html.j2 @@ -193,8 +193,13 @@ } } {% for message in get_flashed_messages() %} - M.toast({html: '{{ message }}'}) + M.toast({"classes": "rounded", "html": '{{ message }}'}); {% endfor %} + for (toastActionElement of document.querySelectorAll(".toast-action[data-action='close']")) { + toastActionElement.addEventListener("click", function(event) { + M.Toast.getInstance(toastActionElement.parentElement).dismiss(); + }); + }