diff --git a/assets/js/events.js b/assets/js/events.js index 9f7fb52bf..2bb820ad4 100644 --- a/assets/js/events.js +++ b/assets/js/events.js @@ -43,7 +43,9 @@ export function registerGlobalEventHandlers() { window.addEventListener("lb:clipcopy", (event) => { if ("clipboard" in navigator) { - if (event.target.tagName === "INPUT") { + if (event.detail.content) { + navigator.clipboard.writeText(event.detail.content); + } else if (event.target.tagName === "INPUT") { navigator.clipboard.writeText(event.target.value); } else { navigator.clipboard.writeText(event.target.textContent); diff --git a/lib/livebook_web/live/session_live.ex b/lib/livebook_web/live/session_live.ex index ab4c4cec5..412c28ba6 100644 --- a/lib/livebook_web/live/session_live.ex +++ b/lib/livebook_web/live/session_live.ex @@ -232,6 +232,7 @@ defmodule LivebookWeb.SessionLive do settings={@data_view.app_settings} app={@app} deployed_app_slug={@data_view.deployed_app_slug} + any_session_secrets?={@data_view.any_session_secrets?} />
@@ -2275,6 +2276,8 @@ defmodule LivebookWeb.SessionLive do secrets: data.secrets, hub: Livebook.Hubs.fetch_hub!(data.notebook.hub_id), hub_secrets: data.hub_secrets, + any_session_secrets?: + Session.Data.session_secrets(data.secrets, data.notebook.hub_id) != [], file_entries: Enum.sort_by(data.notebook.file_entries, & &1.name), app_settings: data.notebook.app_settings, deployed_app_slug: data.deployed_app_slug diff --git a/lib/livebook_web/live/session_live/app_info_component.ex b/lib/livebook_web/live/session_live/app_info_component.ex index 61e4171a1..15a70e496 100644 --- a/lib/livebook_web/live/session_live/app_info_component.ex +++ b/lib/livebook_web/live/session_live/app_info_component.ex @@ -27,21 +27,28 @@ defmodule LivebookWeb.SessionLive.AppInfoComponent do
<% else %> -
- - <.link - patch={~p"/sessions/#{@session.id}/settings/app"} - class="button-base button-outlined-gray bg-transparent" - > - Configure - +
+ <.message_box + :if={@any_session_secrets?} + kind={:warning} + message="You defined session secrets, but those are not available to the deployed app, only Hub secrets are." + /> +
+ + <.link + patch={~p"/sessions/#{@session.id}/settings/app"} + class="button-base button-outlined-gray bg-transparent" + > + Configure + +
<%= if @app do %>

diff --git a/lib/livebook_web/live/session_live/secrets_list_component.ex b/lib/livebook_web/live/session_live/secrets_list_component.ex index 22f499b3e..e367ba3b1 100644 --- a/lib/livebook_web/live/session_live/secrets_list_component.ex +++ b/lib/livebook_web/live/session_live/secrets_list_component.ex @@ -77,12 +77,22 @@ defmodule LivebookWeb.SessionLive.SecretsListComponent do <%= @secret.name %>