Skip to content

Commit

Permalink
Fix context menus and menu icon visibility (#591)
Browse files Browse the repository at this point in the history
* fix context menu visibility on user profiles

* keep context menus larger on mobile

* hide menu icon before launch
  • Loading branch information
rjt-rockx authored Aug 10, 2023
1 parent 11090aa commit a4b4903
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion lib/banchan_web/components/nav.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ defmodule BanchanWeb.Components.Nav do
role="navigation"
aria-label="main navigation"
>
<div class="items-center flex-none gap-4 lg:hidden">
{!-- # TODO: remove this basic auth check on launch --}
<div
:if={@current_user || is_nil(Application.get_env(:banchan, :basic_auth))}
class="items-center flex-none gap-4 lg:hidden"
>
<label for="drawer-toggle" class="btn btn-square btn-ghost">
<Icon name="menu" size="6" />
</label>
Expand Down
4 changes: 2 additions & 2 deletions lib/banchan_web/live/commission_live/components/comment.ex
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ defmodule BanchanWeb.CommissionLive.Components.Comment do
</label>
<ol
tabindex="0"
class="p-1 border dropdown-content menu bg-base-300 border-base-content border-opacity-10 rounded-xl"
class="p-1 border dropdown-content menu md:menu-compact bg-base-300 border-base-content border-opacity-10 rounded-xl"
>
{#if Ecto.assoc_loaded?(@event.history)}
{#for history <- @event.history}
Expand Down Expand Up @@ -204,7 +204,7 @@ defmodule BanchanWeb.CommissionLive.Components.Comment do
</label>
<ul
tabindex="0"
class="p-1 border dropdown-content menu bg-base-300 border-base-content border-opacity-10 rounded-xl"
class="p-1 border dropdown-content menu md:menu-compact bg-base-300 border-base-content border-opacity-10 rounded-xl"
>
{#if !@changeset &&
(@current_user_member? || @current_user.id == @actor.id || :admin in @current_user.roles ||
Expand Down
2 changes: 1 addition & 1 deletion lib/banchan_web/live/denizen_live/show.ex
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ defmodule BanchanWeb.DenizenLive.Show do
</label>
<ul
tabindex="0"
class="p-2 border bg-base-300 border-base-content border-opacity-10 menu rounded-box"
class="p-2 border menu md:menu-compact dropdown-content bg-base-300 border-base-content border-opacity-10 rounded-box"
>
{#if :admin in @current_user.roles || :mod in @current_user.roles}
<li>
Expand Down
2 changes: 1 addition & 1 deletion lib/banchan_web/live/offering_live/show.ex
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ defmodule BanchanWeb.OfferingLive.Show do
</label>
<ul
tabindex="0"
class="p-1 border dropdown-content menu bg-base-100 border-base-content border-opacity-10 rounded-xl"
class="p-1 border dropdown-content menu md:menu-compact bg-base-100 border-base-content border-opacity-10 rounded-xl"
>
{#if @current_user && (@current_user_member? || Accounts.mod?(@current_user))}
<li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ defmodule BanchanWeb.StudioLive.Components.StudioLayout do
</label>
<ul
tabindex="0"
class="p-1 border rounded-xl dropdown-content bg-base-300 border-base-content border-opacity-10 menu menu-compact"
class="p-1 border rounded-xl dropdown-content bg-base-300 border-base-content border-opacity-10 menu md:menu-compact"
>
{#if Accounts.mod?(@current_user)}
<li>
Expand Down

0 comments on commit a4b4903

Please sign in to comment.