mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-12-09 13:16:08 +08:00
Don't show chevron when there's no menu (#3015)
This commit is contained in:
parent
e2d87fd569
commit
e04543495f
1 changed files with 9 additions and 3 deletions
|
|
@ -11,7 +11,13 @@ defmodule LivebookWeb.AppsLive do
|
|||
apps = Livebook.Apps.list_authorized_apps(socket.assigns.current_user)
|
||||
empty_apps_path? = Livebook.Apps.empty_apps_path?()
|
||||
|
||||
{:ok, assign(socket, apps: apps, empty_apps_path?: empty_apps_path?)}
|
||||
{:ok,
|
||||
assign(socket,
|
||||
apps: apps,
|
||||
empty_apps_path?: empty_apps_path?,
|
||||
logout_enabled?:
|
||||
Livebook.Config.logout_enabled?() and socket.assigns.current_user.email != nil
|
||||
)}
|
||||
end
|
||||
|
||||
@impl true
|
||||
|
|
@ -24,10 +30,10 @@ defmodule LivebookWeb.AppsLive do
|
|||
<:toggle>
|
||||
<button class="flex items-center text-gray-900">
|
||||
<img src={~p"/images/logo.png"} height="40" width="40" alt="logo livebook" />
|
||||
<.remix_icon icon="arrow-down-s-line" />
|
||||
<.remix_icon :if={@logout_enabled?} icon="arrow-down-s-line" />
|
||||
</button>
|
||||
</:toggle>
|
||||
<.menu_item :if={Livebook.Config.logout_enabled?() and @current_user.email != nil}>
|
||||
<.menu_item :if={@logout_enabled?}>
|
||||
<button phx-click="logout" role="menuitem">
|
||||
<.remix_icon icon="logout-box-line" />
|
||||
<span>Logout</span>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue