From f3d75373dd57244d11a61e2503d01a8cf82a5f21 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sun, 12 Apr 2026 17:06:46 -0500 Subject: [PATCH] Admin-only nav dropdown Collapse the three admin-only links (Users, Contact edits, Oban) into a single "Admin" dropdown in the horizontal nav so the top bar isn't cluttered with admin controls for the one admin account. Non-admins see nothing extra. --- lib/microwaveprop_web/components/layouts.ex | 33 +++++++++------------ 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/lib/microwaveprop_web/components/layouts.ex b/lib/microwaveprop_web/components/layouts.ex index d08e3faa..6f239aac 100644 --- a/lib/microwaveprop_web/components/layouts.ex +++ b/lib/microwaveprop_web/components/layouts.ex @@ -47,27 +47,22 @@ defmodule MicrowavepropWeb.Layouts do <.link navigate="/contacts" class="btn btn-ghost btn-sm">Contacts <.link navigate="/contacts/map" class="btn btn-ghost btn-sm">Contact Map <.link navigate="/about" class="btn btn-ghost btn-sm">About - <.link +
- Users - - <.link - :if={@current_scope && @current_scope.user && @current_scope.user.is_admin} - navigate="/admin/contact-edits" - class="btn btn-ghost btn-sm" - > - Edits - - <.link - :if={@current_scope && @current_scope.user && @current_scope.user.is_admin} - href="/admin/oban" - class="btn btn-ghost btn-sm" - > - Oban - +
+ Admin <.icon name="hero-chevron-down-micro" class="size-3" /> +
+ +
<%= if @current_scope && @current_scope.user do %> <.link navigate={~p"/u/#{@current_scope.user.callsign}"}