Add link to apps sessions on multi-session app page (#1954)

This commit is contained in:
Jonatan Kłosko 2023-06-02 18:18:54 +02:00 committed by GitHub
parent 0da159e5ce
commit cc9731c428
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View file

@ -52,7 +52,7 @@ defmodule LivebookWeb.AppLive do
<.modal id="sessions-modal" show width={:big} patch={~p"/"}>
<div class="p-6 max-w-4xl flex flex-col space-y-3">
<h3 class="text-2xl font-semibold text-gray-800">
App sessions
<%= @app.notebook_name %>
</h3>
<p class="text-gray-700">
<%= if @app_settings.show_existing_sessions do %>

View file

@ -112,6 +112,12 @@ defmodule LivebookWeb.AppSessionLive do
<span>Home</span>
</.link>
</.menu_item>
<.menu_item :if={@data_view.multi_session}>
<.link navigate={~p"/apps/#{@data_view.slug}"} role="menuitem">
<.remix_icon icon="play-list-add-line" />
<span>Sessions</span>
</.link>
</.menu_item>
<.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