mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-06 16:32:35 +00:00
Merge (#127)
This commit is contained in:
@ -1,13 +1,16 @@
|
||||
<div>
|
||||
<div id="toast" hx-swap-oob="true">
|
||||
<script>
|
||||
window.addEventListener('toast', (e) => {
|
||||
window.toastr[e.detail.type](e.detail.message)
|
||||
window.toastr[e.detail.type](e.detail.message);
|
||||
});
|
||||
</script>
|
||||
@if(session()->has('toast.type') && session()->has('toast.message'))
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
window.toastr['{{ session()->get('toast.type') }}']('{{ session()->get('toast.message') }}');
|
||||
@if (session()->has("toast.type") && session()->has("toast.message"))
|
||||
<script defer>
|
||||
if (window.toastr) {
|
||||
window.toastr['{{ session()->get("toast.type") }}']('{{ session()->get("toast.message") }}');
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
window.toastr['{{ session()->get("toast.type") }}']('{{ session()->get("toast.message") }}');
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
|
Reference in New Issue
Block a user