mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-09-20 10:05:57 +08:00
Add help text for how to access secrets in the secrets sidebar (#1535)
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
This commit is contained in:
parent
42d2386a2d
commit
84361fb207
|
@ -73,7 +73,7 @@ Example usage:
|
|||
|
||||
/*
|
||||
Note: we let the arrow and content overlap 1px,
|
||||
othrwise there's a tiny space between them.
|
||||
otherwise there's a tiny space between them.
|
||||
*/
|
||||
|
||||
.tooltip.top:before {
|
||||
|
@ -98,7 +98,14 @@ othrwise there's a tiny space between them.
|
|||
transform: translate(-50%, calc(var(--arrow-size) - 1px + var(--distance)));
|
||||
}
|
||||
|
||||
.tooltip.bottom:after {
|
||||
.tooltip.bottom-left:before {
|
||||
top: 100%;
|
||||
right: 0;
|
||||
transform: translate(0%, calc(var(--arrow-size) - 1px + var(--distance)));
|
||||
}
|
||||
|
||||
.tooltip.bottom:after,
|
||||
.tooltip.bottom-left:after {
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, var(--distance));
|
||||
|
|
|
@ -559,13 +559,13 @@ defmodule LivebookWeb.SessionLive do
|
|||
defp secrets_list(assigns) do
|
||||
~H"""
|
||||
<div class="flex flex-col grow">
|
||||
<div>
|
||||
<div class="flex justify-between items-center">
|
||||
<h3 class="uppercase text-sm font-semibold text-gray-500">
|
||||
Secrets
|
||||
</h3>
|
||||
<span class="text-sm text-gray-500">Available only to this session</span>
|
||||
<.secrets_info_icon />
|
||||
</div>
|
||||
|
||||
<span class="text-sm text-gray-500">Available only to this session</span>
|
||||
<div class="flex flex-col">
|
||||
<div class="flex flex-col space-y-4 mt-6">
|
||||
<%= for {secret_name, secret_value} <- session_only_secrets(@data_view.secrets, @livebook_secrets) do %>
|
||||
|
@ -724,6 +724,24 @@ defmodule LivebookWeb.SessionLive do
|
|||
"""
|
||||
end
|
||||
|
||||
defp secrets_info_icon(assigns) do
|
||||
~H"""
|
||||
<span
|
||||
class="icon-button cursor-pointer tooltip bottom-left"
|
||||
data-tooltip={
|
||||
~S'''
|
||||
Secrets are a safe way to share credentials
|
||||
and tokens with notebooks. They are often
|
||||
accessed by Smart cells and can be read as
|
||||
environment variables using the LB_ prefix.
|
||||
'''
|
||||
}
|
||||
>
|
||||
<.remix_icon icon="question-line" class="text-xl leading-none" />
|
||||
</span>
|
||||
"""
|
||||
end
|
||||
|
||||
defp runtime_info(assigns) do
|
||||
~H"""
|
||||
<div class="flex flex-col grow">
|
||||
|
|
Loading…
Reference in a new issue