+ <.link navigate="/contacts">Contact Training Data
+
+
+ <.link navigate="/contacts/map">Contact Map
+
+
+
+ <%!-- Auth --%>
+
+ <%= if @current_scope && @current_scope.user do %>
+
{@current_scope.user.callsign}
+
+ <.link href={~p"/users/settings"}>Settings
+
+
+ <.link href={~p"/users/log-out"} method="delete">Log out
+
+ <% else %>
+
+ <.link href={~p"/users/register"}>Register
+
+
+ <.link href={~p"/users/log-in"}>Log in
+
+ <% end %>
+
-
- <%!-- Point detail panel — bottom sheet on mobile, sidebar on desktop --%>
-
-
-
- <%!-- Bottom timeline bar --%>
-
-
diff --git a/lib/microwaveprop_web/router.ex b/lib/microwaveprop_web/router.ex
index abc297d8..0af5b33d 100644
--- a/lib/microwaveprop_web/router.ex
+++ b/lib/microwaveprop_web/router.ex
@@ -46,20 +46,22 @@ defmodule MicrowavepropWeb.Router do
get "/", PageController, :home
- live "/submit", SubmitLive
- live "/map", MapLive
- live "/weather", WeatherMapLive
- live "/contacts", ContactLive.Index
- live "/contacts/map", ContactMapLive
- live "/contacts/:id", ContactLive.Show
- live "/path", PathLive
- live "/rover", RoverLive
- live "/algo", AlgoLive
- live "/backfill", BackfillLive
+ live_session :public, on_mount: [{MicrowavepropWeb.UserAuth, :default}] do
+ live "/submit", SubmitLive
+ live "/map", MapLive
+ live "/weather", WeatherMapLive
+ live "/contacts", ContactLive.Index
+ live "/contacts/map", ContactMapLive
+ live "/contacts/:id", ContactLive.Show
+ live "/path", PathLive
+ live "/rover", RoverLive
+ live "/algo", AlgoLive
+ live "/backfill", BackfillLive
- # Beacons: read-only public views
- live "/beacons", BeaconLive.Index, :index
- live "/beacons/:id", BeaconLive.Show, :show
+ # Beacons: read-only public views
+ live "/beacons", BeaconLive.Index, :index
+ live "/beacons/:id", BeaconLive.Show, :show
+ end
# Redirect old /qsos routes
get "/qsos", PageController, :redirect_contacts