From cc9731c428685621536b2187e1998854221bd833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Fri, 2 Jun 2023 18:18:54 +0200 Subject: [PATCH] Add link to apps sessions on multi-session app page (#1954) --- lib/livebook_web/live/app_live.ex | 2 +- lib/livebook_web/live/app_session_live.ex | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/livebook_web/live/app_live.ex b/lib/livebook_web/live/app_live.ex index def0ca2a9..773347a4d 100644 --- a/lib/livebook_web/live/app_live.ex +++ b/lib/livebook_web/live/app_live.ex @@ -52,7 +52,7 @@ defmodule LivebookWeb.AppLive do <.modal id="sessions-modal" show width={:big} patch={~p"/"}>

- App sessions + <%= @app.notebook_name %>

<%= if @app_settings.show_existing_sessions do %> diff --git a/lib/livebook_web/live/app_session_live.ex b/lib/livebook_web/live/app_session_live.ex index dee7c7145..4bdd6b1a3 100644 --- a/lib/livebook_web/live/app_session_live.ex +++ b/lib/livebook_web/live/app_session_live.ex @@ -112,6 +112,12 @@ defmodule LivebookWeb.AppSessionLive do Home + <.menu_item :if={@data_view.multi_session}> + <.link navigate={~p"/apps/#{@data_view.slug}"} role="menuitem"> + <.remix_icon icon="play-list-add-line" /> + Sessions + + <.menu_item :if={@data_view.show_source}> <.link patch={~p"/apps/#{@data_view.slug}/#{@session.id}/source"} role="menuitem"> <.remix_icon icon="code-line" /> @@ -288,7 +294,8 @@ defmodule LivebookWeb.AppSessionLive do ), app_status: data.app_data.status, show_source: data.notebook.app_settings.show_source, - slug: data.notebook.app_settings.slug + slug: data.notebook.app_settings.slug, + multi_session: data.notebook.app_settings.multi_session } end