Phoenix router for the AttachedDashboard.
Also provides the attached_dashboard/1,2 macro that host apps use to mount
the dashboard at a chosen prefix.
Usage
# router.ex
import AttachedDashboard.Web.Router
scope "/" do
pipe_through :browser
attached_dashboard "/admin/files"
endOptions
:on_mount—on_mounthooks added to the dashboard'slive_session. Use this to enforce authentication from the host app.:as— override the route helper name. Defaults to:attached_dashboard.:csp_nonce_assign_key— CSP nonce key (atom or map with:img,:style,:scriptkeys).:backlink— path in the host app to return to from the dashboard sidebar (e.g."/admin"). When set, the sidebar title becomes a link to this path. Use a full URL/path string; the target lives outside the dashboard'slive_session, so navigation is a regular request (full page reload).
Summary
Functions
Mounts the AttachedDashboard at the given path in the host app's router.
Callback invoked by Plug on every request.
Callback implementation for Phoenix.VerifiedRoutes.formatted_routes/1.
Callback required by Plug that initializes the router for serving web requests.
Callback implementation for Phoenix.VerifiedRoutes.verified_route?/2.
Functions
Mounts the AttachedDashboard at the given path in the host app's router.
Callback invoked by Plug on every request.
Callback implementation for Phoenix.VerifiedRoutes.formatted_routes/1.
Callback required by Plug that initializes the router for serving web requests.
Callback implementation for Phoenix.VerifiedRoutes.verified_route?/2.