Add Organization Settings link to org dropdown menu
- Add Organization Settings link in top-right org menu dropdown - Position it between Switch Org and Admin Panel - Add gear icon for visual clarity - Rename 'Settings' to 'User Settings' with user icon for clarity - Organization Settings link only shows when current_organization is set
This commit is contained in:
parent
60b97136c7
commit
7975581da2
1 changed files with 10 additions and 2 deletions
|
|
@ -196,6 +196,14 @@ defmodule ToweropsWeb.Layouts do
|
|||
>
|
||||
Switch Org
|
||||
</.link>
|
||||
<.link
|
||||
:if={@current_organization}
|
||||
navigate={~p"/orgs/#{@current_organization.slug}/settings"}
|
||||
class="flex items-center gap-2 px-4 py-2 text-sm text-zinc-700 hover:bg-zinc-100 dark:text-zinc-300 dark:hover:bg-zinc-700"
|
||||
phx-click={JS.hide(to: "#org-menu")}
|
||||
>
|
||||
<.icon name="hero-cog-6-tooth" class="w-4 h-4" /> Organization Settings
|
||||
</.link>
|
||||
<%= if @current_scope && @current_scope.user && @current_scope.user.is_superuser do %>
|
||||
<.link
|
||||
navigate={~p"/admin"}
|
||||
|
|
@ -207,10 +215,10 @@ defmodule ToweropsWeb.Layouts do
|
|||
<% end %>
|
||||
<.link
|
||||
navigate={~p"/users/settings"}
|
||||
class="block px-4 py-2 text-sm text-zinc-700 hover:bg-zinc-100 dark:text-zinc-300 dark:hover:bg-zinc-700"
|
||||
class="flex items-center gap-2 px-4 py-2 text-sm text-zinc-700 hover:bg-zinc-100 dark:text-zinc-300 dark:hover:bg-zinc-700"
|
||||
phx-click={JS.hide(to: "#org-menu")}
|
||||
>
|
||||
Settings
|
||||
<.icon name="hero-user-circle" class="w-4 h-4" /> User Settings
|
||||
</.link>
|
||||
<.link
|
||||
href={~p"/users/log-out"}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue