Does anyone know of any documentation to know how notifications are handled in Phoenix?
what kind of notifications?
or phoenix “flash”
phoenix flash: https://hexdocs.pm/phoenix/search.html?q=flash - first link
browser web push is a bit more complex… look at https://github.com/danhper/elixir-web-push-encryption and the client sample https://github.com/danhper/elixir-web-push-encryption/tree/master/client-sample
Have a look at the default layout file (
app.html.eex) located in
lib ├── app_web │ │ ├── layout │ │ │ └── app.html.eex
you will find a section with the following information.
<main role="main"> <p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p> <p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p> <%= render @view_module, @view_template, assigns %> .................
the paragraph with the alert tags are what shows the flash messages, you can give it any class that matches the styling you want depending on your CSS