Files
librenms-librenms/resources/views/components/toast.blade.php
Tony Murray fa16c025ba Fix popup toast messages (Remove Flasher) (#16090)
* Remove flasher
Just use a bit of custom code to interface with toastr js
This is able to retain our custom theme and work properly

* Fix style issues

* Missed reference rename

* Remove test code :)

* Fix a missed rename

* Fix one more missed reference

* Fix typo
2024-06-05 08:07:42 -05:00

10 lines
381 B
PHP

@if($toasts)
<script>
document.addEventListener("DOMContentLoaded", function() {
@foreach ($toasts as $toast)
toastr["{{ $toast['level'] }}"]({{ Js::from(\LibreNMS\Util\Clean::html($toast['message'], $purifier_config)) }}, "{{ $toast['title'] }}", {{ JS::from($toast['options']) }});
@endforeach
});
</script>
@endif